Skip to main content
Mantı UI logoMantı UIv0.12.1
Studio

Tabs

Pass items as { value, label, content, icon?, disabled? }. The machine manages focus, arrow keys, selection, and panels.

import { Tabs } from '@manti-ui/react';

const items = [
  {
    value: 'dough',
    label: 'Dough',
    content: 'Flour, egg, water, and a pinch of salt.',
  },
  {
    value: 'filling',
    label: 'Filling',
    content: 'Beef or lamb, grated onion, and spice.',
  },
  {
    value: 'sauce',
    label: 'Sauce',
    content: 'Garlic yogurt under warm paprika butter.',
  },
];

export default function TabsBasic() {
  return (
    <div className="w-full max-w-[calc(var(--manti-space-16)*8)]">
      <Tabs items={items} />
    </div>
  );
}

Variants

Use line, pill, or soft.

Flour, egg, water, and a pinch of salt.
Flour, egg, water, and a pinch of salt.
Flour, egg, water, and a pinch of salt.

Sizes

Flour, egg, water, and a pinch of salt.
Flour, egg, water, and a pinch of salt.

API

PropTypeDefaultDescription
itemsTabItem[]Each item: value, label, content, optional icon/disabled.
variant'line' | 'pill' | 'soft''line'Visual style.
size'sm' | 'md''md'Control size. `sm` tightens the triggers for compact, embedded usage.
valuestringControlled selected value.
defaultValuestringInitial selection (defaults to the first item).
onValueChange(value: string) => voidCalled when the selected value changes.
orientation'horizontal' | 'vertical'Layout direction.

Styling

Anatomy

PartSelectorDescription
root[data-scope="tabs"][data-part="root"]The tabs container.
list[data-scope="tabs"][data-part="list"]The trigger row.
trigger[data-scope="tabs"][data-part="trigger"]A tab button.
indicator[data-scope="tabs"][data-part="indicator"]The sliding active marker.
content[data-scope="tabs"][data-part="content"]A tab panel.

Tokens

TokenControls
--manti-tabs-gapgap
--manti-tabs-list-gaplist gap
--manti-tabs-track-paddingtrack padding
--manti-tabs-track-radiustrack radius
--manti-tabs-track-radius-verticaltrack radius vertical
--manti-tabs-trigger-gaptrigger gap
--manti-tabs-trigger-padding-ytrigger padding y
--manti-tabs-trigger-padding-xtrigger padding x
--manti-tabs-trigger-font-sizetrigger font size
--manti-tabs-trigger-radiustrigger radius
--manti-tabs-indicator-sizeindicator size
--manti-tabs-content-radiuscontent radius

Last updated

Built end-to-end with Manti UI components and design tokens. Manti UI is a framework-agnostic design system on Zag.js.

GitHub