Every document in one place

Meridian keeps invoices, receipts and contracts together, and finds any of them in the time it takes to type a name.

Code

<!-- pearl-tabs.free.js: download it from the Install section below and host it with your site -->
<script src="/pearl-tabs.free.js" defer></script>

<pearl-tabs value="Pricing" align="start" size="15" aria-label="Product" theme="light">
  <section title="Overview">
    <p>Every document in one searchable place.</p>
  </section>
  <section title="Pricing">
    <p>Team — $12 per seat, billed yearly.</p>
  </section>
  <section title="Reviews">
    <p>4.8 from 1,240 teams.</p>
  </section>
</pearl-tabs>

<script>
  document.querySelector('pearl-tabs').addEventListener('change', (e) => {
    if (e.detail) console.log(e.detail.value, e.detail.index);
  });
</script>

In context

Douro valley

The 9:10 train to Pinhão, two tastings and a slow boat back. Bring a jacket for the evening.

Stretched across a card

4.8 from 1,240 teams

“We closed the quarter two days early. Nobody had to go looking for a single receipt.” — Mira Okafor, Northwind

Mint, centred Pro

Install · Free Web Component

One file, no dependencies. Aurora preset, every other option included. Host it yourself so your visitors never load anything from our servers.

1. Install with one command — or download the file
shadcn CLI · React
npx shadcn@latest add https://www.ui-design.co/r/pearl-tabs.json
2. Load it and use the element
HTML
<!-- pearl-tabs.free.js: download it from the Install section below and host it with your site -->
<script src="/pearl-tabs.free.js" defer></script>

<pearl-tabs value="Pricing" align="start" size="15" aria-label="Product" theme="light">
  <section title="Overview">
    <p>Every document in one searchable place.</p>
  </section>
  <section title="Pricing">
    <p>Team — $12 per seat, billed yearly.</p>
  </section>
  <section title="Reviews">
    <p>4.8 from 1,240 teams.</p>
  </section>
</pearl-tabs>

<script>
  document.querySelector('pearl-tabs').addEventListener('change', (e) => {
    if (e.detail) console.log(e.detail.value, e.detail.index);
  });
</script>
3. React + TypeScript (optional)

The shadcn command adds a typed React wrapper for you. Using the file directly? Custom elements work in React as-is; for type checking add:

TypeScript
// pearl-tabs.d.ts
declare namespace JSX {
  interface IntrinsicElements {
    'pearl-tabs': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
      value?: string;
      size?: number | string;
      width?: number | string;
      align?: 'start' | 'center' | 'stretch';
      theme?: 'light' | 'dark';
      sound?: boolean | '';
    };
  }
}

Pro · React + TypeScript Pro

One payment of $4.99, yours forever. Use it in unlimited personal and commercial projects; no resale.

  • React component (controlled or uncontrolled) with TypeScript types and the full source — panels take any React content
  • Sunset, Mint and Mono tints, plus custom tints from Brand Fit
  • The vanilla Web Component with every tint, a demo page, README and license

Attributes & props

NameTypeDefaultDescription
<section title="…"> children—One child per tab: its title is the label, its content the panel (any HTML). value="…" sets what change reports (default: the title); disabled greys the tab out.
value stringfirst tabThe open tab — a section's value or title. Fires change with detail.value and detail.index when the user picks another.
align 'start' | 'center' | 'stretch''start'Tabs at the start of the row, centred, or sharing its full width.
size number (px)15Label size; the padding and the panel text scale with it.
width number (px) | CSS width'100%'Width of the whole component. When the tabs do not fit, the row scrolls sideways and keeps the open tab in view.
aria-label string—Accessible name of the tab list.
theme 'light' | 'dark''light'For a light or a dark page; the component has no background of its own.
sound booleanoffA porcelain tap, higher when you move forward. Also on for everything inside an element with data-ui-sound="on".
tint Pro'aurora' | 'sunset' | 'mint' | 'mono' | object'aurora'Colours of the strand of light, or a custom tint. Free build ships Aurora only.

Real tabs: a tablist of tab buttons wired to their tabpanels, one tab stop for the row, Left / Right to move (mirrored in right-to-left pages), Home and End to jump; moving selects. Hidden panels stay in the page with hidden, so their content is still there for search engines. The panel area animates its height between tabs, so the content below glides instead of jumping. Because form fields inside a panel also fire a native change that bubbles through the element, check e.detail in your listener. For two to four short options that switch a view in place, Pearl Segmented is the smaller control; reach for tabs when each choice owns a panel of content. All CSS, no WebGL. Reduced motion swaps panels with a plain fade.

More components