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 of the native component are also available.
Name | Type | Default | Description |
---|---|---|---|
localeText | { signInLabel: string, signOutLabel: string } | DEFAULT_LOCALE_TEXT | The labels for the account component. |
slotProps | { iconButton?: object, signInButton?: object, signOutButton?: object } | - | The props used for each slot inside. |
slots | { menuItems?: 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.
Slot name | Class name | Default component | Description |
---|---|---|---|
signInButton | Button | The component used for the sign in button. | |
signOutButton | MenuItem | The component used for the sign out button. | |
menuItems | null | The component used for the custom menu items. |
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.