Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-sidebar-menu-button.json --yes

Sidebar menu button

Pro

One row of the sidebar, its icon and words, that opens a page or runs an action and shows which page is current, for React and Tailwind CSS. Part of Goop Pro.

Press a row to make it the active one; switch the size, the icons, the count and long words. The rows go nowhere: a press only moves the active row.

When to use

  • One row of the sidebar, its icon and words, that opens a page or runs an action and shows which page is current.

Installation

Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Sidebar menu button on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.

Terminal
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-sidebar-menu-button.json --yes
PROMPT
Add the Goop Sidebar menu button to this project. The install steps are at https://goop.so/docs/install.md

Usage

TSX
import { SidebarMenuButton, SidebarMenuBadge } from '@/components/ui/goop/sidebar-menu-button';
import { SidebarMenu, SidebarMenuItem } from '@/components/ui/goop/sidebar-group';

<SidebarMenu>
  <SidebarMenuItem>
    <SidebarMenuButton icon="plus" onClick={openCreate}>
      New issue
    </SidebarMenuButton>
  </SidebarMenuItem>
  <SidebarMenuItem>
    <SidebarMenuButton asChild icon="inbox" isActive>
      <RouterLink href="/inbox">Inbox</RouterLink>
    </SidebarMenuButton>
  </SidebarMenuItem>
</SidebarMenu>
  • Fits: chat, frame, inbox (their recipes).
  • height, width, padding, corner, text: add no class for these.

API reference

Options
OptionTypeWhat it does
size?'sm' | 'md' = 'md'md the settings sidebar's row, sm the main sidebar's: the Link's two nav sizes.
onClick?MouseEventHandler<HTMLAnchorElement | HTMLButtonElement>The row's press: on a link row as on any link; with no href (and no asChild) the row is a button that fires it.
icon?IconNameThe glyph before the words, by the pack's name; left out, the row draws no glyph.
isActive?boolean = falseThe current page: the row keeps the deeper fill and the dark words.
asChild?boolean = false
href?string
  • Takes every prop of Link but variant and mark (its page: link.md)
Parts
PartWhat it is
SidebarMenuBadgeA row's trailing count (<SidebarMenuBadge>3</SidebarMenuBadge>, the row's last child)
  • data-slot values (to select a part by): sidebar-menu-badge, sidebar-menu-button, sidebar-menu-button-arrow, sidebar-menu-button-icon, sidebar-menu-button-label

Keyboard

KeyWhat it does
EnterFollow

Accessibility

  • The native element answers the keyboard.
  • hover, active, focus-visible: the browser's own (:hover, :active, :focus-visible): write nothing

Its states are drawn from attributes and props, so assistive technology and your agent read the same thing:

StateDrawn by
currentthe attribute aria-current=page

Notes for AI

Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.

goop.so/themes/trail/components/sidebar-menu-button.md · the page as Markdown
Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-sidebar-menu-button.json --yes

Where would you like to start?

Free · now

The Goop plugin

A design system for your AI coding agent, so screen ten matches screen one.

/plugin marketplace add goop-so/skillsthen /plugin install goop@goopCodex, Cursor, ChatGPT, the Claude app and more: Connect Goop
FreePro

The components

Every part live, with its props, its keys and what an agent sees. Whole page and app templates, working with sample data.