コンポーネント
入力
一般的な入力タイプに対応する1行テキストフィールド。
使い方
基本
HTML
<bs:bsui-input placeholder="Project name" />種類
種類によって、ブラウザーが適用するキーボード操作と検証が決まります。
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>必須
必須の入力欄にはrequired属性とaria-required属性が設定されます。
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>入力済みと無効
既定値を設定し、同じ値のまま編集できない状態にします。
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>属性
| 属性 | タイプ | デフォルト |
|---|---|---|
type | text | |
name | text | — |
placeholder | text | — |
disabled | toggle | false |
required | toggle | false |
defaultValue | text | — |
nameAlt | text | — |
onChange | text | — |
value | text | — |
autocomplete | text | — |