Siirry sisältöön

Komponentit

Syöte

Yksirivinen tekstikenttä kaikkiin yleisiin syöttötyyppeihin.

Käyttö

Perus

HTML
<bs:bsui-input placeholder="Project name" />

Tyypit

Tyyppi määrittää näppäimistökäyttäytymisen ja selaimen käyttämän tarkistuksen.

HTML
<bs:bsui-stack direction="column" gap="3" align="stretch">
  <bs:bsui-input type="email" placeholder="ada@example.com" />
  <bs:bsui-input type="url" placeholder="https://acme.com" />
  <bs:bsui-input type="tel" placeholder="+49 30 123456" />
  <bs:bsui-input type="search" placeholder="Search components" />
</bs:bsui-stack>

Pakollinen

Pakollisissa syötekentissä on required- ja aria-required-määritteet.

Required. Pick the repository the deploy runs from.
HTML
<bs:bsui-field>
  <bs:bsui-field-label text="Repository" />
  <bs:bsui-input name="repository" placeholder="acme/website" required="true" />
  <bs:bsui-field-description text="Required. Pick the repository the deploy runs from." />
</bs:bsui-field>

Esitäytetty ja käytöstä poistettu

Oletusarvo sekä sama arvo muokkauksen ollessa pois käytöstä.

HTML
<bs:bsui-stack direction="column" gap="3" align="stretch">
  <bs:bsui-input defaultValue="acme-production" />
  <bs:bsui-input defaultValue="acme-production" disabled="true" />
</bs:bsui-stack>

Määritteet

AttribuuttiTyyppiOletusarvo
type text email password url tel search text
name text —
placeholder text —
disabled toggle false
required toggle false
defaultValue text —
nameAlt text —
onChange text —
value text —
autocomplete text —