Component catalog
Browse the public controls by interaction purpose. Every result links to generated API facts, accessibility behavior, source, and exhaustive stories.
Browse the public controls by interaction purpose. Every result links to generated API facts, accessibility behavior, source, and exhaustive stories.
Wrap a related cluster of content — account details, a terms toggle, a storage meter — behind one titled, visually-distinct card, so a screen reads as sections rather than an undifferentiated list.
import { GroupBox } from "@liquidify/react/group-box"| Prop | Type | Default | Description |
|---|---|---|---|
| children required | ReactNode | — | The grouped content (SwiftUI `{ … }` content closure, children role: `content`) — content-agnostic: hosts `LabeledContent` rows, a `Toggle`, a `ProgressIndicator`, or a nested `GroupBox`. |
| className | string | undefined | — | Optional additional CSS class merged into the glass surface class. The supported per-instance customisation seam: override any `--lq-*` custom property from this class's CSS — the token cascade the engine reads (ADR-0004). No raw inline style is involved, so this stays ADR-0003 clean. |
| label | ReactNode | — | The card's title (SwiftUI `GroupBox(_:content:)` / `GroupBox(content:label:)`). A `string` routes through the `TextLabel` guard into an internal `Text` (`variant="headline"`, `weight="semibold"`, `color="secondary"` by default, overridable per-instance via `labelProps`) carrying the id the root's `aria-labelledby` targets. A `ReactNode` (e.g. an icon+text composite) passes through unwrapped so the caller keeps ownership of its own typography and icon (`labelProps` has no effect on this shape). Omitted, or supplied as a non-renderable value (`false` / `null` / `true` / `""`), renders no label region and no `aria-labelledby` — an intentionally unnamed group. |
| labelProps | LabelProps | undefined | — | Per-instance typography override for a `string` `label` (ADR-0028, charter §2) — spread last onto the internal `Text` so an explicit value wins over the `headline`/`semibold`/`secondary` default. No effect when `label` is a `ReactNode` (passes through `TextLabel` unwrapped) or omitted/non-renderable. |
| ref | Ref<HTMLDivElement> | undefined | — | Forwarded ref to the rendered element — the component's native root (or the merged child element on a component that opts into {@link SlottableProps}). Generic over `E` (charter `docs/api-conventions.md` §4 rule 1, default `HTMLElement`) so a component with a polymorphic root (Link's navigation / action mode union, Text's `as`) can instantiate the concrete element per variant instead of leaving every consumer with a widened `Ref<HTMLElement>`. A component that does not narrow simply inherits the `HTMLElement` default — source-compatible with every pre-existing non-generic `extends ControlProps`. |
Group Box preserves the semantics of its content and should be given a clear accessible label when its visible content does not provide one.
| Name | Value |
|---|---|
| --lq-color-bg-primary | #ffffff |
| --lq-color-bg-secondary | #f2f2f7 |
| --lq-color-bg-secondary- | #f2f2f7 |
| --lq-color-bg-tertiary- | #e5e5ea |
| --lq-color-label- | #000000#ffffffrgba(60, 60, 67, 0.6)rgba(235, 235, 245, 0.6)rgba(60, 60, 67, 0.3)rgba(235, 235, 245, 0.3)rgba(60, 60, 67, 0.18)rgba(235, 235, 245, 0.16)rgba(60, 60, 67, 0.8)rgba(235, 235, 245, 0.8)rgba(60, 60, 67, 0.4)rgba(235, 235, 245, 0.36) |
| --lq-color-label-secondary | Component-defined value |
| --lq-color-system-gray-4-default-dark | #3a3a3c |
| --lq-color-system-gray-5-default-dark | #2c2c2e |
| --lq-glass- | 440.71.15var(--lq-segmented-control-indicator-blur)calc(var(--lq-glass-material-blur) * 8)var(--lq-shadow-presentational) |
| --lq-group-box-label-gap | var(--lq-space-12) |
| --lq-group-box-pad | var(--lq-space-16) |
| --lq-group-box-track-h | Component-defined value |
| --lq-radius-14 | 0.875rem |
| --lq-space- | 0.0625rem0.125rem0.25rem0.5rem0.75rem1rem1.25rem1.5rem2rem2.5rem3rem3.5rem |