Theme
Install with your agentnpx shadcn@4.23.1 add @goop/trail-app-frame

App frame

Free

The window every page of the app sits in, with the navigation at its side and the top bar over the page, for React and Tailwind CSS. Free, MIT.

Press a sidebar row (or Tab to it and press Enter) to open its page beside it; opening Inbox reads its notices, so its count goes. On a phone-sized window the same five pages stand in a bar across the frame’s foot, where a press (or Enter or Space) opens a page the same way, and the top bar’s button opens the sidebar in a sheet. In a theme whose frame is the icon rail (Meadow), the rail’s icons switch the section (its tile goes home, its plus adds a note, the avatar opens your account), the list column’s rows open their page beside it, and the list’s toggle folds it into the rail and back. The pages, the notes and the notices are our own sample, and live in this page alone.

When to use

  • The window every page of the app sits in, with the navigation at its side and the top bar over the page.

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 App frame on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing.

Terminal
npx shadcn@4.23.1 add @goop/trail-app-frame
PROMPT
Add the Goop App frame to this project. The install steps are at https://goop.so/docs/install.md

Usage

TSX
import { AppFramePanelSeam, AppFrame, AppFrameRail, AppFramePanel, AppFrameSecondPanel, AppFrameFooter, AppFrameTrigger, AppFrameSecondPanelTrigger } from '@/components/goop/patterns/app-frame';
import { Sidebar, SidebarHeader, SidebarHeaderRow, SidebarContent } from '@/components/ui/goop/sidebar';
import { WorkspaceSwitcher, WorkspaceSwitcherTrigger, WorkspaceSwitcherContent, WorkspaceSwitcherItem } from '@/components/ui/goop/workspace-switcher';
import { SidebarGroup, SidebarGroupContent, SidebarMenu, SidebarMenuItem } from '@/components/ui/goop/sidebar-group';
import { SidebarMenuButton } from '@/components/ui/goop/sidebar-menu-button';
import { TopBar, TopBarRow, TopBarGroup, TopBarTitle } from '@/components/ui/goop/top-bar';

<AppFrame>
  <AppFrameRail>
    <Sidebar aria-label="Main">
      <SidebarHeader>
        <SidebarHeaderRow>
          <WorkspaceSwitcher defaultValue="fieldwork">
            <WorkspaceSwitcherTrigger name="Fieldwork" />
            <WorkspaceSwitcherContent>
              <WorkspaceSwitcherItem value="fieldwork" name="Fieldwork" />
            </WorkspaceSwitcherContent>
          </WorkspaceSwitcher>
        </SidebarHeaderRow>
      </SidebarHeader>
      <SidebarContent>
        <SidebarGroup>
          <SidebarGroupContent>
            <SidebarMenu>
              <SidebarMenuItem>
                <SidebarMenuButton href="/inbox" icon="inbox" size="sm" isActive>
                  Inbox
                </SidebarMenuButton>
              </SidebarMenuItem>
            </SidebarMenu>
          </SidebarGroupContent>
        </SidebarGroup>
      </SidebarContent>
    </Sidebar>
  </AppFrameRail>
  <AppFramePanel
    header={
      <TopBar role="banner">
        <TopBarRow>
          <TopBarGroup>
            <AppFrameTrigger rail />
            <TopBarTitle>Inbox</TopBarTitle>
          </TopBarGroup>
        </TopBarRow>
      </TopBar>
    }
  >
    …
  </AppFramePanel>
</AppFrame>
  • Fits: app, chat, flow, frame, inbox, overview, schedule, states (their recipes).
  • height, width, padding, gap, corner, border, background, shadow: add no class for these.

API reference

Options
OptionTypeWhat it does
variantdefault | divider = default
  • Each option with its sentence: app-frame--options.md
  • State: navigationOpen (navigationOpen / defaultNavigationOpen / onNavigationOpenChange)
Parts
PartWhat it is
AppFrameRailThe navigation's column
AppFramePanelThe page's main; its props: app-frame--panel.md
AppFrameSecondPanelA second body container beside the panel, for a page of two such as a list and its open record; its props: app-frame--second-panel.md
AppFrameFooterThe strip across the frame's foot, passed to AppFrame's footer; its props: app-frame--footer.md
AppFrameTriggerThe control that opens the navigation below wide, first in the top bar; its props: app-frame--trigger.md
AppFrameSecondPanelTriggerThe control that opens the second container's content below wide, at the end of the panel's top bar; its props: app-frame--second-panel-trigger.md
AppFramePanelSeamA seam for a frame composed round this one
  • Class recipes (cva): appFrameVariants (AppFrame)
  • data-slot values (to select a part by): app-frame, app-frame-footer, app-frame-panel, app-frame-panel-body, app-frame-panel-header, app-frame-phone-foot, app-frame-phone-nav, app-frame-rail, app-frame-second-panel, app-frame-second-panel-body, app-frame-second-panel-header, app-frame-second-panel-trigger, app-frame-trigger

AppFrame: every option

TSX
import { AppFrame } from '@/components/goop/patterns/app-frame';

Options

  • variant: default (default), divider
  • arrangement?: AppFrameArrangement — The contract's arrangement (the catalogue's ids): Trail draws sidebar alone, every other id as it.
  • scroll?: 'page' | 'panel' — What scrolls below wide: page (the default) the document, the header sticking at the top; or panel the panel's body in a frame of the window's height, for a part pinned under the content (a conversation's composer).
  • footer?: ReactNode — The strip across the foot, an AppFrameFooter; none if left out.
  • navigationOpen?: boolean — Whether the navigation is open below wide, when the caller holds it.
  • defaultNavigationOpen?: boolean = false — Whether the navigation starts open, when the frame holds it.
  • onNavigationOpenChange?: (open: boolean) => void — Called as the navigation opens or closes.
  • navigationLabel?: string = 'Navigation' — The open navigation's spoken name.
  • navigationCloseLabel?: string = 'Close navigation' — Its close control's spoken name.
  • container?: HTMLElement | null — Where the open navigation is drawn; the end of <body> when left out.
  • phoneNav?: ReactNode — A phone's bottom navigation, across the foot below narrow: the theme's TabBar of the app's places (five or fewer; more keep the menu button's sheet alone).
  • State: navigationOpen (navigationOpen / defaultNavigationOpen / onNavigationOpenChange)

AppFramePanel

The page's main.

TSX
import { AppFramePanel } from '@/components/goop/patterns/app-frame';

Options

  • header?: ReactNode — Its header, never scrolled with the body: a TopBar, role="banner".
  • size?: 'fill' | 'list' = 'fill' — Beside an AppFrameSecondPanel: fill shares the row, list takes a list's narrower width.

AppFrameSecondPanelTrigger

The control that opens the second container's content below wide, at the end of the panel's top bar.

TSX
import { AppFrameSecondPanelTrigger } from '@/components/goop/patterns/app-frame';

Options

  • children?: ReactElement — The control that opens the second container's content; a quiet TopBarAction if left out.
  • label?: string = 'Show details' — The spoken name of the theme's own control.

AppFrameSecondPanel

A second body container beside the panel, for a page of two such as a list and its open record.

TSX
import { AppFrameSecondPanel } from '@/components/goop/patterns/app-frame';

Options

  • header?: ReactNode — Its header, never scrolled with the body: a TopBar.
  • inPlace?: boolean = false — Below the fold, takes the first container's place.
  • open?: boolean — Whether its content is open in its sheet below wide, when the caller holds it.
  • defaultOpen?: boolean = false — Whether its content starts open in its sheet below wide, when the container holds it.
  • onOpenChange?: (open: boolean) => void — Called as its sheet opens or closes: by its trigger, its close control, Escape, the scrim, or the window reaching wide.
  • closeLabel?: string = 'Close' — Its sheet's close control's spoken name.

AppFrameTrigger

The control that opens the navigation below wide, first in the top bar.

TSX
import { AppFrameTrigger } from '@/components/goop/patterns/app-frame';

Options

  • children?: ReactElement — The control that opens the navigation; a quiet TopBarAction if left out.
  • label?: string = 'Show navigation' — The spoken name of the theme's own control.
  • rail?: boolean = false — From wide up, the rail's Sidebar's collapse toggle in the trigger's place (none drawn where there is no Sidebar).

Accessibility

  • focus-visible: the browser's own (:focus-visible): write nothing

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/app-frame.md · the page as Markdown
Theme
Install with your agentnpx shadcn@4.23.1 add @goop/trail-app-frame

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.