Components · Labels & Badges
Chip
Compact label chip, optionally dismissible.
import { Chip } from '@nexub/react';Playground
Props
<Chip key={c}>…</Chip>Examples
Default
Dismissible
States
- DesignEngineeringProduct
default - DesignEngineeringProduct
size="sm" - DesignEngineeringProduct
size="md" - DesignEngineeringProduct
tone="neutral" - DesignEngineeringProduct
tone="info" - DesignEngineeringProduct
tone="success" - DesignEngineeringProduct
tone="warning" - DesignEngineeringProduct
tone="danger" - DesignEngineeringProduct
tone="leap" - DesignEngineeringProduct
tone="bookub" - DesignEngineeringProduct
tone="payub"
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| onRemove | (() => void) | — | When provided, renders a dismiss button that calls this handler. |
| removeLabel | string | — | Accessible name of the dismiss button (5.2), e.g. "Remove Bug". Use it when several chips sit together. |
| size | 'sm' | 'md' | 'md' | Controls chip size. |
| tone | 'neutral' | 'info' | 'success' | 'warning' | 'danger' | 'leap' | 'bookub' | 'payub' | 'founderub' | 'neutral' |
Design tokens
Chip reads these component tokens. Each one is unset by default and falls back to the semantic role it aliases, so nothing changes until you set it. Set one on any element to restyle every Chip below it, and leave the roles other components share alone. See the three token tiers.
The neutral tone; the other tones keep their container colours.
| Token | Aliases | Notes |
|---|---|---|
| --chip-neutral-bg | --color-surface-container-low | — |
| --chip-neutral-fg | --color-on-surface-variant | — |
| --chip-neutral-border | --color-outline-variant | — |
| --chip-radius | --shape-control | The signature theme's --shape-pill comes first when it is set. |
/* One area of your app */
.checkout {
--chip-neutral-bg: var(--color-secondary);
}On iOS & Android: Chip
import { Chip } from '@nexub/react-native';
<Chip label="Food" selected={on} onPress={toggle} />Web vs mobile
Same tokens and prop names. Where the platforms differ:
| Web | iOS & Android | |
|---|---|---|
| Hit area | Visual size; xs/sm controls meet WCAG 2.5.8 (24px). | Always 44pt, extended with hitSlop when the visual is smaller. |
Interactive preview of @nexub/react-native rendered for the web. Native chrome (switches, pickers, Liquid Glass) looks like the platform on a device.
On device

iPhone (iOS simulator)

Pixel (Android emulator)
Screenshots from the latest CI run of the showcase app; the live frame renders the same code for the web.
Chip props
| Prop | Type | Default | Description |
|---|---|---|---|
| labelrequired | string | — | — |
| selected | boolean | — | Toggle state (filter chips). |
| onPress | () => void | — | — |
| onRemove | () => void | — | Shows a remove button (its label is messages.remove). |
| leadingIcon | React.ComponentType<NativeIconProps> | — | — |
| disabled | boolean | — | — |
| style | StyleProp<ViewStyle> | — | — |