Skip to content

Account API

API reference docs for the React Account component. Learn about the props, CSS, and other APIs of this exported module.

Demos

Import

import { Account } from '@toolpad/core/Account';
// or
import { Account } from '@toolpad/core';

Learn about the difference by reading this guide on minimizing bundle size.

Props

Props of the native component are also available.

NameTypeDescription
localeText{ iconButtonAriaLabel?: string, signInLabel?: string, signOutLabel?: string }

The labels for the account component.

slotProps{ popover?: object, popoverContent?: object, preview?: { handleClick?: func, open?: bool, slotProps?: { avatar?: object, avatarIconButton?: object, moreIconButton?: object }, slots?: { avatar?: elementType, avatarIconButton?: elementType, moreIconButton?: elementType }, variant?: 'condensed'
| 'expanded' }, signInButton?: object, signOutButton?: object }

The props used for each slot inside.

slots{ popover?: elementType, popoverContent?: elementType, preview?: elementType, signInButton?: elementType, signOutButton?: elementType }

The components used for each slot inside.

See Slots API below for more details.

The component cannot hold a ref.

Slots

Slot nameClass nameDefault componentDescription
previewAccountPreviewThe component used for the account preview
popoverPopoverThe component used for the account popover menu
popoverContentStackThe component used for the content of account popover
signInButtonButtonThe component used for the sign in button.
signOutButtonButtonThe component used for the sign out button.

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.