Skip to main content

Chip

Chips are compact elements that represent an input, attribute, or action.

Idle

Label

Label

Hover

Label

Label

Hover remove

Label

Label

Press

Label

Label

Disabled

Label

Label

Basic usage​



import { Chip } from '@streamelements/frontend-ui';
...
<Chip.Root isDraggable>
Label
<Chip.Remove onClick={removeFromList} />
</Chip.Root>
...

Label

API​

The Chip component exposes the following props for style changes:

Root​

Name

Type

Default value

Description

asChildboolean–
Change the component to the HTML tag or custom component of the only child. This will merge the original component props with the props of the supplied element/component and change the underlying DOM node.
isDraggableboolean–
Renders an icon at the start of the chip. Drag implementation is up to the consumer to implement.
isClickableboolean–
Changes the cursor when hovering over the whole component to be pointer
cssCSS–
Override styles
disabledbooleanfalse
Disables interaction with the chip. Passed down to the remove button as well.

Remove​

Name

Type

Default value

Description

disabledbooleanfalse
Disables interaction with the button
cssCSS–
Override styles