SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

On this page

fieldStackLayout

The single-column stacking layout shared by every field convenience wrapper's outermost host.

tsx
import { fieldStackLayout } from "@sdxc/ui/styles";

Usage

Composes the single-column stack — a 0.5rem gap between a field's own caption, control, and optional supporting text — for a host's mix prop. The gap clears the control's focus ring, drawn 2px off its edge and 3px wide. Compose a separate css() call for the wider gap between whole fields.

Signature

typescript
fieldStackLayout<Node extends Element = Element>(): MixinDescriptor<
	Node,
	[styles: CSSStyles],
	ElementProps
>

Returns a css() mixin ready for a host element's mix prop.

Examples

tsx
<div data-slot="date-field" mix={[fieldStackLayout(), mix]}>
	<Label htmlFor={handle.id}>{label}</Label>
	<Input id={handle.id} />
</div>;
@sdxc/ui

Can’t find it? Contact us