PickersLayout API
Demos
For examples and details on the usage of this React component, visit the component demo pages:
Import
import { PickersLayout } from '@mui/x-date-pickers-pro/PickersLayout';
// or
import { PickersLayout } from '@mui/x-date-pickers/PickersLayout';
// or
import { PickersLayout } from '@mui/x-date-pickers-pro';
// or
import { PickersLayout } from '@mui/x-date-pickers';
Component name
The nameMuiPickersLayout
can be used when providing default props or style overrides in the theme.Props
Name | Type | Default | Description |
---|---|---|---|
components | object | {} | Overrideable components. |
componentsProps | object | {} | The props used for each component slot. |
orientation | 'landscape' | 'portrait' | Force rendering in particular orientation. |
Slots
Name | Type | Default | Description |
---|---|---|---|
ActionBar | elementType | PickersActionBar | Custom component for the action bar, it is placed bellow the picker views. |
Layout | elementType | Custom component for wrapping the layout.
It wraps the toolbar, views, and action bar. | |
Tabs | elementType | Tabs enabling toggling between views. | |
Toolbar | elementType | Custom component for the toolbar.
It is placed above the picker views. |
CSS
Rule name | Global class | Description |
---|---|---|
root | .MuiPickersLayout-root | Styles applied to the root element. |
landscape | .MuiPickersLayout-landscape | Styles applied to the root element in landscape orientation. |
contentWrapper | .MuiPickersLayout-contentWrapper | Styles applied to the contentWrapper element (which contains the tabs and the view itself). |
toolbar | .MuiPickersLayout-toolbar | Styles applied to the toolbar. |
actionBar | .MuiPickersLayout-actionBar | Styles applied to the action bar. |
tabs | .MuiPickersLayout-tabs | Styles applied to the tabs. |
You can override the style of the component using one of these customization options:
- With a global class name.
- With a rule name as part of the component's
styleOverrides
property in a custom theme.