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: docs/api/item.md
+107-2Lines changed: 107 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,8 @@ import Slots from '@ionic-internal/component-api/v9/item/slots.md';
10
10
11
11
import useBaseUrl from '@docusaurus/useBaseUrl';
12
12
import BestPracticeFigure from '@components/global/BestPracticeFigure';
13
+
import Tabs from '@theme/Tabs';
14
+
import TabItem from '@theme/TabItem';
13
15
14
16
<head>
15
17
<title>ion-item: Input, Edit, or Delete iOS and Android Item Elements</title>
@@ -163,13 +165,116 @@ import Controls from '@site/static/usage/v9/item/content-types/controls/index.md
163
165
164
166
## Clickable Items
165
167
166
-
An item is considered "clickable" if it has an `href`or `button` property set. Clickable items have a few visual differences that indicate they can be interacted with. For example, a clickable item receives the ripple effect upon activation in `md` mode, has a highlight when activated in `ios` mode, and has a [detail arrow](#detail-arrows) by default in `ios` mode.
168
+
An item is considered "clickable" if it has an `href`, `button`, or `routerLink` property set. Clickable items have a few visual differences that indicate they can be interacted with. For example, a clickable item receives the ripple effect upon activation in `md` mode, has a highlight when activated in `ios` mode, and has a [detail arrow](#detail-arrows) by default in `ios` mode.
167
169
168
170
import Clickable from '@site/static/usage/v9/item/clickable/index.md';
169
171
170
172
<Clickable />
171
173
172
174
175
+
## Routing
176
+
177
+
Items support client-side navigation using the `routerLink` property. Setting `routerLink` renders the item as an anchor and navigates to the specified route when tapped. The `routerDirection` property controls the transition animation direction, and `routerAnimation` accepts a custom animation builder.
In Angular, `routerLink` is a directive provided by `@angular/router`. When used on Ionic components, also import `IonRouterLink` from `@ionic/angular/standalone` to enable `routerDirection` and `routerAnimation` support.
In Vue, use the `router-link` attribute on `ion-item`. The `router-direction` and `router-animation` attributes are also available for controlling the transition.
By default [clickable items](#clickable-items) will display a right arrow icon on `ios` mode. To hide the right arrow icon on clickable elements, set the `detail` property to `false`. To show the right arrow icon on an item that doesn't display it naturally, set the `detail` property to `true`.
@@ -292,4 +397,4 @@ When an `<ion-item>` renders a native `<a>` element, the keyboard interactions f
0 commit comments