Skip to content

Kumo Sidebar Support#340

Open
hkfoster wants to merge 4 commits intocloudflare:stritt/sidebarfrom
hkfoster:stritt/sidebar
Open

Kumo Sidebar Support#340
hkfoster wants to merge 4 commits intocloudflare:stritt/sidebarfrom
hkfoster:stritt/sidebar

Conversation

@hkfoster
Copy link
Copy Markdown

Summary

Adds a new Sidebar compound component to @cloudflare/kumo — a composable sidebar navigation with collapsible groups, icon-only mode, peeking, resizing, keyboard shortcuts, sliding views, and responsive mobile support.

Sub-components

Sidebar.Provider · Sidebar.Root · Sidebar.Header · Sidebar.Content · Sidebar.Footer · Sidebar.Trigger · Sidebar.Group · Sidebar.GroupLabel · Sidebar.GroupContent · Sidebar.Menu · Sidebar.MenuItem · Sidebar.MenuButton · Sidebar.MenuAction · Sidebar.MenuBadge · Sidebar.MenuSub · Sidebar.MenuSubItem · Sidebar.MenuSubButton · Sidebar.Separator · Sidebar.Input · Sidebar.Rail · Sidebar.ResizeHandle · Sidebar.MenuChevron · Sidebar.Collapsible · Sidebar.CollapsibleTrigger · Sidebar.CollapsibleContent · Sidebar.SlidingViews · Sidebar.SlidingView

Features

  • Expand / collapse with configurable collapsible mode (icon, offcanvas, none)
  • Peeking — temporarily expand collapsed sidebar on hover, with explicit footer exclusion
  • Resizable — drag handle with configurable minWidth / maxWidth and auto-collapse threshold
  • Keyboard shortcut — configurable via keyboardShortcut prop (e.g. mod+b), exposed in trigger tooltip
  • Sliding views — animated horizontal transitions between navigation surfaces (e.g. account ↔ zone)
  • Collapsible groupsSidebar.Collapsible and Sidebar.Group with defaultOpen support
  • Icon-only modeMenuButton tooltips auto-show when sidebar is collapsed
  • Left / right side — via side prop on Provider
  • Responsive mobile — sheet-based overlay via Base UI Dialog on narrow viewports
  • Animated footer trigger — custom SVG panel icon matching Stratus NavFooter, with aria-expanded, aria-keyshortcuts, and tooltip
  • Sticky footer — pinned to sidebar bottom in all states (expanded, collapsed, peeking)

Docs

  • Full documentation page at /components/sidebar with 9 interactive demos: Basic, Collapsible Groups, Toggle, Full (kitchen sink), Resizable, Right Side, Peeking, Keyboard Shortcut, Sliding Views

Validation

  • pnpm typecheck — 0 errors (both kumo and kumo-docs-astro)
  • pnpm --filter @cloudflare/kumo test — 708 tests pass (39 sidebar-specific)
  • pnpm lint — 0 new errors (1 pre-existing no-noninteractive-element-interactions on <aside>)

No breaking changes

New component addition. No existing APIs modified.

- Match Stratus sidebar dimensions: menu padding, item height, gaps,
  text sizing, icon offset, transitions
- Move px padding from Menu to Content
- Match Stratus GroupLabel: grid-rows animation, border separator
- Match Stratus Separator: div-based with py-3, inner border-b
- Update sidebar width to 16.25rem
- Fix caret right-alignment on MenuButtons
- Add gap-2 for badge spacing in MenuButton and MenuSubButton
- Add cursor-pointer to all clickable sidebar elements
- Add before pseudo-element for 1px vertical gap coverage
- Restyle SidebarInput to match Stratus search bar
- Remove collapsible group path (collapsible prop, GroupContent,
  collapsible GroupLabel branch) — use Sidebar.Collapsible instead
- Update KUMO_SIDEBAR_STYLING.width.expanded to 16.25rem
- Remove SidebarCollapsibleGroupDemo and docs section
@cloudflare cloudflare deleted a comment from ask-bonk bot Apr 1, 2026
@cloudflare cloudflare deleted a comment from ask-bonk bot Apr 1, 2026
@cloudflare cloudflare deleted a comment from ask-bonk bot Apr 2, 2026
@cloudflare cloudflare deleted a comment from ask-bonk bot Apr 2, 2026
@cloudflare cloudflare deleted a comment from ask-bonk bot Apr 2, 2026
@stritt
Copy link
Copy Markdown
Collaborator

stritt commented Apr 2, 2026

/bonk review this code

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk bot commented Apr 2, 2026

@stritt Bonk workflow was cancelled.

View workflow run · To retry, trigger Bonk again.

@stritt
Copy link
Copy Markdown
Collaborator

stritt commented Apr 2, 2026

/bonk review this code

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 2, 2026

npm i https://pkg.pr.new/@cloudflare/kumo@340

commit: 9362dd0

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

Docs Preview

View docs preview

Commit: 9362dd0

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

Visual Regression Report

14 screenshot(s) with visual changes:

Button / Basic

83,225 px (44.46%) changed

Before After Diff
Before After Diff

Button / Variant: Primary

68,006 px (40.71%) changed

Before After Diff
Before After Diff

Button / Variant: Secondary

64,552 px (38.64%) changed

Before After Diff
Before After Diff

Button / Variant: Ghost

64,637 px (38.7%) changed

Before After Diff
Before After Diff

Button / Variant: Destructive

67,851 px (40.62%) changed

Before After Diff
Before After Diff

Button / Variant: Outline

64,628 px (38.69%) changed

Before After Diff
Before After Diff

Button / Variant: Secondary Destructive

64,844 px (38.82%) changed

Before After Diff
Before After Diff

Button / Sizes

121,549 px (53.42%) changed

Before After Diff
Before After Diff

Button / With Icon

104,604 px (50.45%) changed

Before After Diff
Before After Diff

Button / Icon Only

81,733 px (43.66%) changed

Before After Diff
Before After Diff

Button / Loading State

108,199 px (52.18%) changed

Before After Diff
Before After Diff

Button / Disabled State

104,660 px (50.47%) changed

Before After Diff
Before After Diff

Dialog (Open)

5,234,939 px (26.14%) changed

Before After Diff
Before After Diff

Select (Open)

1,443,618 px (9.78%) changed

Before After Diff
Before After Diff

Generated by Kumo Visual Regression

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