BrickclayDesign System

Tabs

bk-tabs renders a TabItem[] as either underlined text tabs (variant="default") or a segmented pill-in-a-track (variant="segmented"), in either orientation. Play with the controls below to see how the inputs combine before the fixed examples further down.

bk-tabsNavigationAngular

Preview

A working preview of Tabs in the Brickclay style. Try it.

Interact with the preview to see events here.

Interactive playground

  • Table
  • Kanban
  • Calendar

Active: table

orientation

icon direction

Event log

Interact with the playground to see emitted events.

Default variant, Horizontal (variant="default", orientation="horizontal")

Text only

  • Resources
  • Location

Text only, [disabled]="true"

With icons

With icons, [disabled]="true"

Icon position (TabItem.direction)

Icon left, direction: 'left'

Icon right, direction: 'right'

Mixed (left / right / none)

Segmented variant, Horizontal (variant="segmented")

Default colors

  • Daily
  • Weekly
  • Monthly

With icons (left / right)

Custom colors, [colors]

Error state (TabItem.error, showErrorIcon, errorIcon, iconTooltip)

When a tab is in an error state you can optionally surface an error icon (on the direction side) whose tooltip carries the message. If showErrorIcon is off, the tooltip falls back to the tab itself. Omit errorIcon to use the default red alert icon. Hover the error tabs below to see the tooltips.

Default variant, with error icon (showErrorIcon: true, direction: 'right')

  • Information
  • Billing
  • Settings

Default variant, no icon, tooltip on the tab

Segmented variant, with default error icon (showErrorIcon: true, direction: 'left')

Segmented variant, no icon, tooltip on the tab

With decorative icons + error, all 4 layout variations (error icon replaces the tab's own icon)

Default, horizontal

Default, vertical

Segmented, horizontal

Segmented, vertical

Lock navigation while a tab has an error [lockNavigationOnError]="true"

Optional. When the active tab is in error, the other tabs render disabled so the user must resolve the error before moving on. Below, "Billing" is in error, try clicking "Information" or "Settings": navigation is blocked.

Default variant

Segmented variant

API reference

Component inputs / outputs <bk-tabs>

NameTypeDefaultPossible valuesDescription
listTabItem[][]array of tabsThe tabs to render. See TabItem below.
activeTabIdstring''any tab idId of the currently selected tab.
orientationTabsOrientation'horizontal''horizontal' | 'vertical'Lay the tabs out in a row or a stacked column.
variantTabsVariant'default''default' | 'segmented'Underlined/plain tabs vs. a segmented pill-in-a-track.
disabledbooleanfalsetrue | falseDisables the whole tab group.
lockNavigationOnErrorbooleanfalsetrue | falseWhen on and the active tab has error, the other tabs are disabled until it clears.
colorsTabsColors{}Tailwind class mapPer-usage colors for the segmented variant. See TabsColors below.
changeEventEmitter<TabItem>–outputEmits the selected tab when the user changes tabs.

Tab item TabItem

PropertyTypeRequiredPossible valuesDescription
idstringYesunique stringUnique identifier, matched against activeTabId.
labelstringYesany textVisible tab text.
iconstringNoasset URLIcon for the inactive state.
iconActivestringNoasset URLIcon for the active state; falls back to icon.
iconAltstringNoany textAlt text for the icon; defaults to label.
directionTabIconDirectionNo'left' | 'right'Which side of the label the icon sits on. Default 'left'.
disabledbooleanNotrue | falseDisables just this tab.
errorbooleanNotrue | falseMarks the tab as errored (red styling).
showErrorIconbooleanNotrue | falseIn an error state, render an error icon (on the direction side) with the tooltip on it. Off → tooltip falls back to the tab.
errorIconstringNoasset URLCustom error icon; omit to use the default red alert icon.
iconTooltipstring | string[]Notext / linesTooltip content, shown on the icon when present, otherwise on the tab (in error state).
iconTooltipDirectionstringNo'top' | 'bottom' | 'left' | 'right'Tooltip placement. Default 'top'.

Segmented colors TabsColors (variant="segmented")

PropertyTypeDefault tokenDescription
wrapperstring#54578E12Track background classes, e.g. !bg-white.
activestring#FFFFFFActive pill background classes.
activeTextstring#15191EActive pill text classes.
inactivestring#6B7080Inactive pill text classes.

Pass Tailwind classes (not raw colors). Because the component uses emulated encapsulation, prefix with ! (e.g. !bg-white) so they out-specify the default rules. Any field left undefined keeps the default token.