Skip to main content
TextInput is Clementine DS’s single-line free-text input. It wraps Mantine’s TextInput component and re-exports it with Clementine token bindings applied through ClementineDSProvider. Every prop that Mantine’s TextInput accepts is available here — import from @clementine-ds/ui, not from @mantine/core directly.
Draft — TextInput is a Draft component. The token contract is defined and the component renders correctly, but full interaction-state coverage and aria-describedby wiring are still being verified. Do not treat the token values as stable for production theming yet.
Use TextInput for short, open-ended string values: names, email addresses, search queries, passwords, and similar single-line data. For multi-line input use Textarea. For a closed list of options use Select.

When to use

  • You need to capture a single line of free-form text from the user.
  • The field maps to a value with no fixed set of options (names, emails, URLs, passwords, search terms).
  • You need built-in support for a visible label, helper description, or inline error message without building your own wrapper.
  • The form needs to participate in native browser autofill or autocomplete behavior.

When not to use

  • Multi-line content — use Textarea instead.
  • Closed option lists — use Select so users pick from known values rather than type freehand.
  • Numeric-only input — consider a dedicated number input to get browser increment controls and correct keyboard behavior.
  • Rich text — a plain TextInput cannot format text; reach for a rich-text editor (not yet in this DS).

Usage

Controlled usage

Uncontrolled usage with FormData


Props

TextInputProps extends Mantine’s TextInputProps directly — all Mantine props are available. The table below covers the props you’ll use most often.

Interaction states

Clementine DS tokens cover all documented interaction states for TextInput.

Token contract

These design tokens fully cover TextInput. All tokens resolve through semantic aliases into the Clementine primitive palette.

Accessibility

  • Always supply a visible label prop. Use aria-label only as a last resort when no visible label is possible.
  • On error, Mantine sets aria-invalid="true" on the input and associates the error element via aria-describedby. Verify this wiring in your form — see the spec open item below.
  • Preserve native browser autofill by setting the name and autoComplete attributes appropriately.
  • The required prop sets the native required attribute, which screen readers announce. If you use withAsterisk instead (visual-only), communicate the requirement through the description prop as well.
  • TextInput supports all standard keyboard interactions — Tab to focus, Shift+Tab to move backwards, standard text editing keys inside the field.

Draft status

TextInput carries a Draft status as of clementine-ds@HEAD (2026-06-08). The following items are still open:
  • Full interaction-state coverage in Storybook (hover, focus, loading stories are missing).
  • aria-describedby → helper id wiring needs verification against the spec’s ARIA requirements.
  • Component token values (text-input.border.hover, text-input.fg.disabled, text-input.radius) are defined in the spec but not yet validated against the rendered output.
Do not build production-critical token overrides against this component until these items are resolved.