Skip to content

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.

Live demo
Quarterly report
Revenue grew 24% with the new onboarding flow.
Team plan Popular
$29 / month

Props

PropTypeDescription
title ReactNode Heading area.
footer ReactNode Actions area.
children ReactNode Body.

Accessibility

Code

Card · React
<Card title="Quarterly report" footer={<Button size="sm">Open</Button>}>
  Revenue grew 24% with the new onboarding flow.
</Card>

Accordion Link to Accordion

Stacked disclosure sections; one or several can be open.

Live demo

Yes. It is MIT licensed for personal and commercial use.

Props

PropTypeDescription
items { key, title, content }[] Sections.
multiple boolean Allow several open at once.
defaultOpen string[] Keys open initially.

Accessibility

Accordion keyboard support
KeyAction
Enter / Space Expand or collapse the focused section
Tab Move to the next header or into an open panel

Each header is a <button> inside a heading with aria-expanded and aria-controls.

Code

Accordion · React
<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.' },
]} />

Tabs Link to Tabs

Switch between panels of related content in the same place.

Live demo

12 tasks, 3 in review.

Active tab: overview

Props

PropTypeDescription
tabs { key, label, content?, disabled? }[] Tabs and their panels.
value / defaultValue string Selected tab key.
onChange (key) => void Called when the tab changes.

Accessibility

Tabs keyboard support
KeyAction
Arrow Left / Arrow Right Previous / next tab (mirrored in RTL)
Home / End First / last tab
Tab Move into the active panel

WAI-ARIA tabs pattern: role="tablist", aria-selected and roving tabindex.

Code

Tabs · React
<Tabs tabs={[
  { key: 'overview', label: 'Overview', content: <p>…</p> },
  { key: 'activity', label: 'Activity', content: <p>…</p> },
]} />

Panel Link to Panel

A titled container that can collapse, with header actions and a footer.

Live demo

Activity

12 new events today. Collapse me with the toggle button.

Props

PropTypeDescription
header ReactNode Title.
toggleable boolean Adds a collapse button.
collapsed / defaultCollapsed / onToggle boolean Collapse state.
actions / footer ReactNode Header actions and footer.
headingLevel 2 – 6 Heading level for the header.

Accessibility

Panel keyboard support
KeyAction
Enter / Space Toggle the panel (on the collapse button)

Code

ReactComing to Vue, Svelte and Angular.

Panel · React
<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.

Live demo

Props

PropTypeDescription
legend ReactNode Group title.
toggleable boolean Legend becomes a toggle button.
collapsed / defaultCollapsed / onToggle boolean Collapse state.

Accessibility

Fieldset keyboard support
KeyAction
Enter / Space Toggle (when toggleable)

Real <fieldset>/<legend>, so grouped controls are announced with their group name.

Code

ReactComing to Vue, Svelte and Angular.

Fieldset · React
<Fieldset legend="Shipping address" toggleable>
  <Input label="Street" />
</Fieldset>

ScrollPanel Link to ScrollPanel

A scrollable region with themed scrollbars that keyboard users can reach.

Live demo

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.

Props

PropTypeDescription
label string Accessible name of the region (required).
height number | string Viewport height.

Accessibility

ScrollPanel keyboard support
KeyAction
Tab Focus the region
Arrow keys / Page Up / Page Down Scroll the focused region

When content overflows, the container becomes a focusable, labelled region (tabindex="0") so keyboard users can scroll it (WCAG 2.1.1).

Code

ReactComing to Vue, Svelte and Angular.

ScrollPanel · React
<ScrollPanel label="Terms of service" height={200}>
  <p>…long content…</p>
</ScrollPanel>

Splitter Link to Splitter

Resizable panes separated by draggable, keyboard-operable gutters.

Live demo
Files

Drag the gutter or focus it and use the arrow keys.

Editor
Terminal

Sizes: 30% / 70%

Props

PropTypeDescription
layout 'horizontal' | 'vertical' Direction.
SplitterPanel size / minSize number (%) Initial and minimum sizes.
stateKey string Persist sizes in localStorage.
step number Keyboard step in %.
onResize / onResizeEnd (sizes) => void Size callbacks.

Accessibility

Splitter keyboard support
KeyAction
Arrow keys Move the focused gutter (mirrored in RTL)
Home / End Collapse to the minimum / maximum

Gutters are role="separator" with aria-valuenow, so screen readers announce the pane size.

Code

ReactComing to Vue, Svelte and Angular.

Splitter · React
<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.

Live demo

Last action: none

Props

PropTypeDescription
label string Accessible name (required).
start / center / end ReactNode Areas.
orientation 'horizontal' | 'vertical' Arrow-key direction.

Accessibility

Toolbar keyboard support
KeyAction
Arrow Left / Arrow Right Move between controls
Home / End First / last control
Tab Leave the toolbar

role="toolbar" with roving tabindex, so the whole toolbar is one tab stop.

Code

ReactComing to Vue, Svelte and Angular.

Toolbar · React
<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.

Live demo

Account settings


Danger zone

Props

PropTypeDescription
className string Extra classes.

Accessibility

Renders <hr>, which screen readers announce as a separator.

Code

Divider · React
<Divider />

Stepper Link to Stepper

Shows progress through a multi-step flow.

Live demo
  1. AccountYour details
  2. WorkspaceName it
  3. Invite team
  4. Launch

Props

PropTypeDescription
steps { label, description? }[] Steps.
current number Zero-based index of the active step.

Accessibility

An ordered list; the active step has aria-current="step".

Code

Stepper · React
<Stepper current={1} steps={[{ label: 'Account' }, { label: 'Workspace' }, { label: 'Invite' }]} />

Search Pelagic UI