diff --git a/README.md b/README.md index de59a346d..daca40122 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ # Ionic Theme iOS26 -A CSS/JS theme library that applies iOS26 design system to Ionic applications. +Apply iOS 26 styling and Liquid Glass interactions to Ionic components. + +[Set up the theme](https://webview-native-ui.com/projects/ionic-theme-ios26/docs/setup) · [Try the browser demo](https://ionic-theme-ios26.rdlabo.dev/) + +The setup guide shows Ionic 9. On Ionic 8 (8.8.1 or later), Angular apps import `provideIonicAngular` from `@ionic/angular/standalone`. @@ -8,50 +12,28 @@ A CSS/JS theme library that applies iOS26 design system to Ionic applications. -DEMO is here: https://ionic-theme-ios26.rdlabo.dev/ - ## Installation ```sh npm install @rdlabo/ionic-theme-ios26 ``` -After Ionic's base CSS, add the system-dark stylesheet to your global stylesheet. - -```css -@import '@rdlabo/ionic-theme-ios26/styles/system.css'; -``` - -Spread `ios26ThemeConfig` into your existing Ionic initializer's options. The -configuration supplies iOS mode and theme animations. - -```ts -import { ios26ThemeConfig } from '@rdlabo/ionic-theme-ios26'; - -const ionicConfig = { - ...ios26ThemeConfig, - // animated: false, -}; -``` - -Follow [Set up the theme](docs/setup.md) for Angular, React, and Vue examples, -dark-mode selection, and a preview. Use [Configuration](docs/configuration.md) -for individual CSS and animation exports, custom options, and iOS 26 with MD3. -Existing applications can adopt the wrappers using [Migration](docs/migration.md). +Follow the [setup guide](https://webview-native-ui.com/projects/ionic-theme-ios26/docs/setup) to load the stylesheet and enable theme animations in your framework. ## Documentation -- [Using ion-item-group](https://docs.rdlabo.dev/projects/ionic-theme-ios26/docs/using-ion-item-group) — required markup for inset lists. -- [Special markup and classes](https://docs.rdlabo.dev/projects/ionic-theme-ios26/docs/special-markup) — opt-in markup and utility classes used by the theme. -- [ESLint](https://docs.rdlabo.dev/projects/ionic-theme-ios26/docs/eslint) — check list structure with ESLint rules. -- [Features](https://docs.rdlabo.dev/projects/ionic-theme-ios26/docs/features) — CSS variables, Liquid Glass, selective imports, and dark mode. -- [Experimental Animation](https://docs.rdlabo.dev/projects/ionic-theme-ios26/docs/experimental-animation) — tab bar and searchable effects. -- [iOS 18](https://docs.rdlabo.dev/projects/ionic-theme-ios26/docs/ios-18) — load the theme only on iOS 26. -- [Migration](docs/migration.md) — optional wrapper adoption and version-specific upgrade steps. +- [Configuration](https://webview-native-ui.com/projects/ionic-theme-ios26/docs/configuration) — individual stylesheets and animation options. +- [Using ion-item-group](https://webview-native-ui.com/projects/ionic-theme-ios26/docs/using-ion-item-group) — required markup for inset lists. +- [Special markup and classes](https://webview-native-ui.com/projects/ionic-theme-ios26/docs/special-markup) — opt-in markup and utility classes used by the theme. +- [ESLint](https://webview-native-ui.com/projects/ionic-theme-ios26/docs/eslint) — check list structure with ESLint rules. +- [Features](https://webview-native-ui.com/projects/ionic-theme-ios26/docs/features) — CSS variables, Liquid Glass, selective imports, and dark mode. +- [Experimental Animation](https://webview-native-ui.com/projects/ionic-theme-ios26/docs/experimental-animation) — tab bar and searchable effects. +- [iOS 18](https://webview-native-ui.com/projects/ionic-theme-ios26/docs/ios-18) — load the theme only on iOS 26. +- [Migration](https://webview-native-ui.com/projects/ionic-theme-ios26/docs/migration) — optional wrapper adoption and version-specific upgrade steps. -**Full documentation:** [https://docs.rdlabo.dev/projects/ionic-theme-ios26](https://docs.rdlabo.dev/projects/ionic-theme-ios26) +**Full documentation:** [https://webview-native-ui.com/projects/ionic-theme-ios26](https://webview-native-ui.com/projects/ionic-theme-ios26) ## Development & Testing @@ -129,4 +111,5 @@ Only `npm run release` can create a release tag. Stable `ios26-vX.Y.Z` tags (maj ## Maintainers - [rdlabo](https://rdlabo.dev/) + diff --git a/demo/src/app/docs/docs-content.generated.ts b/demo/src/app/docs/docs-content.generated.ts index aa8e96858..d9af2a5e6 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 = - '

Special markup and classes

\n

Most Ionic markup works without changes. The combinations below are explicit opt-ins provided by the theme.

\n

Primary submit buttons

\n

Solid primary submit buttons use --ion-color-primary-brightness for their foreground and border treatment. Define a value with sufficient contrast for your primary color.

\n
:root {\n  --ion-color-primary-brightness: #96feff;\n}
\n\n
<ion-button type="submit" color="primary">Submit</ion-button>\n<ion-button class="button-submit" fill="solid" color="primary">Continue</ion-button>
\n\n
\n
Preview
\nSubmit\nContinue\n
\n\n

Use .button-submit when the button needs the same treatment but cannot use type="submit".

\n

Toolbar button badges

\n

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.

\n

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>
\n\n
\n
Preview
\n\n \n \n 3\n \n\n
\n\n

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>
\n\n
\n
Preview
\n\n \n \n \n \n \n \n \n 3\n \n \n \n 99+\n \n \n\n
\n\n

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.

\n

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.

\n

Preferred overlay actions

\n

For 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.

\n
const buttons = [\n  { text: \'Cancel\', role: \'cancel\' },\n  { text: \'Continue\', role: \'preferred\' },\n];
\n\n

Buttons with no role or default keep the normal text color. cancel retains Ionic's cancellation behavior, selected remains a selection state, and destructive uses --ios-theme-destructive-color. An existing confirm role is not treated as preferred. Use preferred for the recommended action, not simply any action that confirms a choice.

\n

The theme follows the centered, unanchored UIAlertController presentation measured on iOS 26.1/26.5. Use ion-popover for an anchored menu. ios-theme-disabled / ios26-disabled retain the original Ionic presentation. Long content remains scrollable. Optional measured animation builders are described in Experimental animation; CSS alone does not replace Ionic's enter/leave animations.

\n

Tab bar position

\n

Add one of tab-bar-position-start, tab-bar-position-center, or tab-bar-position-end to an iOS ion-tab-bar to position the whole bar within its safe area. These classes work with both slot="top" and slot="bottom" and preserve the bar's width and press animation. Start and end follow the text direction (reversed in RTL). Without a class, the theme uses its default placement.

\n
<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>
\n\n

These classes do not reposition a separate ion-fab; leave room for it when choosing the bar's position.

\n

Two-line inset list items

\n

Place 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.

\n
<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 &amp; internet</ion-label>\n      <ion-note>Mobile, Wi-Fi, hotspot</ion-note>\n    </ion-item>\n  </ion-item-group>\n</ion-list>
\n\n
\n
Preview
\n\n \n Connections\n \n \n \n Network & internet\n Mobile, Wi-Fi, hotspot\n \n \n\n
\n\n

Use slot="end" on ion-note when you want the standard trailing-note layout instead.

\n

Inset-list section headers

\n

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.

\n

This is an introductory group. Place regular list items in a separate ion-item-group that follows it.

\n
<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>
\n\n
\n
Preview
\n\n \n \n \n \n

Lists

\n Inset-list examples\n
\n
\n
\n \n First item\n \n
\n
\n\n

Full-width segments

\n

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.

\n
<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>
\n\n

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.

\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>
\n\n
\n
Preview
\n\n New\n Replied\n\n
\n\n

Classic search bar in a condense header

\n

The theme gives iOS search bars the iOS 26 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.

\n

Place it in a toolbar with a color, such as color="light"; the classic background is derived from that color's contrast value.

\n

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>
\n\n
\n
Preview
\n
\n \n \n Search\n \n \n \n \n \n Search\n \n \n \n \n \n \n \n Recent item 1\n Recent item 2\n Recent item 3\n Recent item 4\n Recent item 5\n Recent item 6\n Recent item 7\n Recent item 8\n Recent item 9\n Recent item 10\n \n \n \n
\n
\n\n

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.

\n

Search-bar toolbars

\n

Add .toolbar-searchbar when an ion-toolbar combines a search bar with start or end buttons. The class centers the slotted controls and adjusts the spacing around the search field.

\n
<ion-toolbar class="toolbar-searchbar">\n  <ion-buttons slot="start">\n    <ion-button>Cancel</ion-button>\n  </ion-buttons>\n  <ion-searchbar></ion-searchbar>\n</ion-toolbar>
\n\n
\n
Preview
\n\n \n Cancel\n \n \n\n
\n\n

Opting out

\n

Add .ios-theme-disabled to an individual Ionic component when it must retain Ionic's standard iOS styling.

\n
<ion-button>iOS 26 theme</ion-button> <ion-button class="ios-theme-disabled">Standard Ionic button</ion-button>
\n\n
\n
Preview
\niOS 26 theme Standard Ionic button\n
\n\n

For the background model behind inset lists, see Using ion-item-group.

\n

ios26-disabled remains supported as a deprecated alias for ios-theme-disabled.

\n'; + '

Special markup and classes

\n

Most Ionic markup works without changes. The combinations below are explicit opt-ins provided by the theme.

\n

\n

Submit buttons

\n

Set the brightness variable for the Ionic color used by a solid submit button. For example, a danger-colored button reads --ion-color-danger-brightness for its foreground and edge.

\n
:root {\n  --ion-color-danger-brightness: #fff;\n}
\n\n
<ion-button type="submit" color="danger">Submit</ion-button>\n<ion-button class="button-submit" fill="solid" color="danger">Continue</ion-button>
\n\n
\n
Preview
\nSubmit\nContinue\n
\n\n

Use .button-submit when the button needs the same treatment but cannot use type="submit".

\n

Toolbar button badges

\n

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.

\n

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>
\n\n
\n
Preview
\n\n \n \n 3\n \n\n
\n\n

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>
\n\n
\n
Preview
\n\n \n \n \n \n \n \n \n 3\n \n \n \n 99+\n \n \n\n
\n\n

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.

\n

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.

\n

Preferred overlay actions

\n

For 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.

\n
const buttons = [\n  { text: \'Cancel\', role: \'cancel\' },\n  { text: \'Continue\', role: \'preferred\' },\n];
\n\n

Buttons with no role or default keep the normal text color. cancel retains Ionic's cancellation behavior, selected remains a selection state, and destructive uses --ios-theme-destructive-color. An existing confirm role is not treated as preferred. Use preferred for the recommended action, not simply any action that confirms a choice.

\n

The theme follows the centered, unanchored UIAlertController presentation measured on iOS 26.1/26.5. Use ion-popover for an anchored menu. ios-theme-disabled / ios26-disabled retain the original Ionic presentation. Long content remains scrollable. Optional measured animation builders are described in Experimental animation; CSS alone does not replace Ionic's enter/leave animations.

\n

Tab bar position

\n

Add one of tab-bar-position-start, tab-bar-position-center, or tab-bar-position-end to an iOS ion-tab-bar to position the whole bar within its safe area. These classes work with both slot="top" and slot="bottom" and preserve the bar's width and press animation. Start and end follow the text direction (reversed in RTL). Without a class, the theme uses its default placement.

\n
<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>
\n\n

These classes do not reposition a separate ion-fab; leave room for it when choosing the bar's position.

\n

Two-line inset list items

\n

Place 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.

\n
<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 &amp; internet</ion-label>\n      <ion-note>Mobile, Wi-Fi, hotspot</ion-note>\n    </ion-item>\n  </ion-item-group>\n</ion-list>
\n\n
\n
Preview
\n\n \n Connections\n \n \n \n Network & internet\n Mobile, Wi-Fi, hotspot\n \n \n\n
\n\n

Use slot="end" on ion-note when you want the standard trailing-note layout instead.

\n

Inset-list section headers

\n

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.

\n

This is an introductory group. Place regular list items in a separate ion-item-group that follows it.

\n
<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>
\n\n
\n
Preview
\n\n \n \n \n \n

Lists

\n Inset-list examples\n
\n
\n
\n \n First item\n \n
\n
\n\n

Full-width segments

\n

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.

\n
<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>
\n\n

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.

\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>
\n\n
\n
Preview
\n\n New\n Replied\n\n
\n\n

Classic search bar in a condense header

\n

The theme gives iOS search bars the iOS 26 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.

\n

Place it in a toolbar with a color, such as color="light"; the classic background is derived from that color's contrast value.

\n

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>
\n\n
\n
Preview
\n
\n \n \n Search\n \n \n \n \n \n Search\n \n \n \n \n \n \n \n Recent item 1\n Recent item 2\n Recent item 3\n Recent item 4\n Recent item 5\n Recent item 6\n Recent item 7\n Recent item 8\n Recent item 9\n Recent item 10\n \n \n \n
\n
\n\n

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.

\n

Search-bar toolbars

\n

Add .toolbar-searchbar when an ion-toolbar combines a search bar with start or end buttons. The class centers the slotted controls and adjusts the spacing around the search field.

\n
<ion-toolbar class="toolbar-searchbar">\n  <ion-buttons slot="start">\n    <ion-button>Cancel</ion-button>\n  </ion-buttons>\n  <ion-searchbar></ion-searchbar>\n</ion-toolbar>
\n\n
\n
Preview
\n\n \n Cancel\n \n \n\n
\n\n

\n

Disable the theme for a component

\n

Add .ios-theme-disabled to an individual Ionic component when it must retain Ionic's standard iOS styling.

\n
<ion-button>iOS 26 theme</ion-button> <ion-button class="ios-theme-disabled">Standard Ionic button</ion-button>
\n\n
\n
Preview
\niOS 26 theme Standard Ionic button\n
\n\n

For the background model behind inset lists, see Using ion-item-group.

\n

ios26-disabled remains supported as a deprecated alias for ios-theme-disabled.

\n'; diff --git a/docs/setup.md b/docs/setup.md index 87310d4ab..7a110795a 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -1,6 +1,6 @@ # Set up the iOS 26 theme -Use an existing Ionic Angular, React, or Vue application with `@ionic/core >=8.8.1 <10`. +Apply the iOS 26 theme to an Ionic Angular, React, or Vue app. This setup supports `@ionic/core >=8.8.1 <10`. ## 1. Install diff --git a/docs/special-markup.md b/docs/special-markup.md index 683acff4c..16fbe2b43 100644 --- a/docs/special-markup.md +++ b/docs/special-markup.md @@ -6,19 +6,21 @@ title: Special markup and classes Most Ionic markup works without changes. The combinations below are explicit opt-ins provided by the theme. -## Primary submit buttons + -Solid primary submit buttons use `--ion-color-primary-brightness` for their foreground and border treatment. Define a value with sufficient contrast for your primary color. +## Submit buttons + +Set the brightness variable for the Ionic color used by a solid submit button. For example, a danger-colored button reads `--ion-color-danger-brightness` for its foreground and edge. ```css :root { - --ion-color-primary-brightness: #96feff; + --ion-color-danger-brightness: #fff; } ``` ```html preview -Submit -Continue +Submit +Continue ``` Use `.button-submit` when the button needs the same treatment but cannot use `type="submit"`. @@ -219,7 +221,9 @@ Add `.toolbar-searchbar` when an `ion-toolbar` combines a search bar with start ``` -## Opting out + + +## Disable the theme for a component Add `.ios-theme-disabled` to an individual Ionic component when it must retain Ionic's standard iOS styling.