Multi-Language Code Tabs

Code block with language tabs (JavaScript, Python, cURL, Go) and Shiki syntax highlighting. Dark theme with copy-to-clipboard and active tab indicator.

FREE

Devtools3: Multi-Language Code Tabs

Tabbed code snippet block for API "quick start" sections: a row of language tabs (JavaScript, Python, cURL, Go in the demo) above a Shiki-highlighted, always-dark code panel with a copy-to-clipboard button.

Free block

This block is free. No license or account is required: install it with the CLI and use it in unlimited projects.

Installation

Radix flavor

bash
npx shadcn add "https://ui.beste.co/r/devtools3"

Base UI flavor

bash
npx shadcn add "https://ui.beste.co/r-base/devtools3"

This installs the block to components/beste/block/devtools3.tsx, the Button shadcn/ui primitive it uses, and the shiki npm dependency it needs for syntax highlighting.

Quick start

The installed file exports devtools3Demo alongside the block: the exact props behind the preview above. Spread it to get a working code-tabs panel in one line.

tsx
import { Devtools3, devtools3Demo } from "@/components/beste/block/devtools3";

export default function DocsPage() {
  return <Devtools3 {...devtools3Demo} />;
}

Then replace the demo with your own props. Written out, a trimmed setup looks like this:

tsx
import { Devtools3 } from "@/components/beste/block/devtools3";

export default function DocsPage() {
  return (
    <Devtools3
      heading="Install the SDK"
      description="Pick your language to get started."
      tabs={[
        {
          language: "javascript",
          label: "JavaScript",
          code: `npm install @acme/sdk`,
        },
        {
          language: "bash",
          label: "cURL",
          code: `curl https://api.acme.com/v1/ping`,
        },
      ]}
      labels={{ copy: "Copy", copied: "Copied!" }}
    />
  );
}

Props

PropTypeDefaultDescription
headingstringSection heading above the code panel
descriptionstringSupporting text under the heading
tabsCodeTab[][]Language tabs, each with its own code sample
labels{ copy?: string; copied?: string }{}Copy-button text, before and after copying
classNamestringExtra classes for the outer <section>
ts
type CodeTab = {
  language: string;
  label: string;
  code: string;
};

Behavior notes

More DevTools blocks

View all DevTools
PRO

devtools20

Code Diff Viewer

Unified code diff viewer with dark terminal background. Green additions, red deletions, and gray context lines with file headers.

PRO

devtools7

API Response Examples

API documentation cards showing response examples with color-coded status badges. Headers section, JSON body with copy button, success/error variants.

PRO

devtools6

Application Log Viewer

Terminal-style structured log viewer with level filtering. Color-coded INFO, WARN, ERROR, and DEBUG entries with timestamps and source labels.

PRO

devtools14

JSON Formatter Tool

Interactive JSON editor with format, minify, and real-time validation. Valid/invalid status badge, copy button, and syntax error display.

PRO

devtools19

Keyboard Shortcuts Reference

Grouped keyboard shortcuts with styled keycap visuals. Shows key combinations with shadow-styled kbd elements and descriptions.

PRO

devtools52

Bundle Size Analyzer

JavaScript bundle analysis with chunk breakdown. Visual size bars, module lists, and gzip comparisons. Color-coded by type: app code, vendor, assets.