<Fab />

実例

Floating action button

The Floating action button is a Material Design component that displays a circular button. It is normally displayed in the lower right corner and is used to represent the primary action of the app.

It is displayed using the Fab component. To specify the position the position prop is used. To put an icon inside the button the Icon component can be used.

<Fab position='bottom right'>
  <Icon icon="md-face" />
</Fab>

In order for the Fab component to be fixed when scrolling the page, it needs to be put outside the page. This can be archived by rendering it in the renderFixed function of the Page component.

<Page renderFixed={() => <Fab />} />

Prop一覧

名前 型 / デフォルト値 概要
modifier string The appearance of the button. (翻訳中) Optional.
ripple bool If true, the button will have a ripple effect when tapped. (翻訳中) Optional.
position string The position of the button. Should be a string like "bottom right" or "top left". If this attribute is not defined it will be displayed as an inline element. (翻訳中) Optional.
disabled bool If true, the button will be disabled. (翻訳中) Optional.
onClick function This function will be called ones the button is clicked. (翻訳中) Optional.

プリセットのmodifier

Name 概要
mini Makes the ons-fab smaller. (翻訳中)

議論

お困りですか?

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

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

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