Skip to content

shadcn.io is an independent project built on shadcn/ui

Free

Sheet with Tabs for Solid

An Open Sheet button reveals Project Details with Overview, Activity, and Settings tabs, starting on Overview.

UI library: Ark UI

The title is Project Details, with the line View and manage project information. Overview, Activity, and Settings are tabs, and Overview's paragraph is the one showing.

Use it when one record has a few views that share a panel. An Accordion fits if more than one section should stay open. In Solid, Ark UI does not switch this tab text.

Preview

Preview width

Installation

MCP · Pro
Make your AI a shadcn expert
Your agent installs components, builds pages and restyles your app from one prompt, in Claude Code, Cursor or VS Code.
Part of Pro

Anatomy

Sheet anatomy: content, close, title, description, footer

Usage

<Sheet>
    <SheetTrigger asChild={props => <Button {...props()}>Open Sheet</Button>} />
    <SheetContent>
      <SheetHeader>
        <SheetTitle>Project Details</SheetTitle>
        <SheetDescription>View and manage project information</SheetDescription>
      </SheetHeader>
      <Tabs class="p-4" defaultValue="overview">
        <TabsList variant="line">
          {TABS.map(tab => <TabsTrigger value={tab.id}>
              {tab.label}
            </TabsTrigger>)}
        </TabsList>
        {TABS.map(tab => <TabsContent class="text-muted-foreground text-sm" value={tab.id}>
            {tab.content}
          </TabsContent>)}
      </Tabs>
    </SheetContent>
  </Sheet>

FAQ

How are the tabs built?

With Tabs, TabsList, TabsTrigger and TabsContent, mapped from a static array of three tabs. Overview is the default tab. TabsList uses variant="line", and each trigger and panel share a value.

How do people move between tabs with the keyboard?

Tab moves focus onto the selected tab, and the arrow keys move between tabs. Tab again moves into the panel.

How do I open the sheet on a given tab?

Control the tabs: keep the value in state, set it before you open the sheet, and update it on change. Pass value and read details.value in onValueChange.

What's in each tab?

One paragraph of muted text per tab. Replace it with the real panel: a member list, an activity feed, a settings form.

How does Open Sheet open it?

The button labeled Open Sheet is the trigger, and its text is the accessible name. asChild on SheetTrigger receives props: spread them onto the button.

What does the sheet announce?

SheetTitle names the dialog for assistive tech, so every sheet renders one; hide it with sr-only when the design has no visible heading. It reads Project Details, with View and manage project information as the description.

API Reference

Sheet

Sets asChild and props. The rest is on the Sheet page.

Button

Sets props. The rest is on the Button page.

Tabs

Sets defaultValue="overview", variant="line" and value={tab.id}. The rest is on the Tabs page.