Komponenty
Začiarkavacie políčko
Binárna voľba, ktorá podporuje aj neurčitý stav.
Použitie
Základná
HTML
<bs:bsui-checkbox label="Email me about new releases" defaultChecked="true" />Zoznam zaškrtávacích políčok
Každé políčko sa odosiela pod vlastným názvom a jedno z nich nemožno vypnúť.
HTML
<bs:bsui-stack direction="column" gap="3">
<bs:bsui-checkbox name="deploys" label="A deploy finishes" defaultChecked="true" />
<bs:bsui-checkbox name="failures" label="A build fails" defaultChecked="true" />
<bs:bsui-checkbox name="mentions" label="Someone mentions me" />
<bs:bsui-checkbox name="receipts" label="Billing receipts" defaultChecked="true" disabled="true" />
</bs:bsui-stack>Neurčené
Nadradené políčko označuje čiastočný výber, kým sa nezhodnú všetky podriadené oblasti.
HTML
<bs:bsui-stack direction="column" gap="3">
<bs:bsui-checkbox label="All repository scopes" indeterminate="true" />
<bs:bsui-checkbox name="read" label="Read code and issues" defaultChecked="true" />
<bs:bsui-checkbox name="write" label="Push commits" />
</bs:bsui-stack>Neplatný stav
Zaškrtávacie políčko preberá chybovú správu zo svojho poľa rovnako ako každý iný ovládací prvok.
Accept the terms to continue.
HTML
<bs:bsui-field invalid="true">
<bs:bsui-checkbox name="terms" label="I agree to the terms of service" />
<bs:bsui-field-error text="Accept the terms to continue." />
</bs:bsui-field>Atribúty
| Atribút | Typ | Predvolené |
|---|---|---|
defaultChecked | toggle | false |
indeterminate | toggle | false |
disabled | toggle | false |
name | text | — |
value | text | on |
label | richtext | — |
bindText | text | — |
nameAlt | text | — |
onChange | text | — |
checked | text | — |