feat(sidebar): add fullScreenOnMobile prop#642
Draft
mattrothenberg wants to merge 2 commits into
Draft
Conversation
On mobile the sidebar sheet leaves a sliver of the page visible. That sliver
exists to show which page you are on, but the header breadcrumbs already carry
that, and the leftover width squeezes nav items into small touch targets.
`fullScreenOnMobile` expands the sheet to the full viewport instead. The
backdrop is suppressed (nothing shows behind a full-width sheet) and the right
border is dropped (no adjacent content to divide). Default is false, so
existing consumers are unaffected.
Also fixes Breadcrumbs.Link truncating alongside the current crumb: flexbox
distributed shrinkage across every crumb, turning the trail into unreadable
stubs ("Com… › Anal… › Acco…"). Ancestors are now shrink-0 so only the current
page gives up width.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
commit: |
Contributor
Docs PreviewCommit: |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.














































































Summary
On mobile the sidebar sheet leaves a sliver of the page visible. That sliver exists to show which page you're on — but the header breadcrumbs already carry that, and the leftover width squeezes nav items into small touch targets.
fullScreenOnMobileexpands the sheet to the full viewport instead:w-fullinstead ofw-(--sidebar-width)inert/aria-hidden, and Escape-to-close are untouchedfalse, so existing consumers are unaffectedAlso included
Breadcrumbs.Linkhadmin-w-0+truncate, so flexbox distributed shrinkage across every crumb — a narrow trail rendered asCom… › Anal… › Acco…. Ancestors are nowshrink-0; onlyBreadcrumbs.Currentgives up width. This matters here because the full-screen nav leans on breadcrumbs to carry the route.Demo
New "Full-screen mobile" example on the sidebar docs page, with a viewport slider (280–720px). Nav mirrors the real product IA (Observe / Build / Secure), with quick search and an avatar account switcher. The trail is derived from the nav tree, so it can't drift out of sync with the sidebar.
Not addressed
<button>, not an input. Still open.Checklist
🤖 Generated with Claude Code