Dojo NG is being built in the open, one section at a time — follow along on Heptapod.

API REFERENCE · NAVIGATION

<dj-tab-container>

Tabbed interface. tabs describes the buttons; the panels are slotted children in the same order (one per tab). The active panel is shown, the rest hidden. ARIA tablist/tab/tabpanel with roving arrow/Home/End keyboard. Local coordination of slotted panels — no store needed.

Try it in the playground

@dojo-ng/tab-container · v0.1.1

npm install @dojo-ng/tab-container

import "@dojo-ng/tab-container";

Properties

PropertyAttributeTypeDefault
tabs tabs TabItem[] []
activeIndex active-index reflected number 0
alignButtons align-buttons reflected "top""bottom""left""right" "top"

Events

EventDescription
changedetail: active index
dj-tab-closedetail: index

Slots

Default slot

CSS parts

Style these with dj-tab-container::part(name).

tablisttabpanels

Types

The types that the properties above use, as they are declared in the source.

TabItem

export interface TabItem { name: string; disabled?: boolean; closeable?: boolean; }