Jump to a component
Core · Forms
TextField
A labelled text input or text area. The label sits above, the hint below. Use highlight for a value that changed while editing.
Live, from @anicanon/sakuga 2.0.0
Sakuga for iOS and Android is coming
iOS
Coming soon
TextField for iOS is in the roughs. The tokens it will read are the ones on this page, the same on every platform.
Android
Coming soon
TextField for Android is in the roughs. The tokens it will read are the ones on this page, the same on every platform.
- Use it for
- Words a person types, on one line or in a text area: a name, a description, a search.
- Not for
- One choice from a listSelect
- A number stepped a unit at a timeNumberField
- Words kept as separate tagsTagList
- Studio's prompt, with who and where it bindsPromptComposer
- Writing to MakiMakiComposer
Guidelines
Motion: state changes fade with motion-fast; entrances use motion-base and ease-enter.
import { TextField } from '@anicanon/sakuga/ui';
export default function TextFieldExample() {
return (
<>
<TextField label="Name" value="Plaid overshirt" />
<TextField
label="Describe it"
multiline
value="An open plaid overshirt over a black tee."
hint="Garments, colours, materials."
/>
</>
);
}PropsTextFieldProps
iconIconNamevaluestringdefaultValuestringplaceholderstringmultilinebooleanrowsnumberminHeightnumberhighlightbooleantypestringrequiredbooleanreadOnlybooleanidstringonChange(text: string) => voidFrom FieldShellProps
labelstringhintstringoptionalbooleanhelp{ title?: string; text: ReactNode; }maxWidthnumberclassNamestringAn IconName is any of the names Icon lists.
Each token reads a role, and the role lands on a value in each theme. Change the role and every component that reads it follows.
Colour
field-labelTextField and Select: label.text-mutedneutral-600#5c5b67text-mutedneutral-400#a3a3a7field-hintTextField and Select: hint under the control.text-mutedneutral-600#5c5b67text-mutedneutral-400#a3a3a7field-bgTextField and Select: control fill.bg-canvasneutral-50#f6f6f8bg-canvasneutral-950#07070afield-borderTextField and Select: control edge.border-controlshade-a52rgba(11,10,16,0.52)border-controlwhite-a45rgba(255,255,255,0.45)field-fgTextField and Select: value.text-primaryneutral-925#0b0a10text-primaryneutral-0#fffffffield-placeholderTextField and Select: placeholder.text-mutedneutral-600#5c5b67text-mutedneutral-400#a3a3a7field-highlightTextField: a field that changed or needs attention.accentcamellia-600#c2335faccentcamellia-400#f4779fSpace and shape
field-gapgap-smfield-label-gapgap-smfield-control-min-heightsize-targetfield-control-padding-xinset-mdfield-control-radiusradius-smfield-control-inset-ring-widthline-hairlinefield-control-focus-inset-ring-widthline-strongfield-control-area-paddinginset-mdfield-control-area-min-heightfield-control-highlight-inset-ring-widthline-strongfield-wrap-icon-leftinset-mdfield-wrap-control-padding-leftfield-icon-sizeicon-size-smfield-help-target-sizefield-forced-edge-widthline-hairlinefield-forced-focus-widthline-strongType
field-label-fonttext-microfield-opt-font-weightweight-mediumfield-control-fonttext-bodyfield-control-placeholder-font-weightweight-regularfield-control-area-font-weightweight-regularfield-control-area-line-heighttext-body-line-heightfield-hint-fonttext-smallMotion
field-control-durationmotion-fastfield-control-easingease-standardChecked automatically with axe-core 4.11.4 against WCAG 2.2 A and AA, on the live preview above, in light and dark, on 26 October 2026.
- Result
- No issues found, in light or in dark.
- By design
- A text input (a text area with
multiline) that Tab reaches and that takes typing, named by the words oflabel(with "optional"), or byplaceholderwithout one, and described byhint;requiredadds "required", andreadOnlymakes it read-only.onChangegets the text as it is typed. The icon is hidden. - Not tested
- The automated check doesn't test keyboard use, focus order or what a screen reader says. The lines above are the design system's own account of them.