Skip to content

[docs][toggle group] Add multiple demo - #4343

Merged
aarongarciah merged 4 commits into
mui:masterfrom
aarongarciah:toggle-group-multiple
Mar 18, 2026
Merged

aarongarciah merged 4 commits into
mui:masterfrom
aarongarciah:toggle-group-multiple

Conversation

@aarongarciah

@aarongarciah aarongarciah commented Mar 16, 2026 •

Copy link
Copy Markdown
Member

Part of #3027

https://deploy-preview-4343--base-ui.netlify.app/react/components/toggle-group#multiple

Apart from the demo being added, a couple of border radius are fixed on the ToggleGroup and Tooltip hero Tailwind demos so the radius of the hover state matches the one in the CSS Modules counterpart:

The new demo reuses the same as icons the Tooltip hero demo. I tried to simplify the demo by not using icons but our current font doesn't support italics, and a serif font looked tough. In fact, markdown content that uses italics is not rendering italics. We'll fix this with future UI changes.

@aarongarciah aarongarciah self-assigned this Mar 16, 2026
@aarongarciah aarongarciah added docs Improvements or additions to the documentation. component: toggle group Changes related to the toggle group component. labels Mar 16, 2026
@pkg-pr-new

pkg-pr-new Bot commented Mar 16, 2026 •

Copy link
Copy Markdown
  • base-ui-tanstack-start

  • vite-css-base-ui-example

    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/react@4343
    
    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/utils@4343
    

commit: f7df01b

@mui-bot

mui-bot commented Mar 16, 2026 •

Copy link
Copy Markdown

Bundle size report

Bundle Parsed size Gzip size
@base-ui/react 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

@netlify

netlify Bot commented Mar 16, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit f7df01b
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/69b966c96055870008b97099
😎 Deploy Preview https://deploy-preview-4343--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@aarongarciah
aarongarciah marked this pull request as ready for review March 16, 2026 12:09
@aarongarciah aarongarciah mentioned this pull request Mar 16, 2026
12 of 29 tasks
@flaviendelangle

Copy link
Copy Markdown
Member

Claude Code review:
The only real complain he has is regarding the focus-visible:bg-none but since we use it a lot I guess there is a reason 👀

Issues Found

  1. focus-visible:bg-none is not a valid Tailwind class (minor bug)
    Both the new Tailwind demo and the existing hero demo use focus-visible:bg-none. bg-none is not a standard Tailwind utility and generates no CSS — so this has no effect. It looks like the intent was to reset the background on focus-visible to override hover styles. This pre-existing bug is being copied into the new file, worth fixing here.

  2. rounded-xs → rounded-sm fix is correct
    In Tailwind v4, rounded-xs = 2px, rounded-sm = 4px (0.25rem). The CSS Modules version uses border-radius: 0.25rem, so rounded-sm is the right match. Good catch.

  3. Section ordering: "Examples" placed before "Anatomy"
    In other component docs pages (accordion, dialog, etc.), "Examples" typically comes after "Anatomy" and "API reference". Worth confirming this ordering is intentional or aligns with the new docs structure convention.

  4. defaultValue pre-selects two items — undocumented
    Using defaultValue={['bold', 'italic']} immediately shows multi-selection, which is great. A short prose note like "Use defaultValue to set initially pressed items" would help readers scanning the page.

  5. SVG icon duplication (minor, non-blocking)
    BoldIcon, ItalicIcon, UnderlineIcon are now copied across 4 files (tooltip hero × 2, toggle-group multiple × 2). Demo files being self-contained is a reasonable convention for copy-paste friendliness, but worth a team decision if shared icons are preferred.

Overall
Clean, focused docs PR with no API or behavior impact. The focus-visible:bg-none issue is the only real correctness concern. Otherwise ready to merge after confirming section ordering intent.

@aarongarciah

aarongarciah commented Mar 17, 2026 •

Copy link
Copy Markdown
Member Author

@flaviendelangle fixed the section ordering. Re focus-visible:bg-none, bg-none is a thing in TW https://tailwindcss.com/docs/background-image#removing-background-images and it does have an effect.

image

@aarongarciah
aarongarciah force-pushed the toggle-group-multiple branch from 8f93fe7 to 62794eb Compare March 17, 2026 13:43
@aarongarciah aarongarciah changed the title [toggle group] Add multiple demo [docs][toggle group] Add multiple demo Mar 17, 2026
@flaviendelangle

Copy link
Copy Markdown
Member

Well, Claude Code hallucination then

@colmtuite

Copy link
Copy Markdown
Contributor

@aarongarciah Remove the hover style from your example and the main demo.

@aarongarciah
aarongarciah force-pushed the toggle-group-multiple branch from 9d9b308 to f7df01b Compare March 17, 2026 14:35
@aarongarciah

Copy link
Copy Markdown
Member Author

@colmtuite done. The Tooltip hero demo still has the hover styles, though. Not sure if you prefer to remove that as well.

@colmtuite

Copy link
Copy Markdown
Contributor

That's fine, will fix separately.

@aarongarciah
aarongarciah merged commit 47d2f16 into mui:master Mar 18, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: toggle group Changes related to the toggle group component. docs Improvements or additions to the documentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants