sigilUI

Code Showcase Section

Pair a code example with supporting product context.

@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" },
    ]}
  />

Props

PropTypeDefaultDescription
labelstring—Readable label for the component.
titlestring—Heading displayed in the component.
descriptionstring—Supporting text below the heading.
tabs (required)CodeTab[]—Tabs configuration.

Token integration

CSS VariablePurpose
--s-section-pySection py
--s-content-max-narrowContent max narrow
--s-page-marginPage margin
--s-radius-cardRadius card
--s-borderBorder
--s-surfaceSurface
--s-font-monoFont mono
--s-textText
--s-primaryPrimary
--s-text-mutedText muted
--s-surface-sunkenSurface sunken