Skip to content

Collapsible sidebar: keyboard shortcut, tooltips when collapsed, mobile behaviour #18

Open

Description

@AbdullahMukadam

What problem are you trying to solve?

The collapsible-sidebar from #15 collapses to an icon rail, but a few things people expect from an app sidebar are missing:

  • There's no keyboard shortcut to toggle it.
  • When collapsed, item names only show as a native title, not a styled tooltip.
  • On small screens the rail still takes horizontal space; there's no off-canvas mode.

Proposed solution

  • Optional shortcut prop on CollapsibleSidebarProvider (default mod+b) that calls setCollapsed.
  • Show a tooltip with the item label when collapsed, using the shadcn tooltip primitive (becomes a registryDependency).
  • Below a breakpoint, render the sidebar as a sheet that slides in with tk-slide and keep the share morph for the active pill.
  • Optional groups/section headings whose labels fade like item labels.

Alternatives considered

Pointing people to the shadcn sidebar block. It handles mobile, but it doesn't animate collapsing with View Transitions or compose with the tk-* classes.

Activity

  1. adityayaduvanshi commented on Nov 15, 2026

    @adityayaduvanshi
    Contributor

    Hi! I'd like to take this once #15 lands. I have a local implementation on top of #15's branch: a shortcut prop (default mod+b, false to disable) that ignores fields, extra modifiers and key repeat; shadcn tooltip on collapsed items; a modal sheet below a mobileBreakpoint (768 by default) that slides in with tk-slide, traps focus, closes on Escape or an outside click and returns focus; and CollapsibleSidebarGroup with fading labels. It has Playwright coverage on the e2e setup from #19. Happy to adjust the API before opening a PR.

  2. AbdullahMukadam commented on Nov 16, 2026

    @AbdullahMukadam
    MemberAuthor

    Okay, Will try to merge the 15 tomorrow is it feels correct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions