Skip to content

Chip API

API documentation for the React Chip component. Learn about the available props and the CSS API.

Import

import Chip from '@mui/material/Chip';
// or
import { Chip } from '@mui/material';
You can learn about the difference by reading this guide on minimizing bundle size.

Chips represent complex entities in small blocks, such as a contact.

Component name

The name MuiChip can be used when providing default props or style overrides in the theme.

Props

Props of the native component are also available.

NameTypeDefaultDescription
avatarelement
The Avatar element to display.
childrenunsupportedProp
This prop isn't supported. Use the component prop if you need to change the children structure.
classesobject
Override or extend the styles applied to the component. See CSS API below for more details.
clickableboolfalse
If true, the chip will appear clickable, and will raise when pressed, even if the onClick prop is not defined. If false, the chip will not appear clickable, even if onClick prop is defined. This can be used, for example, along with the component prop to indicate an anchor Chip is clickable. Note: this controls the UI and does not affect the onClick event.
color'default'
| 'primary'
| 'secondary'
| 'error'
| 'info'
| 'success'
| 'warning'
| string
'default'
The color of the component. It supports both default and custom theme colors, which can be added as shown in the palette customization guide.
componentelementType
The component used for the root node. Either a string to use a HTML element or a component.
deleteIconelement
Override the default delete icon element. Shown only if onDelete is set.
disabledboolfalse
If true, the component is disabled.
iconelement
Icon element.
labelnode
The content of the component.
onDeletefunc
Callback fired when the delete icon is clicked. If set, the delete icon will be shown.
size'medium'
| 'small'
| string
'medium'
The size of the component.
sxArray<func
| object
| bool>
| func
| object
The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.
variant'filled'
| 'outlined'
| string
'filled'
The variant to use.

The ref is forwarded to the root element.

CSS

Rule nameGlobal classDescription
root.MuiChip-rootStyles applied to the root element.
sizeSmall.MuiChip-sizeSmallStyles applied to the root element if size="small".
sizeMedium.MuiChip-sizeMediumStyles applied to the root element if size="medium".
colorError.MuiChip-colorErrorStyles applied to the root element if color="error".
colorInfo.MuiChip-colorInfoStyles applied to the root element if color="info".
colorPrimary.MuiChip-colorPrimaryStyles applied to the root element if color="primary".
colorSecondary.MuiChip-colorSecondaryStyles applied to the root element if color="secondary".
colorSuccess.MuiChip-colorSuccessStyles applied to the root element if color="success".
colorWarning.MuiChip-colorWarningStyles applied to the root element if color="warning".
disabled.Mui-disabledState class applied to the root element if disabled={true}.
clickable.MuiChip-clickableStyles applied to the root element if onClick is defined or clickable={true}.
clickableColorPrimary.MuiChip-clickableColorPrimaryStyles applied to the root element if onClick and color="primary" is defined or clickable={true}.
clickableColorSecondary.MuiChip-clickableColorSecondaryStyles applied to the root element if onClick and color="secondary" is defined or clickable={true}.
deletable.MuiChip-deletableStyles applied to the root element if onDelete is defined.
deletableColorPrimary.MuiChip-deletableColorPrimaryStyles applied to the root element if onDelete and color="primary" is defined.
deletableColorSecondary.MuiChip-deletableColorSecondaryStyles applied to the root element if onDelete and color="secondary" is defined.
outlined.MuiChip-outlinedStyles applied to the root element if variant="outlined".
filled.MuiChip-filledStyles applied to the root element if variant="filled".
outlinedPrimary.MuiChip-outlinedPrimaryStyles applied to the root element if variant="outlined" and color="primary".
outlinedSecondary.MuiChip-outlinedSecondaryStyles applied to the root element if variant="outlined" and color="secondary".
filledPrimary.MuiChip-filledPrimaryStyles applied to the root element if variant="filled" and color="primary".
filledSecondary.MuiChip-filledSecondaryStyles applied to the root element if variant="filled" and color="secondary".
avatar.MuiChip-avatarStyles applied to the avatar element.
avatarSmall.MuiChip-avatarSmallStyles applied to the avatar element if size="small".
avatarMedium.MuiChip-avatarMediumStyles applied to the avatar element if size="medium".
avatarColorPrimary.MuiChip-avatarColorPrimaryStyles applied to the avatar element if color="primary".
avatarColorSecondary.MuiChip-avatarColorSecondaryStyles applied to the avatar element if color="secondary".
icon.MuiChip-iconStyles applied to the icon element.
iconSmall.MuiChip-iconSmallStyles applied to the icon element if size="small".
iconMedium.MuiChip-iconMediumStyles applied to the icon element if size="medium".
iconColorPrimary.MuiChip-iconColorPrimaryStyles applied to the icon element if color="primary".
iconColorSecondary.MuiChip-iconColorSecondaryStyles applied to the icon element if color="secondary".
label.MuiChip-labelStyles applied to the label `span` element.
labelSmall.MuiChip-labelSmallStyles applied to the label `span` element if size="small".
labelMedium.MuiChip-labelMediumStyles applied to the label `span` element if size="medium".
deleteIcon.MuiChip-deleteIconStyles applied to the deleteIcon element.
deleteIconSmall.MuiChip-deleteIconSmallStyles applied to the deleteIcon element if size="small".
deleteIconMedium.MuiChip-deleteIconMediumStyles applied to the deleteIcon element if size="medium".
deleteIconColorPrimary.MuiChip-deleteIconColorPrimaryStyles applied to the deleteIcon element if color="primary" and variant="filled".
deleteIconColorSecondary.MuiChip-deleteIconColorSecondaryStyles applied to the deleteIcon element if color="secondary" and variant="filled".
deleteIconOutlinedColorPrimary.MuiChip-deleteIconOutlinedColorPrimaryStyles applied to the deleteIcon element if color="primary" and variant="outlined".
deleteIconOutlinedColorSecondary.MuiChip-deleteIconOutlinedColorSecondaryStyles applied to the deleteIcon element if color="secondary" and variant="outlined".
deleteIconFilledColorPrimary.MuiChip-deleteIconFilledColorPrimaryStyles applied to the deleteIcon element if color="primary" and variant="filled".
deleteIconFilledColorSecondary.MuiChip-deleteIconFilledColorSecondaryStyles applied to the deleteIcon element if color="secondary" and variant="filled".
focusVisible.Mui-focusVisibleState class applied to the root element if keyboard focused.

You can override the style of the component using one of these customization options:

Demos