v-ons-button

ボタン用コンポーネント。ツールバーにボタンを設置する場合は、ons-toolbar-buttonもしくはons-back-buttonコンポーネントを使用します。

実例

Buttons

Buttons are created using the VOnsButton component.

<v-ons-button>Tap me</v-ons-button>

The button will automatically select the style based on the platform. On Android it will be a Material Design button with a ripple effect.

Adding actions

A button is no good if it doesn’t do anything. To bind an action to a button the @click event is used.

<Button @click="handleClick($event)">Tap me</Button>

Modifiers

The appearance of the button can be changed with the modifier prop.

Available props are: quiet, outline, cta and large.

関連情報

名前 型 / デフォルト値 概要
disabled Boolean ボタンを無効化する場合は指定します。 Optional.
modifier String ボタンの表現を指定します。 Optional.
ripple Boolean If this attribute is defined, the button will have a ripple effect. (翻訳中) Optional.
Name 概要
outline アウトラインを持ったボタンを表示します。
light 目立たないボタンを表示します。
quiet 枠線や背景が無い文字だけのボタンを表示します。
cta 目立つボタンを表示します。
large 横いっぱいに広がる大きなボタンを表示します。
large--quiet 横いっぱいに広がるquietボタンを表示します。
large--cta 横いっぱいに広がるctaボタンを表示します。
material マテリアルデザインのボタン
material--flat マテリアルデザインのフラットボタン

お困りですか?

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

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

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