Skip to content

Chip API

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

Component demos

Import

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

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

Props

Props of the native component are also available.

avatar

The Avatar element to display.

Type:element


children

This prop isn't supported. Use the component prop if you need to change the children structure.

Type:unsupportedProp


classes

Override or extend the styles applied to the component.

See CSS API below for more details.

Type:object


clickable

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.

Type:bool


color

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:'default'
| 'primary'
| 'secondary'
| 'error'
| 'info'
| 'success'
| 'warning'
| string

Default:'default'


component

The component used for the root node. Either a string to use a HTML element or a component.

Type:elementType


deleteIcon

Override the default delete icon element. Shown only if onDelete is set.

Type:element


disabled

If true, the component is disabled.

Type:bool

Default:false


icon

Icon element.

Type:element


label

The content of the component.

Type:node


onDelete

Callback fired when the delete icon is clicked. If set, the delete icon will be shown.

Type:func


size

The size of the component.

Type:'medium'
| 'small'
| string

Default:'medium'


skipFocusWhenDisabled

If true, allows the disabled chip to escape focus. If false, allows the disabled chip to receive focus.

Type:bool

Default:false


sx

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


variant

The variant to use.

Type:'filled'
| 'outlined'
| string

Default:'filled'


The ref is forwarded to the root element.

Theme default props

You can use MuiChip to change the default props of this component with the theme.


CSS classes

These class names are useful for styling with CSS. They are applied to the component's slots when specific states are triggered.

.Mui-disabledSTATE

State class applied to the root element if disabled={true}.


.Mui-focusVisibleSTATE

State class applied to the root element if keyboard focused.


.MuiChip-avatar

Styles applied to the avatar element.

Rule name:avatar


.MuiChip-avatarColorPrimary

Styles applied to the avatar element if color="primary".

Rule name:avatarColorPrimary


.MuiChip-avatarColorSecondary

Styles applied to the avatar element if color="secondary".

Rule name:avatarColorSecondary


.MuiChip-avatarMedium

Styles applied to the avatar element if size="medium".

Rule name:avatarMedium


.MuiChip-avatarSmall

Styles applied to the avatar element if size="small".

Rule name:avatarSmall


.MuiChip-clickable

Styles applied to the root element if onClick is defined or clickable={true}.

Rule name:clickable


.MuiChip-clickableColorPrimary

Styles applied to the root element if onClick and color="primary" is defined or clickable={true}.

Rule name:clickableColorPrimary


.MuiChip-clickableColorSecondary

Styles applied to the root element if onClick and color="secondary" is defined or clickable={true}.

Rule name:clickableColorSecondary


.MuiChip-colorError

Styles applied to the root element if color="error".

Rule name:colorError


.MuiChip-colorInfo

Styles applied to the root element if color="info".

Rule name:colorInfo


.MuiChip-colorPrimary

Styles applied to the root element if color="primary".

Rule name:colorPrimary


.MuiChip-colorSecondary

Styles applied to the root element if color="secondary".

Rule name:colorSecondary


.MuiChip-colorSuccess

Styles applied to the root element if color="success".

Rule name:colorSuccess


.MuiChip-colorWarning

Styles applied to the root element if color="warning".

Rule name:colorWarning


.MuiChip-deletable

Styles applied to the root element if onDelete is defined.

Rule name:deletable


.MuiChip-deletableColorPrimary

Styles applied to the root element if onDelete and color="primary" is defined.

Rule name:deletableColorPrimary


.MuiChip-deletableColorSecondary

Styles applied to the root element if onDelete and color="secondary" is defined.

Rule name:deletableColorSecondary


.MuiChip-deleteIcon

Styles applied to the deleteIcon element.

Rule name:deleteIcon


.MuiChip-deleteIconColorPrimary

Styles applied to the deleteIcon element if color="primary" and variant="filled".

Rule name:deleteIconColorPrimary


.MuiChip-deleteIconColorSecondary

Styles applied to the deleteIcon element if color="secondary" and variant="filled".

Rule name:deleteIconColorSecondary


.MuiChip-deleteIconFilledColorPrimary

Styles applied to the deleteIcon element if color="primary" and variant="filled".

Rule name:deleteIconFilledColorPrimary


.MuiChip-deleteIconFilledColorSecondary

Styles applied to the deleteIcon element if color="secondary" and variant="filled".

Rule name:deleteIconFilledColorSecondary


.MuiChip-deleteIconMedium

Styles applied to the deleteIcon element if size="medium".

Rule name:deleteIconMedium


.MuiChip-deleteIconOutlinedColorPrimary

Styles applied to the deleteIcon element if color="primary" and variant="outlined".

Rule name:deleteIconOutlinedColorPrimary


.MuiChip-deleteIconOutlinedColorSecondary

Styles applied to the deleteIcon element if color="secondary" and variant="outlined".

Rule name:deleteIconOutlinedColorSecondary


.MuiChip-deleteIconSmall

Styles applied to the deleteIcon element if size="small".

Rule name:deleteIconSmall


.MuiChip-filled

Styles applied to the root element if variant="filled".

Rule name:filled


.MuiChip-filledPrimary

Styles applied to the root element if variant="filled" and color="primary".

Rule name:filledPrimary


.MuiChip-filledSecondary

Styles applied to the root element if variant="filled" and color="secondary".

Rule name:filledSecondary


.MuiChip-icon

Styles applied to the icon element.

Rule name:icon


.MuiChip-iconColorPrimary

Styles applied to the icon element if color="primary".

Rule name:iconColorPrimary


.MuiChip-iconColorSecondary

Styles applied to the icon element if color="secondary".

Rule name:iconColorSecondary


.MuiChip-iconMedium

Styles applied to the icon element if size="medium".

Rule name:iconMedium


.MuiChip-iconSmall

Styles applied to the icon element if size="small".

Rule name:iconSmall


.MuiChip-label

Styles applied to the label span element.

Rule name:label


.MuiChip-labelMedium

Styles applied to the label span element if size="medium".

Rule name:labelMedium


.MuiChip-labelSmall

Styles applied to the label span element if size="small".

Rule name:labelSmall


.MuiChip-outlined

Styles applied to the root element if variant="outlined".

Rule name:outlined


.MuiChip-outlinedPrimary

Styles applied to the root element if variant="outlined" and color="primary".

Rule name:outlinedPrimary


.MuiChip-outlinedSecondary

Styles applied to the root element if variant="outlined" and color="secondary".

Rule name:outlinedSecondary


.MuiChip-root

Styles applied to the root element.

Rule name:root


.MuiChip-sizeMedium

Styles applied to the root element if size="medium".

Rule name:sizeMedium


.MuiChip-sizeSmall

Styles applied to the root element if size="small".

Rule name:sizeSmall



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