FilterPanelTrigger API
API reference docs for the React FilterPanelTrigger component. Learn about the props, CSS, and other APIs of this exported module.
Demos
Import
import { FilterPanelTrigger } from '@mui/x-data-grid/components';
// or
import { FilterPanelTrigger } from '@mui/x-data-grid';
// or
import { FilterPanelTrigger } from '@mui/x-data-grid-pro';
// or
import { FilterPanelTrigger } from '@mui/x-data-grid-premium';
Learn about the difference by reading this guide on minimizing bundle size.
A button that opens and closes the filter panel.
It renders the baseButton
slot.
A ref for imperative actions. It currently only supports focusVisible()
action.
Type:func
| { current?: { focusVisible: func } }
If true
, the ripples are centered. They won't start at the cursor interaction position.
Type:bool
Default:false
The color of the component. It supports both default and custom theme colors, which can be added as shown in the palette customization guide.
Type:'error'
| 'info'
| 'inherit'
| 'primary'
| 'secondary'
| 'success'
| 'warning'
Default:'primary'
If true
, the ripple effect is disabled.
⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure to highlight the element by applying separate styles with the .Mui-focusVisible
class.
Type:bool
Default:false
This prop can help identify which element has keyboard focus. The class name will be applied when the element gains the focus through keyboard interaction. It's a polyfill for the CSS :focus-visible selector. The rationale for using this feature is explained here. A polyfill can be used to apply a focus-visible
class to other components if needed.
Type:string
The URL to link to when the button is clicked. If defined, an a
element will be used as the root node.
Type:string
The component used to render a link when the href
prop is provided.
Type:elementType
Default:'a'
Callback fired when the component is focused with a keyboard. We trigger a onFocus
callback too.
Type:func
The size of the component. small
is equivalent to the dense button styling.
Type:'large'
| 'medium'
| 'small'
The system prop that allows defining system overrides as well as additional CSS styles.
See the `sx` page for more details.
Type:Array<func
| object
| bool>
| func
| object
ref
is forwarded to the root element.These class names are useful for styling with CSS. They are applied to the component's slots when specific states are triggered.
State class applied to the ButtonBase root element if the button is keyboard focused.
Styles applied to the root element if color="error"
.
Rule name:colorError
Styles applied to the root element if color="info"
.
Rule name:colorInfo
Styles applied to the root element if color="inherit"
.
Rule name:colorInherit
Styles applied to the root element if color="primary"
.
Rule name:colorPrimary
Styles applied to the root element if color="secondary"
.
Rule name:colorSecondary
Styles applied to the root element if color="success"
.
Rule name:colorSuccess
Styles applied to the root element if color="warning"
.
Rule name:colorWarning
Styles applied to the root element if variant="contained"
.
Rule name:contained
Styles applied to the root element if variant="contained"
and color="error"
.
Rule name:containedError
Styles applied to the root element if variant="contained"
and color="info"
.
Rule name:containedInfo
Styles applied to the root element if variant="contained"
and color="inherit"
.
Rule name:containedInherit
Styles applied to the root element if variant="contained"
and color="primary"
.
Rule name:containedPrimary
Styles applied to the root element if variant="contained"
and color="secondary"
.
Rule name:containedSecondary
Styles applied to the root element if size="large"
and variant="contained"
.
Rule name:containedSizeLarge
Styles applied to the root element if size="medium"
and variant="contained"
.
Rule name:containedSizeMedium
Styles applied to the root element if size="small"
and variant="contained"
.
Rule name:containedSizeSmall
Styles applied to the root element if variant="contained"
and color="success"
.
Rule name:containedSuccess
Styles applied to the root element if variant="contained"
and color="warning"
.
Rule name:containedWarning
Styles applied to the root element if disableElevation={true}
.
Rule name:disableElevation
Styles applied to the root element if fullWidth={true}
.
Rule name:fullWidth
Styles applied to the icon element if supplied and size="large"
.
Rule name:iconSizeLarge
Styles applied to the icon element if supplied and size="medium"
.
Rule name:iconSizeMedium
Styles applied to the icon element if supplied and size="small"
.
Rule name:iconSizeSmall
Styles applied to the root element if variant="outlined"
.
Rule name:outlined
Styles applied to the root element if variant="outlined"
and color="error"
.
Rule name:outlinedError
Styles applied to the root element if variant="outlined"
and color="info"
.
Rule name:outlinedInfo
Styles applied to the root element if variant="outlined"
and color="inherit"
.
Rule name:outlinedInherit
Styles applied to the root element if variant="outlined"
and color="primary"
.
Rule name:outlinedPrimary
Styles applied to the root element if variant="outlined"
and color="secondary"
.
Rule name:outlinedSecondary
Styles applied to the root element if size="large"
and variant="outlined"
.
Rule name:outlinedSizeLarge
Styles applied to the root element if size="medium"
and variant="outlined"
.
Rule name:outlinedSizeMedium
Styles applied to the root element if size="small"
and variant="outlined"
.
Rule name:outlinedSizeSmall
Styles applied to the root element if variant="outlined"
and color="success"
.
Rule name:outlinedSuccess
Styles applied to the root element if variant="outlined"
and color="warning"
.
Rule name:outlinedWarning
Styles applied to the root element if size="large"
.
Rule name:sizeLarge
Styles applied to the root element if size="medium"
.
Rule name:sizeMedium
Styles applied to the root element if size="small"
.
Rule name:sizeSmall
Styles applied to the startIcon element if supplied.
Rule name:startIcon
Styles applied to the root element if variant="text"
and color="error"
.
Rule name:textError
Styles applied to the root element if variant="text"
and color="info"
.
Rule name:textInfo
Styles applied to the root element if variant="text"
and color="inherit"
.
Rule name:textInherit
Styles applied to the root element if variant="text"
and color="primary"
.
Rule name:textPrimary
Styles applied to the root element if variant="text"
and color="secondary"
.
Rule name:textSecondary
Styles applied to the root element if size="large"
and variant="text"
.
Rule name:textSizeLarge
Styles applied to the root element if size="medium"
and variant="text"
.
Rule name:textSizeMedium
Styles applied to the root element if size="small"
and variant="text"
.
Rule name:textSizeSmall
Styles applied to the root element if variant="text"
and color="success"
.
Rule name:textSuccess
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.
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.