v-ons-select

セレクトボックスを表示するコンポーネントです。select 要素に使用できる属性の多くが ons-select 要素でも利用できます。

実例

Select input

The VOnsSelect component is used to display a select box with an arbitrary number of options.

There are several attributes that can be used to customize the behavior of the element. These are the same attributes as those that can be used for the regular HTML <select> element.

Please check the Onsen UI Reference documentation for a complete reference of the enabled attributes.

関連情報

名前 型 / デフォルト値 概要
autofocus Boolean ページロード時にこのセレクトボックスにフォーカスが移るようにします。 Optional.
disabled Boolean このセレクトボックスを無効化する場合に指定します。 Optional.
form String このセレクトボックスを、指定した form 要素に紐付けます。セレクトボックスを form 要素の外側に配置する際に使用します。 Optional.
multiple Boolean 選択肢の複数選択を有効にします。 Optional.
name String このセレクトボックスの名前を指定します。通常 form 要素と共に使用します。 Optional.
required Boolean このセレクトボックスを入力必須にする場合に指定します。通常 form 要素と共に使用します。 Optional.
select-id String このセレクトボックスが内部に持つ select 要素に与える ID を指定します。セレクトボックスの内容を動的に変更する必要がある場合に使用します。 Optional.
size Number 一度に表示する選択肢の個数を指定します。選択肢がこの属性で指定した個数よりも多い場合、スクロールが有効になります。 Optional.
Name 概要
material Displays a Material Design select input. (翻訳中)
underbar Displays a horizontal line underneath a select input. (翻訳中)

お困りですか?

Onsen UIに関する質問は、Stack Overflowにてonsen-uiタグを付与してください。Onsen UIチームはあなたの問題解決をお手伝いします。

バグ報告や機能要望については、GitHub Issuesに記載をお願いいたします。

あわせて、下記の情報も参考にしてください。