Sidebar 04

New

A repository browser: a file tree in an off-canvas sidebar that works from the keyboard (arrows, Home, End, type-ahead), with the open file's path in the breadcrumb.

Installation

pnpm dlx shadcn@latest add https://kagadmodyaa.vercel.app/r/sidebar-04.json

Needs a React + Tailwind project set up with shadcn. Copies the block's files into your project, along with the components it uses, so you can edit all of it.

Files

What the command adds to your project, and where.

  • app/sidebar-04/page.tsx

    The page itself, at the route it is meant for. Move or rename it to suit your app.

  • components/sidebar-04/fernbank.tsx

    A component the page imports. Edit it freely.

  • components/sidebar-04/file-tree.tsx

    A component the page imports. Edit it freely.

  • components/sidebar-04/icons.tsx

    A component the page imports. Edit it freely.

  • components/sidebar-04/repo-data.ts

    A component the page imports. Edit it freely.

It also installs the components it is built from, unless you already have them: Avatar, Breadcrumb, Button, Dropdown Menu, Kbd, Separator, Sidebar.

Links, copy and the product name are placeholders; swap in your own. Where a block has a form, its submit handler is a stub for your own request.

More in Sidebar

See all 12 Sidebar blocks