콘텐츠로 이동
RefineUI

Tabs

콘텐츠를 별도의 뷰 패널로 구성합니다.

12 active projects

Overview

Machine-readable contract from Component Spec.

component: tabsexport: Tabsversion: 1tokens.visual: tabsattributes: data-refineui=tabs

Anatomy

Partdata-refineui
roottabs
tabtab
indicatortabs-indicator
listtabs-list

States

ScopeCategoryValues
componentpseudofocus-visible
componentenvironmentforced-colors, dir, prefers-contrast

Accessibility

SlotElementRoleRequired attributes
tabs-listdivtablist
tabbuttontabaria-selected: required=true, type: boolean; aria-controls: required=true, type: string

Keyboard

KeyActionNative
ArrowRightnext-trigger
ArrowDownnext-trigger
ArrowLeftprevious-trigger
ArrowUpprevious-trigger
Homefirst-trigger
Endlast-trigger
Enteractivatetrue
Spaceactivatetrue

Focus

SectionPropertyValue
visualrequiredtrue
visualselector:focus-visible
behaviorrovingtrue

Layout

PropertyValue
directionlogical
rtltrue

Variant

Select a recipe variant — preview and Recipe → Tokens update together.

Overview panel

Recipe → Tokens

Slot bindings for variant="selected" — declared in tabs (style → tokens).

SlotVariantPropertyTraceSemanticLight → foundationDark → foundationRecipe class
listbordertabs.listLineborderDefaultneutral300neutral650after:bg-refineui-alias-border-default
indicatorbackgroundtabs.selectedLinebackgroundBrandprimaryBlackprimaryGraybg-refineui-alias-background-brand
triggerforegroundtabs.itemForegroundforegroundTertiaryneutral500neutral450text-refineui-alias-foreground-tertiary
triggerselectedforegroundtabs.selectedForegroundforegroundPrimaryprimaryBlackneutralWhitetext-refineui-alias-foreground-primary

Component token trace

All paths in token-trace-v2.json prefixed with tabs.

TraceSemanticLight foundationDark foundationLightDark
tabs.hoverForegroundforegroundPrimaryHoverneutralBlackneutral100#000000#F5F5F5
tabs.itemDisabledForegroundforegroundDisabledneutral400neutral600#CECECE#6C6C6C
tabs.itemForegroundforegroundTertiaryneutral500neutral450#A4A4A4#BBBBBB
tabs.listLineborderDefaultneutral300neutral650#DBDBDB#5B5B5B
tabs.selectedForegroundforegroundPrimaryprimaryBlackneutralWhite#212121#FFFFFF
tabs.selectedLinebackgroundBrandprimaryBlackprimaryGray#212121#D4D4D4
npm install @refineui/react @refineui/tokens
import { Tabs, TabsList, TabsTrigger, TabsContent } from "@refineui/react";
<Tabs defaultValue="overview">
<TabsList>
<TabsTrigger value="overview">Overview</TabsTrigger>
<TabsTrigger value="analytics">Analytics</TabsTrigger>
<TabsTrigger value="settings">Settings</TabsTrigger>
</TabsList>
<TabsContent value="overview">
<p>Overview content</p>
</TabsContent>
<TabsContent value="analytics">
<p>Analytics content</p>
</TabsContent>
<TabsContent value="settings">
<p>Settings content</p>
</TabsContent>
</Tabs>
<Tabs value={activeTab} onValueChange={setActiveTab}>
{/* Controlled tabs */}
</Tabs>
PropDefaultTypeDescription
valuestring제어형 활성 탭 값.
defaultValuestring비제어형 초기 활성 탭.
onValueChange(value: string) => void활성 탭 변경 시 이벤트 핸들러.

탭 트리거 컨테이너.

PropDefaultTypeDescription
valuestring탭 식별자(필수).
disabledfalseboolean이 탭을 비활성화합니다.
PropDefaultTypeDescription
valuestring연결된 탭 값(필수).