Skip to content
Somewhere design system

Forms

FormField

A pattern that wires a label, a control, and an optional error together. It composes Input and Message and adds no styling beyond the sw-field layout.

import { FormField, Input } from "@somewhere-com/ds";

<FormField label="Password" error={error}>
  <Input type="password" />
</FormField>;

Props

A form-level status, like “Access granted”, is a standalone Message outside any field.

Examples

Rendered from the Storybook stories. To change props and see every state live, open FormField in Storybook.

Default
With Error
Sign In Form

Access granted. Redirecting…