Skip to content

docs(toggle): document custom on/off icons with playground - #4872

Open
ShaneK wants to merge 1 commit into
feature-9.1from
FW-7639
Open

ShaneK wants to merge 1 commit into
feature-9.1from
FW-7639

Conversation

@ShaneK

@ShaneK ShaneK commented Nov 18, 2026

Copy link
Copy Markdown
Member

⚠️ This PR uses a dev build. The StackBlitz dependencies in static/code/stackblitz/v9/ and the CDN links in static/usage/v9/toggle/on-off-icons/demo.html and static/usage/v9/fab/animation/demo.html need to be switched to the released version once 9.1 is out.

Issue number: internal


What is the current behavior?

Currently, the toggle docs don't cover changing the on/off label icons, since they were hardcoded per mode.

What is the new behavior?

This PR adds a Custom On / Off Icons section to the toggle docs for the new checkedIcon and uncheckedIcon properties from ionic-team/ionic-framework#31774, and adds the toggleCheckedIcon and toggleUncheckedIcon options to the config table. The new playground shows a dark mode toggle with moon and sun icons.

Does this introduce a breaking change?

  • Yes
  • No

Other information

The dev build is from the framework PR, which already includes the fab animated change, so the fab playground's pin moves to it too.

Toggle custom icons docs (this branch)

@ShaneK
ShaneK requested a review from a team as a code owner November 18, 2026 17:54
@ShaneK
ShaneK requested review from brandyscarney and removed request for a team November 18, 2026 17:54
@vercel

vercel Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ionic-docs Ready Ready Preview Nov 18, 2026 5:55pm UTC

Request Review

@brandyscarney brandyscarney left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just one issue with the JavaScript example.

@@ -0,0 +1,10 @@
```html

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```html
```vue

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The icons are not showing up in the StackBlitz for this example:

CleanShot 2026-11-18 at 3 31 34 PM

I believe you need to use addIcons here.

This branch was successfully deployed

1 active deployment
Preview — 6c2785fd Deployed Nov 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants