Memorisely

Components

Input

Single-line text entry. Always pair with a Label; match height to default buttons (h-9).

When to use

  • Names, emails, short free text, search fields.
  • Use Select when the value must come from a fixed list.
  • Use a textarea (or sheet field) for multi-line notes , not Input.

Anatomy

Label above, 8px gap, then field. Labels are 12px muted , never bold competing with the value.

Default

White field, soft dual shadow, placeholder in muted foreground.

Email

Use the correct type so mobile keyboards and browsers help.

Invalid

Set aria-invalid when validation fails; show the error in copy under the field.

Enter a valid email address.

Disabled

Read-only context , explain nearby if the user expected to edit.

Best practice

Do

  • ✓Associate every input with a Label via htmlFor / id.
  • ✓Use formFieldStackClass for consistent label → control spacing.
  • ✓Prefer placeholders as examples, not as the only label.

Don’t

  • ×Omit labels and rely on placeholder alone.
  • ×Mix custom heights that break alignment with buttons.
  • ×Show errors only with colour , always add text.

components/ui/input.tsx · Label formFieldStackClass