npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@sytechui/sidebar

v3.0.2

Published

A composable responsive sidebar for application layouts.

Downloads

22

Readme

@sytechui/sidebar

A composable application sidebar modeled after the shadcn sidebar layout while using SytechUI components and theme tokens.

<SidebarProvider>
  <Sidebar>
    <SidebarHeader>Workspace</SidebarHeader>
    <SidebarContent>
      <SidebarGroup>
        <SidebarGroupLabel>Application</SidebarGroupLabel>
        <SidebarGroupContent>
          <SidebarMenu>
            <SidebarMenuItem>
              <SidebarMenuButton href="/dashboard">Dashboard</SidebarMenuButton>
            </SidebarMenuItem>
          </SidebarMenu>
        </SidebarGroupContent>
      </SidebarGroup>
    </SidebarContent>
    <SidebarFooter>Account</SidebarFooter>
    <SidebarRail />
  </Sidebar>
  <SidebarInset>
    <SidebarTrigger />
  </SidebarInset>
</SidebarProvider>

Layout configuration

Configure the layout once on SidebarProvider. variant controls appearance, while collapsible independently controls what happens when the sidebar is closed:

<SidebarProvider variant="floating" collapsible="offcanvas">
  <Sidebar>{/* navigation */}</Sidebar>
  <SidebarInset>{/* page content */}</SidebarInset>
</SidebarProvider>
  • variant: "sidebar" (default), "floating", or "inset".
  • collapsible: "offcanvas" (default), "icon", or "none".
  • side: "left" (default) or "right".

These options are orthogonal, so combinations such as variant="inset" with collapsible="icon" work without coordinating slot classes manually. SidebarInset, SidebarTrigger, and SidebarRail all consume the same provider configuration.

Sidebar widths

width and collapsedWidth set the --sidebar-width and --sidebar-width-icon CSS variables on SidebarProvider. Both accept a string (any CSS length) or a number (treated as pixels):

<SidebarProvider collapsedWidth="4rem" width={280}>
  {/* sidebar layout */}
</SidebarProvider>

These variables only control the desktop sidebar. The mobile Drawer's width is set by its own size prop — see Customizing the mobile Drawer.

Keyboard shortcut

SidebarProvider toggles the desktop sidebar on Cmd+B (Mac) / Ctrl+B (Windows/Linux) by default, using mod, shift, and alt tokens:

<SidebarProvider toggleShortcut="mod+shift+s">{/* sidebar layout */}</SidebarProvider>
<SidebarProvider toggleShortcut={false}>{/* sidebar layout */}</SidebarProvider>

The shortcut is ignored while focus is inside an <input>, <textarea>, or any contenteditable element, so it never steals a native editing shortcut like bold text.

Customizing the mobile Drawer

Forward any Drawer prop (backdrop, size, motionProps, classNames, ...) through drawerProps on Sidebar:

<Sidebar drawerProps={{backdrop: "blur", size: "xs"}}>{/* sidebar layout */}</Sidebar>

isOpen and onOpenChange are always owned by the sidebar and cannot be overridden.

Mobile dismissal

SidebarMenuButton and SidebarMenuSubButton can close the mobile Drawer after being pressed via closeMobileOnPress. A SidebarMenuButton rendered with href (a navigation link) and every SidebarMenuSubButton default to true; a SidebarMenuButton rendered without href (a plain button, often used to trigger a submenu) defaults to false so expanding a submenu doesn't also dismiss the Drawer. Either direction can be overridden explicitly:

<SidebarMenuButton href="/dashboard" closeMobileOnPress={false}>
  Dashboard
</SidebarMenuButton>
<SidebarMenuButton closeMobileOnPress onPress={() => setSubmenuOpen((open) => !open)}>
  Settings
</SidebarMenuButton>

Theme slots

SidebarProvider accepts Sytech's standard classNames slot overrides. A local component className is applied after the provider slot class, so it can make a one-off override.

<SidebarProvider
  classNames={{
    base: "bg-content2",
    inner: "bg-content1",
    menuButton: "data-[active=true]:bg-primary data-[active=true]:text-primary-foreground",
    footer: "border-t border-divider",
  }}
>
  {/* sidebar layout */}
</SidebarProvider>

The available slots cover the complete compound component: base, sidebar, gap, container, inner, mobile, trigger, rail, inset, input, header, footer, separator, content, group, groupLabel, groupAction, groupContent, menu, menuItem, menuButton, menuAction, menuBadge, menuSub, menuSubItem, and menuSubButton.

Animation follows HeroUIProvider's global disableAnimation setting and can also be controlled for one layout with <SidebarProvider disableAnimation>.