Components Forms
Field
A label, a control, and a description or an error under it.
$ pyblade ui:add field
With a description
With an error
Props
Written as attributes of <pb-ui.field>; put a colon before one to pass it a Python value, as in :items="items". A slot is written <pb-slot:name>.
| Name | Type | Default | Description |
|---|---|---|---|
| label | str | "" | The label |
| for | str | "" | The id of the control the label is for |
| description | str | "" | A hint under the control |
| error | str | "" | An error, shown instead of the description; e.g. :error="form.email.errors.0" |
| class | str | "" | Added to the classes of the component. Every other attribute is spread on it too. |