AccountPreview API
API reference docs for the React AccountPreview component. Learn about the props, CSS, and other APIs of this exported module.
Demos
Import
import { AccountPreview } from '@toolpad/core/Account';
The AccountPreview component displays user account information.
Props of the native component are also available.
Name | Type | Default | Description |
---|---|---|---|
handleClick | func | - | The handler used when the preview is expanded |
open | bool | false | The state of the Account popover |
slotProps | { avatar?: object, avatarIconButton?: object, moreIconButton?: object } | - | The props used for each slot inside. |
slots | { avatar?: elementType, avatarIconButton?: elementType, moreIconButton?: elementType } | - | The components used for each slot inside. See Slots API below for more details. |
variant | 'condensed' | 'expanded' | 'condensed' | The type of account details to display. |
The component cannot hold a ref.
Slot name | Class name | Default component | Description |
---|---|---|---|
avatar | Avatar | The component used for the Avatar | |
moreIconButton | IconButton | The component used for the overflow icon button in the expanded variant | |
avatarIconButton | IconButton | The component used for the avatar icon button in the condensed variant |
Source code
If you did not find the information in this page, consider having a look at the implementation of the component for more detail.