Panel
A framed region of a page with a name: it gathers what belongs together, with room for its actions on top and a note at the bottom.
import { Panel, PanelSkeleton } from '@sypnia/ui/react'
Title, action and foot
The action belongs to the panel; the foot carries a quiet note.
Project
- Name
- Storefront
- Region
- Frankfurt
- Plan
- Team
Code
import { Button, KeyValue, Panel } from '@sypnia/ui/react';
export default function Basic() {
return (
<Panel title="Project" actions={<Button size="sm" icon="edit">Rename</Button>} footer="Created on November 3, 2026 by Laura Méndez">
<KeyValue items={[['Name', 'Storefront'], ['Region', 'Frankfurt'], ['Plan', 'Team']]} />
</Panel>
);
} With a table
flush lets the table reach the edges.
API keys
| Name | Kind | Last used |
|---|---|---|
| Back office | Secret | Today |
| Mobile app | Public | Today |
| Old website | Public | March 2 |
Code
import { Badge, Panel, Table } from '@sypnia/ui/react';
const keys = [
{ name: 'Back office', kind: 'Secret', used: 'Today' },
{ name: 'Mobile app', kind: 'Public', used: 'Today' },
{ name: 'Old website', kind: 'Public', used: 'March 2' },
];
// `flush` removes the padding, so a table or a list reaches the edges of the panel.
export default function Flush() {
return (
<Panel flush title="API keys" footer="3 keys">
<Table label="API keys" rows={keys} rowKey={(k) => k.name} columns={[
{ id: 'name', header: 'Name', cell: (k) => k.name },
{ id: 'kind', header: 'Kind', cell: (k) => <Badge outline>{k.kind}</Badge> },
{ id: 'used', header: 'Last used', cell: (k) => k.used },
]} />
</Panel>
);
} Loading, empty and failed
The frame stays the same in the three states.
Activity
Activity
Nothing has happened today
Activity
The activity could not be loaded
Code
import { Button, EmptyState, Panel, SkeletonText } from '@sypnia/ui/react';
// The same panel while it loads, when it has nothing, and when it failed.
export default function States() {
return (
<div className="sy-grid">
<Panel title="Activity"><div aria-busy="true"><SkeletonText lines={4} /></div></Panel>
<Panel title="Activity"><EmptyState compact icon="clock" title="Nothing has happened today" /></Panel>
<Panel title="Activity"><EmptyState compact tone="fail" title="The activity could not be loaded" actions={<Button size="sm">Try again</Button>} /></Panel>
</div>
);
} Skeleton
The real piece and its skeleton: the same box, so nothing moves when the data arrives.
Usage this month
Code
import type { CSSProperties } from 'react';
import { Panel, PanelSkeleton } from '@sypnia/ui/react';
// Usage panel, loaded and loading. The skeleton has the same box as the real one, so nothing moves when the data arrives.
export default function Skeleton() {
return (
<div className="sy-grid" style={{ '--min': '16rem' } as CSSProperties}>
<Panel title="Usage this month">Requests: 1.2 million of 5 million. Storage: 18 GB of 50 GB. You are well within your plan.</Panel>
<PanelSkeleton lines={2} />
</div>
);
} When to use it
Use it when
- A page has several regions and each needs a title: settings, a list, a summary.
- The region has actions of its own: they go in the head, at the end.
- It holds a table or a list that should reach the edges: add
flush.
Do not use it when
- It is one item among several alike, or leads somewhere: that is a Card.
- The page has a single region: the PageHeader is title enough.
- You would put a panel inside a panel. Use a Fieldset or plain headings inside.
For everyone
- It is a
sectionwith a real heading (level 2), so screen-reader users can jump from panel to panel. - Loading, empty and error states go inside the body, so the frame and the title never move.
- On phones it keeps its frame and padding; its content stacks.
Props
| Panel | Type | Default |
|---|---|---|
actions | ReactNode | |
className | string | |
flush | boolean | |
footer | ReactNode | |
loadingThe panel is waiting for its content: it is marked busy and draws the body you pass, which is the real body with its values not here yet as `SkeletonWords` and its pieces as `SkeletonOf` (or the pieces' own `loading`). It never draws generic bars: a loading panel has the shape of the loaded one. | boolean | |
title | ReactNode |
| PanelSkeleton | Type | Default |
|---|---|---|
actions | boolean | |
lines | number | 3 |