Hone UI
Components

Chip

A compact element for a tag, a filter or a choice.

Chip shows a short label. It can be pressed, deleted or carry an avatar or an icon.

import Chip from '@hone-ui/react/Chip';

Examples

Default
Primary
Outlined
Small
A
Ada
<Chip label="Default" />
<Chip label="Primary" color="primary" />
<Chip label="Outlined" variant="outlined" color="secondary" />
<Chip label="Small" size="small" />
<Chip label="Ada" avatar={<Avatar>A</Avatar>} />

Props

PropTypeDefaultDescription
labelReactNodeThe text.
color'default', 'primary', 'secondary', 'error', 'info', 'success', 'warning', any palette key'default'The color.
variant'filled', 'outlined''filled'A fill or a border.
size'small', 'medium''medium'The height: 24 or 32 pixels in the Material look.
avatar, iconelementShown before the label. avatar wins.
onClick(event) => voidMakes the chip a button. Gets the real click event.
clickablebooleanPressable without onClick, or not pressable with it.
hrefstringRenders a link.
onDelete(event) => voidShows a delete icon. Backspace and Delete call it too.
deleteIconelementReplaces the delete icon.
disabledbooleanfalseDisables the chip.
skipFocusWhenDisabledbooleanfalseTakes a disabled chip out of the tab order.
sx, className, style, refStandard.

Notes

  • children, component and slots are not supported. Use label and href.
  • The delete icon is not focusable by itself. Focus the chip and press Backspace or Delete.

Accessibility

A clickable chip is a button. A deletable chip that is not clickable is a focusable element with role="button". Name the delete action when the label alone does not make it clear.

On this page