Skip to content

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

Props of the native component are also available.

NameTypeDefaultDescription
handleClickfunc-

The handler used when the preview is expanded

openboolfalse

The state of the Account popover

slotProps{ avatar?: object, avatarIconButton?: object, moreIconButton?: object }-

The props used for each slot inside.

slots{ avatar?: 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.

Slots

Slot nameClass nameDefault componentDescription
avatarAvatarThe component used for the Avatar
moreIconButtonIconButtonThe component used for the overflow icon button in the expanded variant
avatarIconButtonIconButtonThe 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.