Přejít k obsahu

Komponenty

Výběr barvy

Vybere barvu a odešle ji spolu s okolním formulářem.

Použití

Základní

HTML
<bs:bsui-color-picker defaultValue="#7c3aed" />

Označené pole

Vzorek barvy, pole s hexadecimálním kódem a nápověda vysvětlující, kam se barva promítne.

Used for buttons, links and focus rings.
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>

Paleta značky

Několik výběrů vedle sebe, z nichž každý odesílá vlastní hodnotu.

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>

Zakázáno

Nativní vzorek barvy i pole s hexadecimálním kódem jsou uzamčené.

HTML
<bs:bsui-color-picker defaultValue="#64748b" disabled="true" />

Atributy

AtributTypVýchozí
name text —
defaultValue text #000000
disabled toggle false
nameAlt text —
onChange text —
value text —