Przejdź do treści

Komponenty

Pole liczbowe

Pole liczbowe ze strzałkami i ograniczonym zakresem wartości.

Użycie

Podstawowy

HTML
<bs:bsui-number-field defaultValue="3" min="1" max="20" />

Krok dziesiętny

Zwiększanie o połowę zamiast o całe liczby.

HTML
<bs:bsui-number-field defaultValue="2.5" min="0" max="10" step="0.5" />

Ilość z etykietą

Nazwane pole z wyjaśnieniem poniżej, jak wpływa na cenę.

Each seat is billed monthly.
HTML
<bs:bsui-field>
  <bs:bsui-field-label text="Seats" />
  <bs:bsui-number-field name="seats" defaultValue="5" min="1" max="50" />
  <bs:bsui-field-description text="Each seat is billed monthly." />
</bs:bsui-field>

Wyłączone

Przyciski zmiany wartości i pole tekstowe są jednocześnie zablokowane.

HTML
<bs:bsui-number-field defaultValue="1" min="1" max="10" disabled="true" />

Atrybuty

AtrybutTypDomyślnie
defaultValue number —
min number —
max number —
step number 1
name text —
disabled toggle false
nameAlt text —
onChange text —
value text —