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.

Demos

For examples and details on the usage of this React component, visit the component demo pages:

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

The following class names are useful for styling with CSS (the state classes are marked).
To learn more, visit the component customization page.


.MuiChip-rootroot

Styles applied to the root element.


.MuiChip-sizeSmallsizeSmall

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


.MuiChip-sizeMediumsizeMedium

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


.MuiChip-colorErrorcolorError

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


.MuiChip-colorInfocolorInfo

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


.MuiChip-colorPrimarycolorPrimary

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


.MuiChip-colorSecondarycolorSecondary

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


.MuiChip-colorSuccesscolorSuccess

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


.MuiChip-colorWarningcolorWarning

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


.Mui-disableddisabledSTATE

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


.MuiChip-clickableclickable

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


.MuiChip-clickableColorPrimaryclickableColorPrimary

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


.MuiChip-clickableColorSecondaryclickableColorSecondary

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


.MuiChip-deletabledeletable

Styles applied to the root element if onDelete is defined.


.MuiChip-deletableColorPrimarydeletableColorPrimary

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


.MuiChip-deletableColorSecondarydeletableColorSecondary

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


.MuiChip-outlinedoutlined

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


.MuiChip-filledfilled

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


.MuiChip-outlinedPrimaryoutlinedPrimary

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


.MuiChip-outlinedSecondaryoutlinedSecondary

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


.MuiChip-filledPrimaryfilledPrimary

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


.MuiChip-filledSecondaryfilledSecondary

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


.MuiChip-avataravatar

Styles applied to the avatar element.


.MuiChip-avatarSmallavatarSmall

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


.MuiChip-avatarMediumavatarMedium

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


.MuiChip-avatarColorPrimaryavatarColorPrimary

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


.MuiChip-avatarColorSecondaryavatarColorSecondary

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


.MuiChip-iconicon

Styles applied to the icon element.


.MuiChip-iconSmalliconSmall

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


.MuiChip-iconMediumiconMedium

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


.MuiChip-iconColorPrimaryiconColorPrimary

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


.MuiChip-iconColorSecondaryiconColorSecondary

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


.MuiChip-labellabel

Styles applied to the label span element.


.MuiChip-labelSmalllabelSmall

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


.MuiChip-labelMediumlabelMedium

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


.MuiChip-deleteIcondeleteIcon

Styles applied to the deleteIcon element.


.MuiChip-deleteIconSmalldeleteIconSmall

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


.MuiChip-deleteIconMediumdeleteIconMedium

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


.MuiChip-deleteIconColorPrimarydeleteIconColorPrimary

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


.MuiChip-deleteIconColorSecondarydeleteIconColorSecondary

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


.MuiChip-deleteIconOutlinedColorPrimarydeleteIconOutlinedColorPrimary

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


.MuiChip-deleteIconOutlinedColorSecondarydeleteIconOutlinedColorSecondary

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


.MuiChip-deleteIconFilledColorPrimarydeleteIconFilledColorPrimary

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


.MuiChip-deleteIconFilledColorSecondarydeleteIconFilledColorSecondary

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


.Mui-focusVisiblefocusVisibleSTATE

State class applied to the root element if keyboard focused.


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