Chip
A compact chip for a filter, an action or a removable tag, with an optional symbol.
import { Chip } from "@plexui/react-native"The web has no chip; a filter chip does what Toggle Group does with items of text.
Examples
Overview
Filters
Removable
Disabled
Platforms
| iOS 26 | Android | |
|---|---|---|
| Native component | None: drawn as the filter capsules of iOS apps | Chip (assist, filter, input) |
| Look | A 40pt gray capsule (tag) or a 44pt glass one (glass), filled in the accent when selected; in a Toolbar.Row its label is the segmented control's there, 15pt Medium | A 32dp capsule in a light gray fill, or Material's elevated chip (glass: surfaceContainerLow under a level 1 shadow), filled in the Plex primary when selected |
API
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | The label. Without it a chip of an `icon` alone is a circle, named by `accessibilityLabel` |
selected | boolean | — | A filter chip's state (controlled). Leave it, defaultSelected and onSelectedChange out for an action chip |
defaultSelected | boolean | — | A filter chip's initial state (uncontrolled) |
onSelectedChange | (selected: boolean) => void | — | Called when a filter chip is toggled |
onPress | () => void | — | Called on a press: an action chip's action |
onLongPress | () => void | — | A touch and hold on the chip (half a second): what a word means, say. Screen readers reach it as a named action |
longPressLabel | string | — | The name of the touch and hold for screen readers |
icon | ReactNode | — | A symbol before the label |
trailingIcon | ReactNode | — | A symbol after the label; it takes the chevron's place on a menu chip |
menu | boolean | "menu" | "listbox" | "dialog" | — | The chip opens a menu: a chevron after the label and aria-haspopup for screen readers; true is a menu, "listbox" and "dialog" name what it opens. A menu chip is read as a button |
expanded | boolean | — | Whether the chip's menu is open (aria-expanded) |
accessibilityLabel | string | — | Name of the chip for screen readers, in place of its label |
appearance | "tag" | "glass" | "tag" | iOS: a 40pt capsule of the gray fill, or a 44pt glass capsule for filters over content. In a Toolbar.Row its label is the segmented control's there, 15pt Medium (Calendar's segments), at the same 44pt, so a bar's rows of segments and of filters read alike. Android draws its chip with either, a glass one as Material's elevated chip (surfaceContainerLow under a level 1 shadow), which stands apart from what is under it |
selectionColor | "accent" | "primary" | "accent" | iOS: the color a chosen chip takes, the app's accent (its tint) or the Plex primary. Android keeps Material's selected chip in the primary |
size | "md" | "sm" | "md" | iOS: `sm` is a 36pt chip with 15/20 type, for a row of filters under a bar. Android keeps Material's 32dp chip |
removeStyle | "token" | "button" | "token" | iOS: how an input chip is removed: as Apple's tokens, with no cross (a press selects it, a second press or Delete on the web removes it), or by a cross drawn as the field's clear button. Android keeps its cross |
onRemove | () => void | — | An input chip: called when the reader takes it back (Android's cross; on iOS see `removeStyle`) |
removeLabel | string | "Remove" | The name of the remove action: the cross's name, or a token's VoiceOver action on iOS |
disabled | boolean | false | Dims the chip and takes no presses |
testID | string | — | Test id |
style | StyleProp<ViewStyle> | — | Style of the chip's outer box (its touch target) |
useChipMetrics
useChipMetrics({ size, appearance }) returns { height, target, gap } for a part of the app's own beside a chip:
height: the chip as drawn. On Android it is 32 (Material's chip). On iOS it is 40 for atag, 44 for aglasscapsule and 36 forsize="sm".target: the touch target the chip lays out in, centered: 48 on Android, 44 on iOS. A tip anchored to the chip as drawn stands(target - height) / 2in from the chip's box.gap: 8 between two chips in a row, Material's chip spacing. iOS has no chips of its own, and the kit spaces them the same.