Skip to content

Latest commit

 

History

History
87 lines (53 loc) · 3.17 KB

buttons.md

File metadata and controls

87 lines (53 loc) · 3.17 KB
title
ion-buttons

import Props from '@ionic-internal/component-api/v8/buttons/props.md'; import Events from '@ionic-internal/component-api/v8/buttons/events.md'; import Methods from '@ionic-internal/component-api/v8/buttons/methods.md'; import Parts from '@ionic-internal/component-api/v8/buttons/parts.md'; import CustomProps from '@ionic-internal/component-api/v8/buttons/custom-props.mdx'; import Slots from '@ionic-internal/component-api/v8/buttons/slots.md';

<title>ion-buttons: Toolbar Element with Named Slots for Buttons</title>

import EncapsulationPill from '@components/page/api/EncapsulationPill';

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

import Basic from '@site/static/usage/v8/buttons/basic/index.md';

Buttons Placement

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

Slot Description
start Positions to the left of the content in LTR, and to the right in RTL.
end Positions to the right of the content in LTR, and to the left in RTL.
secondary Positions element to the left of the content in ios mode, and directly to the right in md mode.
primary Positions element to the right of the content in ios mode, and to the far right in md mode.

import Placement from '@site/static/usage/v8/buttons/placement/index.md';

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.

import Types from '@site/static/usage/v8/buttons/types/index.md';

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.

:::

import CollapsibleLargeTitleButtons from '@site/static/usage/v8/title/collapsible-large-title/buttons/index.md';

Properties

Events

Methods

CSS Shadow Parts

CSS Custom Properties

Slots