Komponente
Izbirnik barv
Izbere barvo in jo pošlje skupaj z okoliškim obrazcem.
Uporaba
Osnovno
HTML
<bs:bsui-color-picker defaultValue="#7c3aed" />Označeno polje
Barvni vzorec, šestnajstiško polje in besedilo pomoči, ki pojasnjuje, kam se uporabi barva.
HTML
<bs:bsui-field>
<bs:bsui-field-label text="Accent color" />
<bs:bsui-color-picker name="accent" defaultValue="#0ea5e9" />
<bs:bsui-field-description text="Used for buttons, links and focus rings." />
</bs:bsui-field>Barvna paleta znamke
Več izbirnikov v eni vrstici, vsak pošlje svojo vrednost.
HTML
<bs:bsui-stack direction="row" gap="4" align="start">
<bs:bsui-field>
<bs:bsui-field-label text="Primary" />
<bs:bsui-color-picker name="primary" defaultValue="#111827" />
</bs:bsui-field>
<bs:bsui-field>
<bs:bsui-field-label text="Accent" />
<bs:bsui-color-picker name="accent" defaultValue="#f59e0b" />
</bs:bsui-field>
</bs:bsui-stack>Onemogočeno
Vgrajeni barvni vzorec in šestnajstiško polje sta oba zaklenjena.
HTML
<bs:bsui-color-picker defaultValue="#64748b" disabled="true" />Atributi
| Atribut | Tip | Privzeto |
|---|---|---|
name | text | — |
defaultValue | text | #000000 |
disabled | toggle | false |
nameAlt | text | — |
onChange | text | — |
value | text | — |