Skip to content
Velkin LogoVelkin Logo
Velkin
VELKIN/UI

Modern UI components for product teams and their AI agents. Lit core, typed wrappers, live MCP.

sales@velkinui.com

Product

  • Docs
  • Components
  • Studio
  • Pricing

Resources

  • Quick start
  • Blog
  • Changelog
  • Roadmap
  • Status

Project

  • About
  • Contact
  • License
  • Privacy
  • Terms

© 2026 Velkin. MIT core · Pro licenses available.

VELKIN

Tab

A tab component with animated thumb and keyboard navigation.

vu-tab · @velkin/react/tab

Copy page

Import

React
npm i @velkin/react

import { VuTab } from "@velkin/react/tab";

Examples

API

Tables match the member selected under Import.

Props

PropTypeDefaultDescription
statesVuTabStateItem[][]Segment list when the default slot is empty. Default: `[]`.
valueundefined | stringundefinedSelected segment when controlled; omit for uncontrolled mode.
defaultValuestring""Initial selection when uncontrolled. Default: `""`.
disabledbooleanfalseDisables every segment. Default: `false`.
labelstring""Accessible name when no visible group label exists. Default: `""`.
sizeVuTabSize"sm"Padding/type preset; `sm`|`md`|`lg` align with list/tree, `xs`/`xl` are density extras. Default: `"sm"`.
orientationVuTabOrientation"horizontal"Horizontal row or vertical stack. Default: `"horizontal"`.
stretchbooleanfalseFills container width; horizontal segments share space equally. Default: `false`.
gapstring""Spacing between segments; empty for flush layout. Default: `""`.
radiusVuTabRadius"full"Corner preset (`none`/`sm`/`md`/`lg`/`full`). Default: `"full"`.
showCurrentLabelOnlybooleanfalseHides inactive labels. Default: `false`.
iconOnlybooleanfalseSquare 1:1 segments; labels stay for a11y only. Default: `false`.
colorVuTabColor"primary"Thumb intent token; per-item color overrides. Default: `"primary"`.

Events

EventDetailDescription
vu-changeVuTabChangeDetailUser-driven selection changes only.

Slots

SlotDescription
—- `<vu-tab-item>` segments; when assigned, replaces the `states` prop.

CSS parts

PartDescription
wrapOuter radiogroup wrapper.
indicatorSliding highlight behind the active segment.
thumbAlias for the sliding indicator.
baseEach segment button in prop mode.
base--selectedCurrently selected segment button.
labelOptional label span inside each button.
iconOptional icon inside each button.

Methods

MethodDescription
focusSegment- Focuses the currently selected segment.
reset- Restores uncontrolled selection from `defaultValue`.

Types

NameDefinition
string | undefined
undefined | string
VuTabChangeDetail
{
  value: string;
  previous: string;
  index: number;
  item: VuTabNormalizedItem;
  source: HTMLElement | null;
}
VuTabColor
"default" | "primary" | "success" | "warning" | "danger"
VuTabOrientation
"horizontal" | "vertical"
VuTabRadius
"sm" | "md" | "lg" | "none" | "full"
VuTabSize
"sm" | "md" | "lg" | "xs" | "xl"

Related

Companions

  • Tab Item`vu-tab-item`

Navigation

  • Adaptive BarA responsive toolbar component that overflows extra items into a menu.
  • AppbarAn application bar component with start, center, and end slots.
  • BreadcrumbA breadcrumb component for navigation trails with optional collapse.
  • Context MenuA context menu component with grouped actions and icons.
  • DropdownA dropdown menu component with trigger slot and keyboard navigation.
  • MenubarA menubar component with nested submenus and keyboard navigation.

Guides

  • AccessibilityFocus and naming
  • SlotsHeader, body, and item slots

Browse

  • Previous: StepsEarlier in the sidebar
  • Next: Config ProviderLater in the sidebar
  • All componentsBrowse the full index