Category

Patterns

Component

Form field

A wrapper for consistent forms: Label (with htmlFor), optional description, child (Input / Select / Textarea), and an error message. Uses space-y-2 spacing.

Basic

With description and error

We use this only for notifications.

Specification

  • Label: Uses htmlFor when an id is present; otherwise renders a span with text-sm font-medium
  • Error: text-ds-feedback-danger, role="alert"
  • Spacing: space-y-2 between label, description, child, and error