You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: versioned_docs/version-v8/api/accordion.md
+29-20Lines changed: 29 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
---
2
-
title: "ion-accordion"
2
+
title: 'ion-accordion'
3
3
---
4
+
4
5
import Props from '@ionic-internal/component-api/v8/accordion/props.md';
5
6
import Events from '@ionic-internal/component-api/v8/accordion/events.md';
6
7
import Methods from '@ionic-internal/component-api/v8/accordion/methods.md';
@@ -10,14 +11,16 @@ import Slots from '@ionic-internal/component-api/v8/accordion/slots.md';
10
11
11
12
<head>
12
13
<title>ion-accordion: Accordion Components: How to Build & Examples</title>
13
-
<metaname="description"content="Ion-accordion components provide collapsible sections in content to reduce vertical space and organize information. Learn how to build one and see examples." />
14
+
<meta
15
+
name="description"
16
+
content="Ion-accordion components provide collapsible sections in content to reduce vertical space and organize information. Learn how to build one and see examples."
17
+
/>
14
18
</head>
15
19
16
20
import EncapsulationPill from '@components/page/api/EncapsulationPill';
17
21
18
22
<EncapsulationPilltype="shadow" />
19
23
20
-
21
24
Accordions provide collapsible sections in your content to reduce vertical space while providing a way of organizing and grouping information. All `ion-accordion` components should be grouped inside `ion-accordion-group` components.
22
25
23
26
## Basic Usage
@@ -120,18 +123,18 @@ import ExpansionStyles from '@site/static/usage/v8/accordion/customization/expan
120
123
121
124
You can customize the expansion behavior by styling based on the accordion's state. There are four state classes applied to `ion-accordion`. Styling using these classes can allow you to create advanced state transitions:
122
125
123
-
| Class Name | Description |
124
-
| ---------- | ----------- |
125
-
|`.accordion-expanding`| Applied when the accordion is actively expanding |
126
-
|`.accordion-expanded`| Applied when the accordion is fully expanded |
|`.accordion-expanding`| Applied when the accordion is actively expanding|
129
+
|`.accordion-expanded`| Applied when the accordion is fully expanded|
127
130
|`.accordion-collapsing`| Applied when the accordion is actively collapsing |
128
-
|`.accordion-collapsed`| Applied when the accordion is fully collapsed |
131
+
|`.accordion-collapsed`| Applied when the accordion is fully collapsed|
129
132
130
133
If you need to target specific pieces of the accordion, we recommend targeting the element directly. For example, if you want to customize the ion-item in your header slot when the accordion is expanded, you can use the following selector:
@@ -174,23 +177,23 @@ import AccessibilityAnimations from '@site/static/usage/v8/accordion/accessibili
174
177
175
178
When used inside an `ion-accordion-group`, `ion-accordion` has full keyboard support for interacting with the component. The following table details what each key does:
| <kbd>Space</kbd> or <kbd>Enter</kbd> | When focus is on the accordion header, the accordion will collapse or expand depending on the state of the component. |
180
-
| <kbd>Tab</kbd> | Moves focus to the next focusable element. |
181
-
| <kbd>Shift</kbd> + <kbd>Tab</kbd> | Moves focus to the previous focusable element. |
182
-
| <kbd>Down Arrow</kbd> | - When focus is on an accordion header, moves focus to the next accordion header. <br />- When focus is on the last accordion header, moves focus to the first accordion header. |
183
-
| <kbd>Up Arrow</kbd> | - When focus is on an accordion header, moves focus to the previous accordion header. <br />- When focus is on the first accordion header, moves focus to the last accordion header. |
184
-
| <kbd>Home</kbd> | When focus is on an accordion header, moves focus to the first accordion header. |
185
-
| <kbd>End</kbd> | When focus is on an accordion header, moves focus to the last accordion header. |
| <kbd>Space</kbd> or <kbd>Enter</kbd> | When focus is on the accordion header, the accordion will collapse or expand depending on the state of the component. |
183
+
| <kbd>Tab</kbd> | Moves focus to the next focusable element. |
184
+
| <kbd>Shift</kbd> + <kbd>Tab</kbd> | Moves focus to the previous focusable element. |
185
+
| <kbd>Down Arrow</kbd> | - When focus is on an accordion header, moves focus to the next accordion header. <br />- When focus is on the last accordion header, moves focus to the first accordion header.|
186
+
| <kbd>Up Arrow</kbd> | - When focus is on an accordion header, moves focus to the previous accordion header. <br />- When focus is on the first accordion header, moves focus to the last accordion header. |
187
+
| <kbd>Home</kbd> | When focus is on an accordion header, moves focus to the first accordion header. |
188
+
| <kbd>End</kbd> | When focus is on an accordion header, moves focus to the last accordion header. |
186
189
187
190
## Performance
188
191
189
192
### Animations
190
193
191
194
The accordion animation works by knowing the height of the `content` slot when the animation starts. The accordion expects that this height will remain consistent throughout the animation. As a result, developers should avoid performing any operation that may change the height of the content during the animation.
192
195
193
-
For example, using [ion-img](./img) may cause layout shifts as it lazily loads images. This means that as the animation plays, `ion-img` will load the image data, and the dimensions of `ion-img` will change to account for the loaded image data. This can result in the height of the `content` slot changing. Developers have a few options for avoiding this:
196
+
For example, using [ion-img](./img) may cause layout shifts as it lazily loads images. This means that as the animation plays, `ion-img` will load the image data, and the dimensions of `ion-img` will change to account for the loaded image data. This can result in the height of the `content` slot changing. Developers have a few options for avoiding this:
194
197
195
198
1. Use an `img` element without any lazy loading. `ion-img` always uses lazy loading, but `img` does not use lazy loading by default. This is the simplest option and works well if you have small images that do not significantly benefit from lazy loading.
196
199
@@ -199,19 +202,25 @@ For example, using [ion-img](./img) may cause layout shifts as it lazily loads i
199
202
3. If neither of these options are applicable, developers may want to consider disabling animations altogether by using the `animated` property on [ion-accordion-group](./accordion-group).
Copy file name to clipboardExpand all lines: versioned_docs/version-v8/api/action-sheet.md
+12-3Lines changed: 12 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
---
2
-
title: "ion-action-sheet"
2
+
title: 'ion-action-sheet'
3
3
---
4
+
4
5
import Tabs from '@theme/Tabs';
5
6
import TabItem from '@theme/TabItem';
6
7
@@ -13,14 +14,16 @@ import Slots from '@ionic-internal/component-api/v8/action-sheet/slots.md';
13
14
14
15
<head>
15
16
<title>ion-action-sheet: Action Sheet Dialog for iOS and Android</title>
16
-
<metaname="description"content="Action Sheets are dialogs that display a set of options above app content and must be manually dismissed. Read to learn about use on iOS and Android devices." />
17
+
<meta
18
+
name="description"
19
+
content="Action Sheets are dialogs that display a set of options above app content and must be manually dismissed. Read to learn about use on iOS and Android devices."
20
+
/>
17
21
</head>
18
22
19
23
import EncapsulationPill from '@components/page/api/EncapsulationPill';
20
24
21
25
<EncapsulationPilltype="scoped" />
22
26
23
-
24
27
An Action Sheet is a dialog that displays a set of options. It appears on top of the app's content, and must be manually dismissed by the user before they can resume interaction with the app. Destructive options are made obvious in `ios` mode. There are multiple ways to dismiss the action sheet, including tapping the backdrop or hitting the escape key on desktop.
Copy file name to clipboardExpand all lines: versioned_docs/version-v8/api/alert.md
+13-7Lines changed: 13 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
---
2
-
title: "ion-alert"
2
+
title: 'ion-alert'
3
3
---
4
+
4
5
import Tabs from '@theme/Tabs';
5
6
import TabItem from '@theme/TabItem';
6
7
@@ -13,7 +14,10 @@ import Slots from '@ionic-internal/component-api/v8/alert/slots.md';
13
14
14
15
<head>
15
16
<title>ion-alert: Ionic Alert Buttons with Custom Message Prompts</title>
16
-
<metaname="description"content="ion-alert dialog presents or collects information using inputs. Custom alert button messages appear above the app's content and must be manually dismissed." />
17
+
<meta
18
+
name="description"
19
+
content="ion-alert dialog presents or collects information using inputs. Custom alert button messages appear above the app's content and must be manually dismissed."
20
+
/>
17
21
</head>
18
22
19
23
import EncapsulationPill from '@components/page/api/EncapsulationPill';
@@ -58,7 +62,6 @@ import Buttons from '@site/static/usage/v8/alert/buttons/index.md';
58
62
59
63
<Buttons />
60
64
61
-
62
65
## Inputs
63
66
64
67
Alerts can also include several different inputs whose data can be passed back to the app. Inputs can be used as a simple way to prompt users for information. Radios, checkboxes and text inputs are all accepted, but they cannot be mixed. For example, an alert could have all radio button inputs, or all checkbox inputs, but the same alert cannot mix radio and checkbox inputs. Do note however, different types of "text" inputs can be mixed, such as `url`, `email`, `text`, `textarea` etc. If you require a complex form UI which doesn't fit within the guidelines of an alert then we recommend building the form within a modal instead.
@@ -106,7 +109,7 @@ import Customization from '@site/static/usage/v8/alert/customization/index.md';
106
109
<Customization />
107
110
108
111
:::note
109
-
If you are building an Ionic Angular app, the styles need to be added to a global stylesheet file.
112
+
If you are building an Ionic Angular app, the styles need to be added to a global stylesheet file.
import Props from '@ionic-internal/component-api/v8/app/props.md';
5
6
import Events from '@ionic-internal/component-api/v8/app/events.md';
6
7
import Methods from '@ionic-internal/component-api/v8/app/methods.md';
@@ -10,7 +11,10 @@ import Slots from '@ionic-internal/component-api/v8/app/slots.md';
10
11
11
12
<head>
12
13
<title>ion-app: Container Element for an Ionic Application</title>
13
-
<metaname="description"content="ion-app is a container element for an Ionic application. Apps can have many Ionic components including menus, headers, content, and footers. Read to learn more." />
14
+
<meta
15
+
name="description"
16
+
content="ion-app is a container element for an Ionic application. Apps can have many Ionic components including menus, headers, content, and footers. Read to learn more."
17
+
/>
14
18
</head>
15
19
16
20
import EncapsulationPill from '@components/page/api/EncapsulationPill';
@@ -19,12 +23,12 @@ App is a container element for an Ionic application. There should only be one `<
19
23
20
24
Using `ion-app` enables the following behaviors:
21
25
22
-
*[Keyboard Lifecycle Events](../developing/keyboard#keyboard-lifecycle-events) without the need for any native plugins
23
-
*[Hardware Back Button Listeners](../developing/hardware-back-button) for customizing the hardware back button behavior on Android devices
24
-
* Status bar support in Capacitor or Cordova which allows users to scroll to the top of the view by tapping the status bar
25
-
* Scroll assist utilities which scroll the content so focused text inputs are not covered by the on-screen keyboard
26
-
*[Ripple effect](./ripple-effect) when activating buttons on Material Design mode
27
-
* Other tap and focus utilities which make the experience of using an Ionic app feel more native
26
+
-[Keyboard Lifecycle Events](../developing/keyboard#keyboard-lifecycle-events) without the need for any native plugins
27
+
-[Hardware Back Button Listeners](../developing/hardware-back-button) for customizing the hardware back button behavior on Android devices
28
+
- Status bar support in Capacitor or Cordova which allows users to scroll to the top of the view by tapping the status bar
29
+
- Scroll assist utilities which scroll the content so focused text inputs are not covered by the on-screen keyboard
30
+
-[Ripple effect](./ripple-effect) when activating buttons on Material Design mode
31
+
- Other tap and focus utilities which make the experience of using an Ionic app feel more native
28
32
29
33
## Programmatic Focus
30
34
@@ -35,19 +39,25 @@ import SetFocus from '@site/static/usage/v8/app/set-focus/index.md';
0 commit comments