Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

Frame for Astro

Frame components for a subtle raised surface.

FramePanel adds a subtle raised surface to a single element. Frame groups several panels (and optional header or footer) inside one muted shell.

Section header
Files and notes for the next content review

Section title

Section description

Footer

Installation

bunx --bun shadcn@latest add @gnostic/frame

Usage

---
import {
    Frame,
    FrameDescription,
    FrameFooter,
    FrameHeader,
    FramePanel,
    FrameTitle,
} from "@/components/ui/frame"
---

<Frame>
  <FrameHeader>
    <FrameTitle>Title</FrameTitle>
    <FrameDescription>Description</FrameDescription>
  </FrameHeader>
  <FramePanel>Content</FramePanel>
  <FrameFooter>Footer</FrameFooter>
</Frame>

Composition

Frame
├── FrameHeader
│   ├── FrameTitle
│   └── FrameDescription
├── FramePanel
└── FrameFooter

Examples

Framed icon

Use FramePanel around an icon to make it stand out.

Winter landscape
Winter is Coming
Prepare for solitude in the frozen landscape.

An alien world awaits your arrival. What was once uninhabitable is now home. You are the first of your species to arrive on this planet. Make the most of it.

See the card examples for CardFrame, which clips a card into a framed shell.

When to use Frame

Use FramePanel alone when one raised surface is enough, as in the framed icon example. Use Frame when multiple panels should sit together in one outer surface.

Keyboard and behavior

Frame supplies layout, not selection or disclosure behavior. Use semantic headings and actual buttons inside the parts. The page still owns heading levels and landmarks.

Theme and layout

With Frame, the outer muted shell and inner panels share border and radius tokens. A lone FramePanel uses the panel tokens only. Check panel edges and spacing when content includes a table or a card with its own border. Avoid stacking unnecessary surfaces.