Componenten
Veld
Groepeert een bedieningselement met het label, de beschrijving en de foutmelding.
Gebruik
Basis
We only use this for receipts.
HTML
<bs:bsui-field>
<bs:bsui-field-label text="Email address" />
<bs:bsui-input type="email" placeholder="you@example.com" />
<bs:bsui-field-description text="We only use this for receipts." />
</bs:bsui-field>Ongeldige status
Door het veld als ongeldig te markeren, verandert de kleur van het besturingselement en verschijnt het bericht eronder.
Enter an address with a domain, like ada@example.com.
HTML
<bs:bsui-field invalid="true">
<bs:bsui-field-label text="Work email" />
<bs:bsui-input type="email" defaultValue="ada@example" />
<bs:bsui-field-error text="Enter an address with a domain, like ada@example.com." />
</bs:bsui-field>Vereist
De vereiste staat in de helptekst uitgelegd, zodat het label kort kan blijven.
Required. This name appears on every invoice.
HTML
<bs:bsui-field>
<bs:bsui-field-label text="Workspace name" />
<bs:bsui-input placeholder="Acme Production" required="true" />
<bs:bsui-field-description text="Required. This name appears on every invoice." />
</bs:bsui-field>Uitgeschakeld
Schakel het veld en het besturingselement erin uit, zodat de hele rij vergrendeld oogt.
The URL is fixed once the workspace is created.
HTML
<bs:bsui-field disabled="true">
<bs:bsui-field-label text="Workspace URL" />
<bs:bsui-input defaultValue="acme.blockstudio.dev" disabled="true" />
<bs:bsui-field-description text="The URL is fixed once the workspace is created." />
</bs:bsui-field>Keuzeveld
Een veld groepeert besturingselementen op dezelfde manier als één invoerveld.
HTML
<bs:bsui-field invalid="true">
<bs:bsui-field-label text="Deploy target" />
<bs:bsui-radio-group orientation="horizontal">
<bs:bsui-radio value="staging" label="Staging" />
<bs:bsui-radio value="production" label="Production" />
</bs:bsui-radio-group>
<bs:bsui-field-error text="Pick a target before deploying." />
</bs:bsui-field>Opbouw
Veld bestaat uit de onderstaande blokken. Elk blok is zelfstandig en wordt alleen binnen het bovenliggende blok weergegeven.
bsui/fieldbsui/field-descriptionbsui/field-errorbsui/field-label
Attributen
| Attribuut | Type | Standaard |
|---|---|---|
name | text | — |
invalid | toggle | false |
disabled | toggle | false |
bsui/field-description
| Attribuut | Type | Standaard |
|---|---|---|
text | richtext | — |
bsui/field-error
| Attribuut | Type | Standaard |
|---|---|---|
text | richtext | — |
bsui/field-label
| Attribuut | Type | Standaard |
|---|---|---|
text | richtext | — |