Skip to content

Tabs ​

Tabs switch panels. The default is an underline (line). segment is the compact alternative. Card tabs are not part of v1.

Demos ​

Line

Active text uses brand-pressed. A 2px brand indicator sits on the divider. Arrow keys move between enabled tabs.
This course introduces the GK design system and how the components ship. Week 1 Tokens · Week 2 Form · Week 3 Overlays · Week 4 Display Reviews will show up here. Attachments are unavailable.

Segment

The track is the quiet button fill. The active segment is a 22% brand wash with pressed text. There is no underline and no card chrome.
Segment track with a brand-wash active tab.Board view.Timeline view.

Sizes

Line hit areas match Button: sm 28, md 34, lg 40. Segment tabs sit inside the track at 26 / 30 / 36.
Small line tabs.Item B.Large line tabs.Item B.

Disabled tab

Disabled panes stay in the list at 50% opacity and are skipped by click and keyboard.
Enabled panel.You cannot select this tab.The next enabled tab.

Many tabs

The tab list scrolls horizontally and does not wrap. On a narrow viewport, swipe the tab list.
Scroll the tab list instead of wrapping.Design system.Frontend.Product strategy.Content marketing.Brand visual.Accessibility.Performance.

Animation off

animated defaults to true (180ms panel fade and indicator slide). :animated="false" or animated="false" turns it off.
Panels swap without a fade.The other panel.

Icon label

Put rich label content in the pane’s tab slot. It replaces the tab string.
★ Overview The tab slot can hold an icon and a label. Plain string labels still work beside slotted ones.

API ​

Tabs Props ​

PropTypeDefault
valuestringfirst enabled pane
default-valuestring—
type'line' | 'segment''line'
size'sm' | 'md' | 'lg''md'
animatedbooleantrue
placement'top''top'

value is controlled when you set it. With an empty value, default-value or the first enabled pane is selected. v1 placement is top only; a vertical tab list is deferred. There is no card type.

animated="false" is respected (the string "false" is not treated as true).

Tab Pane Props ​

PropTypeDefault
namestring—
tabstring—
labelstring—
disabledbooleanfalse

label aliases tab. The tab string wins when both are set. name is the value key and should be unique.

Tabs Slots ​

NameDescription
defaultgk-tab-pane children
pane tabRich tab label. Replaces the tab text
pane defaultPanel body

Tabs Events ​

NameDescription
update:valueSelection changed. detail: { value: string }. Bubbles; composed: true.
changeSame payload as update:value.

CSS Parts ​

PartDescription
tablistScrollable tab row
tabOne tab button
indicator2px brand underline. Hidden for segment
panelsPanel stack
panelThe visible or hidden panel shell

Accessibility ​

  • The list is role="tablist" with aria-orientation="horizontal". Pass aria-label on gk-tabs to name it.
  • Each tab is role="tab" with aria-selected, aria-controls, and aria-disabled when needed.
  • Each panel is role="tabpanel" with aria-labelledby. Inactive panels are hidden.
  • Left / Right move among enabled tabs and wrap. Home and End jump to the ends. Tab leaves the tab list and enters the active panel.
  • Only the selected enabled tab is in the tab order.
  • Focus-visible uses the soft brand ring.

Vertical placement and card tabs are intentionally out of this version.