Simal UI
Components

Chip

A pill-shaped filter or tag that toggles itself on press.

This component does not use the theme. Its colours are hardcoded Tailwind greys and bg-white, not the semantic tokens, so it renders the same in dark mode as in light and sits wrong on the dark canvas. Switch the theme toolbar to see it. Everything else in the library reads background / foreground / muted; this one predates that and has not been converted.

Import

import { Chip } from '@simal/ui/nativewindui';

Props

PropValuesDefaultDescription
label"Option A"The chip text. Chip takes no children — the label is a prop.
variantfilled · outlined"filled"filled reacts to selection; outlined draws a static border and never shows a selected state.
selectedbooleanfalseSeeds the chip's own state. An initial value, not a controlled prop — later changes from the parent are ignored.
disabledbooleanfalseBlocks press and drops the chip to 40% opacity.
iconNode rendered before the label. Size it yourself; the chip applies no sizing of its own.
onPressFired with the new selected state after the chip has toggled itself.

Examples

Variants

With Icon

On this page