Primitive / Atomstable
Chip
Compact pill-style tag for statuses and lightweight metadata.
@glinui/uiComponent: chip
Installation
Install from the package for shared ownership or from the registry for copy-paste control.
Package Manager
pnpm add @glinui/ui @glinui/tokensRegistry
pnpm dlx @glinui/cli@latest add chipUsage
Tones
NeutralInfoSuccessWarningDanger
TSX
1import { Chip } from "@glinui/ui"23export function Demo() {4 return (5 <div className="flex flex-wrap gap-2">6 <Chip>Neutral</Chip>7 <Chip tone="info">Info</Chip>8 <Chip tone="success">Success</Chip>9 <Chip tone="warning">Warning</Chip>10 <Chip tone="danger">Danger</Chip>11 </div>12 )13}
Glass
Preview
TSX
1import { Chip } from "@glinui/ui"23export function Demo() {4 return <Chip variant="glass">Preview</Chip>5}
Accessibility
- Non-interactive status label element by default.
- Use `aria-label` when chip meaning is not explicit from text.
ARIA Attributes
- `role="status"` optional for live status chips
Reduced Motion
Chip visual transitions are color-only and disabled with reduced motion.
Affected properties
background-colorborder-colorcolorAPI Reference
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
variant | "default" | "glass" | "outline" | "ghost" | No | default | Surface treatment. |
tone | "neutral" | "info" | "success" | "warning" | "danger" | No | neutral | Semantic text color. |
size | "sm" | "md" | "lg" | No | md | Height and horizontal padding scale. |
Source
Import directly from the package or browse the source on GitHub. Click any file to view it.
Generated API Snapshot
Beta
Generated API Snapshot
BetaAuto-extracted from TypeScript source in packages/ui/src/components/chip.tsx. This section is in beta and may lag behind hand-curated docs. Regenerate with pnpm --filter @glinui/docs api:generate.
Generated: 2026-02-19T17:59:28.468Z · Full index: /docs/api-metadata
Primary Props Type
ChipProps
ChipProps
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
size | "sm" | "md" | "lg" | No | "md" | Variant option from chipVariants. |
tone | "neutral" | "info" | "success" | "warning" | "danger" | No | "neutral" | Variant option from chipVariants. |
variant | "default" | "glass" | "outline" | "ghost" | No | "default" | Variant option from chipVariants. |