sigilUI

Code Showcase Section

Tabbed code block section for showcasing usage examples or config files.

@sigil-ui/componentsReact

Preview

Live preview Interactive

Import

import { CodeShowcaseSection } from "@sigil-ui/components";

Usage

<CodeShowcaseSection
  label="Quick start"
  title="Get started in seconds"
  description="Copy, paste, ship."
  tabs={[
    { label: "npm", language: "bash", code: "npm install @sigil-ui/components" },
    { label: "pnpm", language: "bash", code: "pnpm add @sigil-ui/components" },
    { label: "yarn", language: "bash", code: "yarn add @sigil-ui/components" },
  ]}
/>

Single tab

When only one tab is provided, the tab bar is hidden.

<CodeShowcaseSection
  title="Configuration"
  tabs={[{ label: "sigil.config.ts", code: configExample }]}
/>

Props

PropTypeDefaultDescription
labelstring—Uppercase mono label
titlestring—Section heading (omit to hide)
descriptionstring—Supporting text
tabsCodeTab[]requiredArray of { label, language?, code }
classNamestring—Additional CSS classes

Plus all standard <section> HTML attributes.