Skip to main content
Version: v6

ion-buttons

scoped

The Buttons component is a container element. It should be used inside of a toolbar and can contain several types of buttons, including standard buttons, menu buttons, and back buttons.

Basic Usage

Buttons Placement

Buttons can be positioned inside of the toolbar using a named slot. The below chart has a description of each slot.

SlotDescription
startPositions to the left of the content in LTR, and to the right in RTL.
endPositions to the right of the content in LTR, and to the left in RTL.
secondaryPositions element to the left of the content in ios mode, and directly to the right in md mode.
primaryPositions element to the right of the content in ios mode, and to the far right in md mode.

Types of Buttons

A button in a toolbar is styled to be clear by default, but this can be changed using the fill property on the button. The properties included on back button and menu button in this example are for display purposes; see their respective documentation for proper usage.

Collapsible Buttons

The collapse property can be set on the buttons to collapse them when the header collapses. This is typically used with collapsible large titles.

info

This feature is only available for iOS.

Properties

collapse

Descriptiontrueを指定すると、ツールバーが最初のツールバーでない場合、親ツールバーが完全に折り畳まれたときにボタンが消えます。ツールバーが最初のツールバーである場合、ボタンは隠され、すべてのツールバーが完全に折りたたまれたときにのみ表示されます。 ion-headercollapsetrueに設定したios` modeにのみ適用されます。 通常、Collapsible Large Titlesに使用されます。
Attributecollapse
Typeboolean
Defaultfalse

Events

No events available for this component.

Methods

No public methods available for this component.

CSS Shadow Parts

No CSS shadow parts available for this component.

CSS Custom Properties

No CSS custom properties available for this component.

Slots

No slots available for this component.