diff --git a/README.md b/README.md index c37a377d2..bac0d7575 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,10 @@ # Ionic Theme iOS27 -Install with `npm install @rdlabo/ionic-theme-ios27 @erkamyaman/capacitor-foldable`. For 1.x, use the [v1.2.1 guide](https://github.com/webview-native-ui/ionic-theme-ios27/tree/ios27-v1.2.1). -A theme for Ionic apps that brings iOS 27 Liquid Glass and motion to the Web. Capacitor iOS apps can also opt into Native UI for supported controls, officially supported starting with 2.0.0. +Apply iOS 27 Liquid Glass styling and animations to Ionic components in the browser or a WebView. For native iOS controls, add Capacitor Native UI. -**[Ionic 9 demo](https://ionic-theme-ios27.rdlabo.dev/) · [Setup guide](https://docs.rdlabo.dev/projects/ionic-theme-ios27/docs/setup)** +**[Ionic 9 demo](https://ionic-theme-ios27.rdlabo.dev/) · [Setup guide](https://webview-native-ui.com/projects/ionic-theme-ios27/docs/setup)** + +The setup guide shows Ionic 9. On Ionic 8 (8.8.1 or later), Angular apps import `provideIonicAngular` from `@ionic/angular/standalone`. @@ -15,63 +16,34 @@ A theme for Ionic apps that brings iOS 27 Liquid Glass and motion to the Web. Ca -## What would you like to do? - -| Goal | Guide | -| ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| Style an existing Ionic app | [Get started](https://docs.rdlabo.dev/projects/ionic-theme-ios27/docs/setup) | -| Select iOS 26/27 styles and optionally use MD3 | [Adaptive themes](https://docs.rdlabo.dev/projects/ionic-theme-ios27/docs/adaptive-themes) | -| Add native iOS controls to a Capacitor app | [Add Native UI](https://docs.rdlabo.dev/projects/ionic-theme-ios27/docs/add-native-ui) | -| Add a side rail to Ionic while keeping your own theme | [Vertical Bars step by step](https://docs.rdlabo.dev/projects/capacitor-native-ui/docs/ionic-vertical-bars) | -| Optional: use the theme and Native UI with Cordova | [Cordova setup](docs/cordova.md) | -| Configure styles, dark mode and animations individually | [Configuration](docs/configuration.md) | -| Upgrade an existing installation | [Migration](https://docs.rdlabo.dev/projects/ionic-theme-ios27/docs/migration) | - -## Get started - -The standard guides use the standalone theme package, with Capacitor as the default native host. Theme-only browser use remains supported. For a Cordova application, use the optional [Cordova guide](docs/cordova.md), which covers its bundled theme and host-specific startup. - -We use [Capacitor Foldable](https://github.com/erkamyaman/capacitor-foldable), an excellent community plugin by Erkam Yaman, as our standard device-layout integration. It exposes fold state, hinge geometry, bar placement and change events to your application, giving you control over how the layout responds. Foldable handles device reporting; the theme provides Web layout helpers and Native UI projects controls. Install it alongside the package you use, then connect its events in your app. - -Install the theme, add one global theme stylesheet after Ionic's base CSS, and pass the theme configuration to your existing Ionic initializer. See the [setup guide](https://docs.rdlabo.dev/projects/ionic-theme-ios27/docs/setup) for Angular, React and Vue. - -```sh -npm install @rdlabo/ionic-theme-ios27 @erkamyaman/capacitor-foldable -``` - -```css -@import '@rdlabo/ionic-theme-ios27/styles/system.css'; -``` + -```ts -import { ios27ThemeConfig } from '@rdlabo/ionic-theme-ios27'; - -provideIonicAngular({ - ...ios27ThemeConfig, - // animated: false, -}); -``` - -Choose `styles/class.css` for application-controlled dark mode or `styles/always.css` for always-dark mode. The stylesheet includes the matching Ionic dark palette. The theme configuration defaults to iOS mode and its animations, with application options taking precedence. Ionic compatibility is `>=8.8.1 <10`. Browser-only apps do not need a native Capacitor project. +## What would you like to do? -The theme styles toolbars, tabs, lists, buttons, search, and overlays, with light and dark appearances. It does not activate native controls. Once the Web theme is working, you can optionally [add Native UI](https://docs.rdlabo.dev/projects/ionic-theme-ios27/docs/add-native-ui). +| Goal | Guide | +| ------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Style an existing Ionic app | [Get started](https://webview-native-ui.com/projects/ionic-theme-ios27/docs/setup) | +| Select iOS 26/27 styles and optionally use MD3 | [Adaptive themes](https://webview-native-ui.com/projects/ionic-theme-ios27/docs/adaptive-themes) | +| Add native iOS controls to a Capacitor app | [Add Native UI](https://webview-native-ui.com/projects/ionic-theme-ios27/docs/add-native-ui) | +| Add a side rail to Ionic while keeping your own theme | [Vertical Bars step by step](https://webview-native-ui.com/projects/capacitor-native-ui/docs/ionic-vertical-bars) | +| Optional: use the theme and Native UI with Cordova | [Configure Ionic](https://webview-native-ui.com/projects/ionic-theme-ios27/docs/setup#3.-pass-theme-configuration-to-ionic), then [connect Cordova](https://webview-native-ui.com/projects/ionic-theme-ios27/docs/cordova) | +| Configure styles, dark mode and animations individually | [Configuration](https://webview-native-ui.com/projects/ionic-theme-ios27/docs/configuration) | +| Upgrade an existing installation | [Migration](https://webview-native-ui.com/projects/ionic-theme-ios27/docs/migration) | ## Customize your app -Use [configuration](docs/configuration.md) for individual CSS and animation settings. Existing applications can optionally simplify their setup using the [migration guide](docs/migration.md#optional-simplify-the-setup). - -- [Features](https://docs.rdlabo.dev/projects/ionic-theme-ios27/docs/features): CSS variables, Liquid Glass, and selective component imports. -- [Special markup and classes](https://docs.rdlabo.dev/projects/ionic-theme-ios27/docs/special-markup): opt-in component behavior. -- [Using ion-item-group](https://docs.rdlabo.dev/projects/ionic-theme-ios27/docs/using-ion-item-group): inset list markup. -- [Animation](https://docs.rdlabo.dev/projects/ionic-theme-ios27/docs/animation): tab, segment, and search effects. -- [ESLint](https://docs.rdlabo.dev/projects/ionic-theme-ios27/docs/eslint): catch unsupported list structure. -- [Vertical Bars layout](https://docs.rdlabo.dev/projects/ionic-theme-ios27/docs/vertical-bars-layout): spacing, RTL, device placement, posture, and split panes. +- [Features](https://webview-native-ui.com/projects/ionic-theme-ios27/docs/features): CSS variables, Liquid Glass, and selective component imports. +- [Special markup and classes](https://webview-native-ui.com/projects/ionic-theme-ios27/docs/special-markup): opt-in component behavior. +- [Using ion-item-group](https://webview-native-ui.com/projects/ionic-theme-ios27/docs/using-ion-item-group): inset list markup. +- [Animation](https://webview-native-ui.com/projects/ionic-theme-ios27/docs/animation): tab, segment, and search effects. +- [ESLint](https://webview-native-ui.com/projects/ionic-theme-ios27/docs/eslint): catch unsupported list structure. +- [Vertical Bars layout](https://webview-native-ui.com/projects/ionic-theme-ios27/docs/vertical-bars-layout): spacing, RTL, device placement, posture, and split panes. ## Repository boundaries The Capacitor plugin is maintained in [webview-native-ui/capacitor-plugin](https://github.com/webview-native-ui/capacitor-plugin). This repository owns the Ionic theme, the combined demo, browser screenshots, and simulator integration tests. The demo installs `@rdlabo/capacitor-native-ui` from npm; theme releases do not publish or change the plugin version. -The [Cordova plugin](https://github.com/webview-native-ui/cordova-plugin) is maintained separately. It distributes a pinned copy of this theme with its integration imports connected to Cordova. Shared theme fixes belong here; Cordova updates its pinned theme version in a subsequent plugin release. The Capacitor demo and candidate checks below do not validate Cordova. +The [Cordova plugin](https://github.com/webview-native-ui/cordova-plugin) provides the native integration. Install this theme separately in the Web project. To verify an unpublished plugin archive against the real demo, run: @@ -81,6 +53,8 @@ npm run test:native-candidate -- /absolute/path/rdlabo-capacitor-native-ui-VERSI This creates an isolated temporary checkout and leaves your manifests and lockfiles unchanged. Add `--shard=1/2` alongside `--e2e` to run one Playwright shard; run every shard to cover the full suite. Each shard retains package checks, unit tests, and the production build. Add `--simulator=UDID` for native UI, search, and edge simulator suites. Diagnostics and the temporary demo are retained at the printed path. Plugin-only unit and native library tests live in the plugin repository. Its CI tests each candidate archive against this repository’s main branch. +For 1.x installations, see the [v1.2.1 guide](https://github.com/webview-native-ui/ionic-theme-ios27/tree/ios27-v1.2.1). + ## Maintenance Release the root theme package with `npm run release` from a clean, up-to-date `main`. The `ios27-v…` tag workflow publishes only the theme, using `next` for prereleases and `latest` for stable releases. diff --git a/demo/src/app/docs/docs-content.generated.ts b/demo/src/app/docs/docs-content.generated.ts index 8f5b18a0a..82edbba7a 100644 --- a/demo/src/app/docs/docs-content.generated.ts +++ b/demo/src/app/docs/docs-content.generated.ts @@ -1,3 +1,3 @@ // Generated from docs/special-markup.md. Do not edit directly. export const docsContentHtml = - '
Most Ionic markup works without changes. The combinations below are explicit opt-ins provided by the theme.
\nSolid submit buttons use the Ionic color's contrast value for their foreground. Their directional edge treatment follows the iOS 27 prominent-button appearance and does not require an additional brightness color.
\n<ion-button type="submit" color="primary">Submit</ion-button>\n<ion-button class="button-submit" fill="solid" color="primary">Continue</ion-button>Use .button-submit when the button needs the same treatment but cannot use type="submit".
Place ion-badge directly inside an ion-button in an ion-toolbar. Both\nstandalone buttons and buttons inside ion-buttons support this markup.\nAn empty badge shows an unread indicator; text such as 3 or 99+ shows a count.\nFor an indicator, keep the contents completely empty (<ion-badge></ion-badge>),\nwithout spaces or line breaks between the tags.
Standalone toolbar button:
\n<ion-toolbar>\n <ion-button slot="end" aria-label="Notifications">\n <ion-icon name="ellipsis-horizontal" slot="icon-only"></ion-icon>\n <ion-badge>3</ion-badge>\n </ion-button>\n</ion-toolbar>Grouped toolbar buttons, with empty, numeric and wide badges:
\n<ion-toolbar>\n <ion-buttons slot="end">\n <ion-button aria-label="Unread notifications">\n <ion-icon name="ellipsis-horizontal" slot="icon-only"></ion-icon>\n <ion-badge></ion-badge>\n </ion-button>\n <ion-button aria-label="3 notifications">\n <ion-icon name="ellipsis-horizontal" slot="icon-only"></ion-icon>\n <ion-badge>3</ion-badge>\n </ion-button>\n <ion-button aria-label="99 or more notifications">\n <ion-icon name="ellipsis-horizontal" slot="icon-only"></ion-icon>\n <ion-badge>99+</ion-badge>\n </ion-button>\n </ion-buttons>\n</ion-toolbar>Use the badge's color property to choose an Ionic color. Setting hidden or\ndisplay: none, or removing the badge, hides it without changing the action's\nlayout. Include the notification state in the action's accessible label.
The treatment is limited to direct-child badges in toolbar buttons. Badges in\ntabs, outside toolbars, or nested in another child keep their existing styling.\nTheme opt-outs on the toolbar, group, button or badge remain supported.
\nFor iOS alerts and action sheets, set role: 'preferred' on a button to give it a filled --ion-color-primary background and --ion-color-primary-contrast text and icons. While pressed, the background uses --ion-color-primary-shade. This is a theme convention using Ionic's custom button roles; it does not automatically select or invoke the action. Dismissal reports the role as preferred.
buttons: [\n { text: \'Cancel\', role: \'cancel\' },\n { text: \'Continue\', role: \'preferred\' },\n];Choose the role by action semantics:
\n| Role | \nAppearance and behavior | \n
|---|---|
preferred | \nFilled primary action; dismissal reports preferred. Does not automatically select or invoke it. | \n
No role or default | \nNormal text color. | \n
cancel | \nRetains Ionic's cancellation behavior. | \n
selected | \nRetains selection state. | \n
destructive | \nUses --ios-theme-destructive-color. | \n
confirm | \nNot treated as preferred. Use preferred for a recommended action, not simply any confirmation. | \n
Choose the sheet's scrolling behavior with expandToScroll:
| Setting | \niPad appearance | \nScrolling and resizing | \n
|---|---|---|
false | \nFloating lower corners and a 20px bottom gap. | \nContent scrolls within the current breakpoint; dragging the handle resizes the sheet. Ionic sizes the visible page at each breakpoint so CSS can style it. | \n
true (default) | \nIonic's bottom-attached layout. | \nScroll-to-expand behavior. | \n
Choose a class on an iOS ion-tab-bar to position the whole bar within its safe area:
| Class | \nPlacement | \n
|---|---|
tab-bar-position-start | \nStart of the reading direction. | \n
tab-bar-position-center | \nCenter. | \n
tab-bar-position-end | \nEnd of the reading direction. | \n
| None | \nExisting placement unchanged. | \n
All three classes support slot="top" and slot="bottom", preserve width and press animation, and resolve start/end in RTL.
<ion-tab-bar slot="bottom" class="tab-bar-position-center">\n <ion-tab-button tab="home">Home</ion-tab-button>\n <ion-tab-button tab="settings">Settings</ion-tab-button>\n</ion-tab-bar>These classes do not reposition a separate ion-fab; leave room for it when choosing the bar's position.
iPhone Duo support, including standalone Vertical Bars, is stable starting with version 2.0.0.
\niPhone Duo support — the vertical system rail, hinge posture, and the posture-driven split-pane layout — is independent of the iOS 27 theme and the full Native UI. See Device layout and split panes for the complete setup, including device-layout monitoring without a projection runtime.
\nSee Vertical Bars for rail layout classes, control eligibility and native button appearance.
\nFor standalone setup while keeping your existing theme, see iPhone Duo with your existing theme.
\nPlace an unslotted ion-label immediately alongside an unslotted ion-note to render a two-line item. When using the iOS-style inset-list background, wrap the items in ion-item-group; keep ion-list-header outside the group.
<ion-list inset="true">\n <ion-list-header>\n <ion-label>Connections</ion-label>\n </ion-list-header>\n <ion-item-group>\n <ion-item>\n <ion-label>Network & internet</ion-label>\n <ion-note>Mobile, Wi-Fi, hotspot</ion-note>\n </ion-item>\n </ion-item-group>\n</ion-list>Use slot="end" on ion-note when you want the standard trailing-note layout instead.
Add .item-group-header to an ion-item-group to create the centered icon, title, and description used at the top of the component demo pages.
This is an introductory group. Place regular list items in a separate ion-item-group that follows it.
<ion-list inset="true">\n <ion-item-group class="item-group-header">\n <ion-item>\n <ion-label>\n <ion-icon name="list" style="background: var(--ion-color-primary)"></ion-icon>\n <h2>Lists</h2>\n <ion-text>Inset-list examples</ion-text>\n </ion-label>\n </ion-item>\n </ion-item-group>\n <ion-item-group>\n <ion-item><ion-label>First item</ion-label></ion-item>\n </ion-item-group>\n</ion-list>Add .segment-style-glass to give a segment the same glass surface and selected indicator treatment as the tab bar. The class preserves the segment's existing dimensions and text colors, supports scrollable segments, and respects Ionic's public --background property.
<ion-segment class="segment-style-glass" value="available">\n <ion-segment-button value="available">Available</ion-segment-button>\n <ion-segment-button value="away">Away</ion-segment-button>\n</ion-segment>For colored segments, use Ionic's color property (for example, color="primary" or color="secondary"). Ionic uses the palette's base color for the softly tinted track while keeping the selected surface and labels neutral. A surrounding colored toolbar only supplies colors when the segment has no color of its own. The optional moving glass inherits the selected surface color, and custom Ionic palettes work without additional registration.
Add .segment-expand when segment buttons should divide the available width evenly. The class also changes the Liquid Glass effect sizing when registerSegmentEffect is used.
| Placement | \nMinimum height | \nContainer behavior | \n
|---|---|---|
| In content | \n32px | \nCompact, flat background and indicator; outer bounds stay fixed. | \n
Inside ion-toolbar | \n48px | \nGlass container; outer container scales while pressed. | \n
.segment-expand, including in a toolbar | \n32px | \nCompact, flat background and indicator; outer bounds stay fixed. | \n
The optional moving glass lens is independent of the container's background.
\n<ion-segment class="segment-expand" value="new">\n <ion-segment-button value="new"><ion-label>New</ion-label></ion-segment-button>\n <ion-segment-button value="replied"><ion-label>Replied</ion-label></ion-segment-button>\n</ion-segment>The theme gives iOS search bars the iOS 27 appearance by default. Add .searchbar-classic to the search field shown beneath a large title in an ion-header with collapse="condense". It uses the conventional filled iOS appearance and collapses with the large title instead of remaining in the fixed header.
Place it in a toolbar with a color, such as color="light"; the classic background is derived from that color's contrast value.
The example uses Ionic's standard collapsible large-title structure. Scroll the preview to collapse the large title and reveal the fixed header.
\n<div class="ion-page">\n <ion-header translucent="true">\n <ion-toolbar color="light">\n <ion-title>Search</ion-title>\n </ion-toolbar>\n </ion-header>\n <ion-content color="light" fullscreen="true">\n <ion-header collapse="condense">\n <ion-toolbar color="light">\n <ion-title size="large">Search</ion-title>\n </ion-toolbar>\n <ion-toolbar color="light">\n <ion-searchbar class="searchbar-classic" placeholder="Filter results"></ion-searchbar>\n </ion-toolbar>\n </ion-header>\n <ion-list inset="true">\n <ion-item-group>\n <ion-item><ion-label>Recent item 1</ion-label></ion-item>\n <ion-item><ion-label>Recent item 2</ion-label></ion-item>\n <ion-item><ion-label>Recent item 3</ion-label></ion-item>\n <ion-item><ion-label>Recent item 4</ion-label></ion-item>\n <ion-item><ion-label>Recent item 5</ion-label></ion-item>\n <ion-item><ion-label>Recent item 6</ion-label></ion-item>\n <ion-item><ion-label>Recent item 7</ion-label></ion-item>\n <ion-item><ion-label>Recent item 8</ion-label></ion-item>\n <ion-item><ion-label>Recent item 9</ion-label></ion-item>\n <ion-item><ion-label>Recent item 10</ion-label></ion-item>\n </ion-item-group>\n </ion-list>\n </ion-content>\n</div>The .ion-page wrapper makes this embedded preview behave like a complete routed page. An application using ion-router-outlet normally receives that page container automatically. The inset list and its items only provide enough content to demonstrate scrolling; they are not required by .searchbar-classic.
Add .ios-theme-disabled to an individual Ionic component when it must retain Ionic's standard iOS styling.
.ios26-disabled is deprecated but remains supported as an alias with the same behavior. Use .ios-theme-disabled for new code.
<ion-button>iOS 27 theme</ion-button> <ion-button class="ios-theme-disabled">Standard Ionic button</ion-button>For the background model behind inset lists, see Using ion-item-group.
Most Ionic markup works without changes. The combinations below are explicit opt-ins provided by the theme.
\n\nSolid submit buttons use the Ionic color's contrast value for their foreground. Their directional edge treatment follows the iOS 27 prominent-button appearance and does not require an additional brightness color.
\n<ion-button type="submit" color="primary">Submit</ion-button>\n<ion-button class="button-submit" fill="solid" color="primary">Continue</ion-button>Use .button-submit when the button needs the same treatment but cannot use type="submit".
Place ion-badge directly inside an ion-button in an ion-toolbar. Both\nstandalone buttons and buttons inside ion-buttons support this markup.\nAn empty badge shows an unread indicator; text such as 3 or 99+ shows a count.\nFor an indicator, keep the contents completely empty (<ion-badge></ion-badge>),\nwithout spaces or line breaks between the tags.
Standalone toolbar button:
\n<ion-toolbar>\n <ion-button slot="end" aria-label="Notifications">\n <ion-icon name="ellipsis-horizontal" slot="icon-only"></ion-icon>\n <ion-badge>3</ion-badge>\n </ion-button>\n</ion-toolbar>Grouped toolbar buttons, with empty, numeric and wide badges:
\n<ion-toolbar>\n <ion-buttons slot="end">\n <ion-button aria-label="Unread notifications">\n <ion-icon name="ellipsis-horizontal" slot="icon-only"></ion-icon>\n <ion-badge></ion-badge>\n </ion-button>\n <ion-button aria-label="3 notifications">\n <ion-icon name="ellipsis-horizontal" slot="icon-only"></ion-icon>\n <ion-badge>3</ion-badge>\n </ion-button>\n <ion-button aria-label="99 or more notifications">\n <ion-icon name="ellipsis-horizontal" slot="icon-only"></ion-icon>\n <ion-badge>99+</ion-badge>\n </ion-button>\n </ion-buttons>\n</ion-toolbar>Use the badge's color property to choose an Ionic color. Setting hidden or\ndisplay: none, or removing the badge, hides it without changing the action's\nlayout. Include the notification state in the action's accessible label.
The treatment is limited to direct-child badges in toolbar buttons. Badges in\ntabs, outside toolbars, or nested in another child keep their existing styling.\nTheme opt-outs on the toolbar, group, button or badge remain supported.
\nFor iOS alerts and action sheets, set role: 'preferred' on a button to give it a filled --ion-color-primary background and --ion-color-primary-contrast text and icons. While pressed, the background uses --ion-color-primary-shade. This is a theme convention using Ionic's custom button roles; it does not automatically select or invoke the action. Dismissal reports the role as preferred.
buttons: [\n { text: \'Cancel\', role: \'cancel\' },\n { text: \'Continue\', role: \'preferred\' },\n];Choose the role by action semantics:
\n| Role | \nAppearance and behavior | \n
|---|---|
preferred | \nFilled primary action; dismissal reports preferred. Does not automatically select or invoke it. | \n
No role or default | \nNormal text color. | \n
cancel | \nRetains Ionic's cancellation behavior. | \n
selected | \nRetains selection state. | \n
destructive | \nUses --ios-theme-destructive-color. | \n
confirm | \nNot treated as preferred. Use preferred for a recommended action, not simply any confirmation. | \n
Choose the sheet's scrolling behavior with expandToScroll:
| Setting | \niPad appearance | \nScrolling and resizing | \n
|---|---|---|
false | \nFloating lower corners and a 20px bottom gap. | \nContent scrolls within the current breakpoint; dragging the handle resizes the sheet. Ionic sizes the visible page at each breakpoint so CSS can style it. | \n
true (default) | \nIonic's bottom-attached layout. | \nScroll-to-expand behavior. | \n
Choose a class on an iOS ion-tab-bar to position the whole bar within its safe area:
| Class | \nPlacement | \n
|---|---|
tab-bar-position-start | \nStart of the reading direction. | \n
tab-bar-position-center | \nCenter. | \n
tab-bar-position-end | \nEnd of the reading direction. | \n
| None | \nExisting placement unchanged. | \n
All three classes support slot="top" and slot="bottom", preserve width and press animation, and resolve start/end in RTL.
<ion-tab-bar slot="bottom" class="tab-bar-position-center">\n <ion-tab-button tab="home">Home</ion-tab-button>\n <ion-tab-button tab="settings">Settings</ion-tab-button>\n</ion-tab-bar>These classes do not reposition a separate ion-fab; leave room for it when choosing the bar's position.
iPhone Duo support, including standalone Vertical Bars, is stable starting with version 2.0.0.
\niPhone Duo support — the vertical system rail, hinge posture, and the posture-driven split-pane layout — is independent of the iOS 27 theme and the full Native UI. See Device layout and split panes for the complete setup, including device-layout monitoring without a projection runtime.
\nSee Vertical Bars for rail layout classes, control eligibility and native button appearance.
\nFor standalone setup while keeping your existing theme, see iPhone Duo with your existing theme.
\nPlace an unslotted ion-label immediately alongside an unslotted ion-note to render a two-line item. When using the iOS-style inset-list background, wrap the items in ion-item-group; keep ion-list-header outside the group.
<ion-list inset="true">\n <ion-list-header>\n <ion-label>Connections</ion-label>\n </ion-list-header>\n <ion-item-group>\n <ion-item>\n <ion-label>Network & internet</ion-label>\n <ion-note>Mobile, Wi-Fi, hotspot</ion-note>\n </ion-item>\n </ion-item-group>\n</ion-list>Use slot="end" on ion-note when you want the standard trailing-note layout instead.
Add .item-group-header to an ion-item-group to create the centered icon, title, and description used at the top of the component demo pages.
This is an introductory group. Place regular list items in a separate ion-item-group that follows it.
<ion-list inset="true">\n <ion-item-group class="item-group-header">\n <ion-item>\n <ion-label>\n <ion-icon name="list" style="background: var(--ion-color-primary)"></ion-icon>\n <h2>Lists</h2>\n <ion-text>Inset-list examples</ion-text>\n </ion-label>\n </ion-item>\n </ion-item-group>\n <ion-item-group>\n <ion-item><ion-label>First item</ion-label></ion-item>\n </ion-item-group>\n</ion-list>Add .segment-style-glass to give a segment the same glass surface and selected indicator treatment as the tab bar. The class preserves the segment's existing dimensions and text colors, supports scrollable segments, and respects Ionic's public --background property.
<ion-segment class="segment-style-glass" value="available">\n <ion-segment-button value="available">Available</ion-segment-button>\n <ion-segment-button value="away">Away</ion-segment-button>\n</ion-segment>For colored segments, use Ionic's color property (for example, color="primary" or color="secondary"). Ionic uses the palette's base color for the softly tinted track while keeping the selected surface and labels neutral. A surrounding colored toolbar only supplies colors when the segment has no color of its own. The optional moving glass inherits the selected surface color, and custom Ionic palettes work without additional registration.
Add .segment-expand when segment buttons should divide the available width evenly. The class also changes the Liquid Glass effect sizing when registerSegmentEffect is used.
| Placement | \nMinimum height | \nContainer behavior | \n
|---|---|---|
| In content | \n32px | \nCompact, flat background and indicator; outer bounds stay fixed. | \n
Inside ion-toolbar | \n48px | \nGlass container; outer container scales while pressed. | \n
.segment-expand, including in a toolbar | \n32px | \nCompact, flat background and indicator; outer bounds stay fixed. | \n
The optional moving glass lens is independent of the container's background.
\n<ion-segment class="segment-expand" value="new">\n <ion-segment-button value="new"><ion-label>New</ion-label></ion-segment-button>\n <ion-segment-button value="replied"><ion-label>Replied</ion-label></ion-segment-button>\n</ion-segment>The theme gives iOS search bars the iOS 27 appearance by default. Add .searchbar-classic to the search field shown beneath a large title in an ion-header with collapse="condense". It uses the conventional filled iOS appearance and collapses with the large title instead of remaining in the fixed header.
Place it in a toolbar with a color, such as color="light"; the classic background is derived from that color's contrast value.
The example uses Ionic's standard collapsible large-title structure. Scroll the preview to collapse the large title and reveal the fixed header.
\n<div class="ion-page">\n <ion-header translucent="true">\n <ion-toolbar color="light">\n <ion-title>Search</ion-title>\n </ion-toolbar>\n </ion-header>\n <ion-content color="light" fullscreen="true">\n <ion-header collapse="condense">\n <ion-toolbar color="light">\n <ion-title size="large">Search</ion-title>\n </ion-toolbar>\n <ion-toolbar color="light">\n <ion-searchbar class="searchbar-classic" placeholder="Filter results"></ion-searchbar>\n </ion-toolbar>\n </ion-header>\n <ion-list inset="true">\n <ion-item-group>\n <ion-item><ion-label>Recent item 1</ion-label></ion-item>\n <ion-item><ion-label>Recent item 2</ion-label></ion-item>\n <ion-item><ion-label>Recent item 3</ion-label></ion-item>\n <ion-item><ion-label>Recent item 4</ion-label></ion-item>\n <ion-item><ion-label>Recent item 5</ion-label></ion-item>\n <ion-item><ion-label>Recent item 6</ion-label></ion-item>\n <ion-item><ion-label>Recent item 7</ion-label></ion-item>\n <ion-item><ion-label>Recent item 8</ion-label></ion-item>\n <ion-item><ion-label>Recent item 9</ion-label></ion-item>\n <ion-item><ion-label>Recent item 10</ion-label></ion-item>\n </ion-item-group>\n </ion-list>\n </ion-content>\n</div>The .ion-page wrapper makes this embedded preview behave like a complete routed page. An application using ion-router-outlet normally receives that page container automatically. The inset list and its items only provide enough content to demonstrate scrolling; they are not required by .searchbar-classic.
Add .ios-theme-disabled to an individual Ionic component when it must retain Ionic's standard iOS styling.
.ios26-disabled is deprecated but remains supported as an alias with the same behavior. Use .ios-theme-disabled for new code.
<ion-button>iOS 27 theme</ion-button> <ion-button class="ios-theme-disabled">Standard Ionic button</ion-button>For the background model behind inset lists, see Using ion-item-group.