コンテンツへスキップ

コンポーネント

電話番号入力

国の選択と書式設定に対応した電話番号フィールド。

使い方

基本

HTML
<bs:bsui-phone-input defaultCountry="DE" />

カスタムプレースホルダー

初期表示の国を変え、その国の形式に合わせたサンプル番号を表示します。

HTML
<bs:bsui-phone-input name="phone" defaultCountry="GB" placeholder="7700 900123" />

ラベル付きフィールド

番号を収集する理由をヘルプテキストで説明します。

Used only for delivery updates.
HTML
<bs:bsui-field>
  <bs:bsui-field-label text="Mobile number" />
  <bs:bsui-phone-input name="mobile" defaultCountry="US" />
  <bs:bsui-field-description text="Used only for delivery updates." />
</bs:bsui-field>

無効

国のメニューと番号フィールドが一緒にロックされています。

HTML
<bs:bsui-phone-input defaultCountry="DE" disabled="true" />

属性

属性タイプデフォルト
name text —
placeholder text Phone number
defaultCountry text US
disabled toggle false
nameAlt text —
onChange text —