Skip to content
Postkit

Tabs. Keyboard-operable switchable article panels.

  • Article structure
  • Interactive
  • Stability · Initial
  • ::postkit-tabs
Map authored tags to Postkit components.

Usage.

<Tabs
  label="Rendering approaches"
  items='[{"label":"MDX","content":"Map authored tags to Postkit components."},{"label":"Markdown","content":"Use portable directives for rich content."},{"label":"JSON","content":"Render a structured portable document."}]'
/>

Props. Always in step with the code.

PropTypeDefaultDescription
itemsRequiredJSON stringNoneA JSON array of tab labels and content.
labelstring"Tabbed content"An accessible label for the tab list.
initialIndexnumber0The initially selected tab index.
Appearance
size"sm" | "md" | "lg""md"The component density and type scale.
variant"outline" | "subtle" | "plain""subtle"The component visual treatment.

Every component also takes unstyled and the part-styling props. Change a default for your whole site with defaults in createPostkit. Part styles

Anatomy. Every part is yours to restyle.

Every part

  • root
  • list
  • tab
  • panels
  • panel

Renderers. One component, everywhere you publish.

  • Headless @postkit/reactSupported
  • Chakra @postkit/chakraSupported
  • Email @postkit/emailAs text
  • Astro @postkit/astroHydrated
  • Web components @postkit/elementsPlanned
Postkit

Richer posts, written once, right everywhere.

© 2026 Postkit. MIT licensed.
LicensingPrivacy