Field
src/lib/components/field.tsx·size (form · compact) · width (sm · md · lg · full) · hint · error
Guide
tentativeWhen to use
- A label, an optional hint and the control under them.
formfor configuration forms;compactfor notification settings.
Do
- When a Field shows an
error, passinvalidto its control too, so the border matches. - Keep the hint when there is an error — it still says what the field wants.
- Mark optional fields with
optional; required is the unmarked default (show required vs optional — PRD 01). - Use
statusfor what the user must see without opening a hint:checkingwhile a localized check runs,successwhen it passed,disabled-reasonfor what enables a disabled control,notefor a neutral explanation such as a value cleared by a dependency.
Don't
- Don't put “(optional)” in the label text — use
optional. - Don't explain a disabled control only through its placeholder — give a
disabled-reasonstatus. - Don't show a status and an error together; the error replaces the status line.
Open
- Error and status styling have no Figma source.
- Exact status wording per check waits on Bam's answer about which Hugging Face outcomes can be told apart (plan, Bam 1).
Related: TextInput, SelectSources: src/lib/components/field.tsx · docs/product/configuration-redesign-plan.md · docs/product/prd-01-inference-custom-configuration.md
Run name (optional)
Human-readable name for your reference
size=form width=lg + hint
Model repository
Use the format owner/model.
Use the format owner/model, e.g. meta-llama/Llama-3.1-8B-Instruct.
size=form width=lg + error
Hardware and GPU count
size=form width=md, no hint
GPU memory
Per GPU.
size=form width=full + suffix
size=compact width=sm + verified input
Phone number
Enter a valid phone number.
size=compact width=sm + error