Panels & layout
Containers that group, reveal and arrange content. Disclosure widgets use real buttons with aria-expanded; tabs and toolbars use roving focus.
10 components on this page. Every demo is live — change the theme in the header or flip a demo to right-to-left with its RTL button. 5 of them are React-only for now; Vue, Svelte and Angular versions are coming.
Card Link to Card
A surface with optional title and footer for grouping related content.
Code
<Card title="Quarterly report" footer={<Button size="sm">Open</Button>}>
Revenue grew 24% with the new onboarding flow.
</Card> <Card title="Quarterly report">
Revenue grew 24%.
<template #footer><Button size="sm">Open</Button></template>
</Card> <Card title="Quarterly report">
Revenue grew 24%.
{#snippet footer()}<Button size="sm">Open</Button>{/snippet}
</Card> <Card title="Quarterly report">
Revenue grew 24%.
<Button slot="footer" size="sm">Open</Button>
</Card> <Card title="Quarterly report" footer={<Button title="Open" size="sm" />}>
<Text>Revenue grew 24%.</Text>
</Card> Accordion Link to Accordion
Stacked disclosure sections; one or several can be open.
Code
<Accordion defaultOpen={['free']} items={[
{ key: 'free', title: 'Is Pelagic UI free?', content: 'Yes, MIT licensed.' },
{ key: 'rtl', title: 'Does it support RTL?', content: 'Yes, it mirrors automatically.' },
]} /> <Accordion :items="faq" :default-open="['free']" /> <Accordion items={faq} defaultOpen={['free']} /> <Accordion exclusive items={[{ title: 'Is Pelagic UI free?', content: 'Yes.', open: true }]} /> <Accordion items={faq} defaultOpen={['free']} /> Tabs Link to Tabs
Switch between panels of related content in the same place.
12 tasks, 3 in review.
Active tab: overview
Code
<Tabs tabs={[
{ key: 'overview', label: 'Overview', content: <p>…</p> },
{ key: 'activity', label: 'Activity', content: <p>…</p> },
]} /> <Tabs v-model="tab" :tabs="[{ key: 'overview', label: 'Overview' }, { key: 'activity', label: 'Activity' }]">
<template #panel-overview>…</template>
<template #panel-activity>…</template>
</Tabs> <Tabs bind:value={tab} tabs={[{ key: 'overview', label: 'Overview' }, { key: 'activity', label: 'Activity' }]}>
{#snippet panel(key)}{key === 'overview' ? 'Overview…' : 'Activity…'}{/snippet}
</Tabs> <Tabs tabs={[{ key: 'overview', label: 'Overview' }, { key: 'activity', label: 'Activity' }]}>
<p slot="panel-overview">…</p>
<p slot="panel-activity">…</p>
</Tabs> <Tabs tabs={[
{ key: 'overview', label: 'Overview', content: <Text>…</Text> },
{ key: 'activity', label: 'Activity', content: <Text>…</Text> },
]} /> Panel Link to Panel
A titled container that can collapse, with header actions and a footer.
Activity
Code
ReactComing to Vue, Svelte and Angular.
<Panel header="Activity" toggleable actions={<Button size="sm" variant="ghost">Refresh</Button>}>
12 new events today.
</Panel> Fieldset Link to Fieldset
A native fieldset with legend that can optionally collapse.
Code
ReactComing to Vue, Svelte and Angular.
<Fieldset legend="Shipping address" toggleable>
<Input label="Street" />
</Fieldset> ScrollPanel Link to ScrollPanel
A scrollable region with themed scrollbars that keyboard users can reach.
1. Section 1. You may use Pelagic UI in personal and commercial projects. Attribution is appreciated but not required. The software is provided “as is”, without warranty of any kind.
2. Section 2. You may use Pelagic UI in personal and commercial projects. Attribution is appreciated but not required. The software is provided “as is”, without warranty of any kind.
3. Section 3. You may use Pelagic UI in personal and commercial projects. Attribution is appreciated but not required. The software is provided “as is”, without warranty of any kind.
4. Section 4. You may use Pelagic UI in personal and commercial projects. Attribution is appreciated but not required. The software is provided “as is”, without warranty of any kind.
5. Section 5. You may use Pelagic UI in personal and commercial projects. Attribution is appreciated but not required. The software is provided “as is”, without warranty of any kind.
6. Section 6. You may use Pelagic UI in personal and commercial projects. Attribution is appreciated but not required. The software is provided “as is”, without warranty of any kind.
7. Section 7. You may use Pelagic UI in personal and commercial projects. Attribution is appreciated but not required. The software is provided “as is”, without warranty of any kind.
8. Section 8. You may use Pelagic UI in personal and commercial projects. Attribution is appreciated but not required. The software is provided “as is”, without warranty of any kind.
Code
ReactComing to Vue, Svelte and Angular.
<ScrollPanel label="Terms of service" height={200}>
<p>…long content…</p>
</ScrollPanel> Splitter Link to Splitter
Resizable panes separated by draggable, keyboard-operable gutters.
Drag the gutter or focus it and use the arrow keys.
Sizes: 30% / 70%
Code
ReactComing to Vue, Svelte and Angular.
<Splitter stateKey="editor-split" className="editor-split">
<SplitterPanel size={30} minSize={15}>Files</SplitterPanel>
<SplitterPanel size={70}>Editor</SplitterPanel>
</Splitter> Toolbar Link to Toolbar
Groups controls into start, center and end areas with a single tab stop.
Last action: none
Code
ReactComing to Vue, Svelte and Angular.
<Toolbar label="Formatting"
start={<><Button size="sm">Bold</Button><Button size="sm">Italic</Button></>}
end={<Button size="sm" variant="secondary">Share</Button>} /> Divider Link to Divider
A thin separator between sections.
Account settings
Danger zone
Code
<Divider /> <Divider /> <Divider /> <Divider /> <Divider /> Stepper Link to Stepper
Shows progress through a multi-step flow.
- AccountYour details
- WorkspaceName it
- Invite team
- Launch
Code
<Stepper current={1} steps={[{ label: 'Account' }, { label: 'Workspace' }, { label: 'Invite' }]} /> <Stepper :current="1" :steps="steps" /> <Stepper current={1} {steps} /> <Stepper current={1} steps={steps} /> <Stepper current={1} steps={steps} />