Field
field, field-label, field-description, and field-error help compose accessible form controls.
Usage
We'll only use this for account updates.
Invalid state
When the name matches a validation error key, the field sets data-invalid="true" so child helpers can react.
Please enter a valid email address.
Disabled field
This field is locked for your account.
Props
x-slate::field
| Prop | Type | Default | Description |
|---|---|---|---|
name |
string |
— | Validation key used to infer invalid state |
invalid |
bool |
null |
Force the invalid state |
disabled |
bool |
false |
Adds data-disabled="true" for child styling |
x-slate::field-error
| Prop | Type | Default | Description |
|---|---|---|---|
name |
string |
— | Validation key to read from the shared error bag |
message |
string |
null |
Manual error message override |
field-label and field-description are slot-only helpers that style text and inherit invalid / disabled state from the wrapping field.