Ask Natuna

Ask about the design system

Hi, I am Natuna.

Ask me about the design system: components, tokens, statuses, and how to use them.

Natuna can be wrong. The docs are the source of truth.

Skip to content
  • IntroductionPage
  • Ask NatunaAsk about the design systemPage
  • FoundationColor, type, number, effectPage
  • Components overviewPage
  • ThemesLight and dark modePage
  • NamingProperty and page namesPage
  • Privacy statementPage
  • Text-safe stepsFirst AA and AAA step per color rampSection
  • AccessibilityWCAG 2.2 AAA rulesSection
  • Dark modeThemesSection
  • Using it todayFigma file and React codeSection
  • Component statusDesign status and In ReactSection

Arrow keys to move, Enter to open, Esc to close.

Code Block

Shows read-only code with a copy button, in plain text that keeps 7:1 contrast in light and dark.

Status
Not tracked
Code
In React
Role
Display

Usage

This demo is live, and the code below it is the same code, imports included. The component lives in src/ui of this repository and is not published to npm yet.

pay-button.tsx · TSX
import { Button } from "@/ui"; export function PayButton() {  return <Button size="lg">Pay Rp 412.500</Button>;}

Pastes as editable layers. Shadows are not exported.

import { CodeBlock } from "@/ui";

const SAMPLE_CODE: string = `import { Button } from "@/ui";

export function PayButton() {
  return <Button size="lg">Pay Rp 412.500</Button>;
}`;

export default function CodeBlockDemo() {
  return <CodeBlock title="pay-button.tsx" language="TSX" showLineNumbers code={SAMPLE_CODE} />;
}

Variants and states

Every specimen is the real component from src/ui, held in one state.

Defaultheader, copy
TSX
import { Button } from "@/ui";
showLineNumberswith a title
pay-button.tsx · TSX
import { Button } from "@/ui"; export function PayButton() {  return <Button size="lg">Pay Rp 412.500</Button>;}
Long linescrolls; the region is focusable
TS
const message = "A long line keeps going past the edge of the panel, so it scrolls, or wraps when wrap is set.";
wrapno copy button
TS
const message = "A long line keeps going past the edge of the panel, so it scrolls, or wraps when wrap is set.";

Pastes as editable layers. Shadows are not exported.

Props

code
string · default none
Required. The code, as plain text.
language
string · default none
Shown in the header, such as "TSX". Also names the scroll region.
title
string · default none
A file name or title in the header.
showLineNumbers
boolean · default false
Numbers each line. The numbers are aria-hidden and not selected with the code.
wrap
boolean · default false
Wrap long lines instead of scrolling sideways.
copyable
boolean · default true
Show the Copy button. It says Copied for two seconds.
className
string · default ""
Extra classes on the figure.

Figma to code

Figma properties by their exact names from Naming, and the React prop that carries each one. The table covers the shared properties that bear on this component; the Figma file decides which of them its component exposes. None means there is no prop for it yet.

🖍 Label
title, language
The header text.
🎯 State
None
Copied is shown for two seconds after a copy.

Accessibility

What the code in src/ui does today, and what it leaves to you.

Keyboard

  • Tab reaches the Copy button, then the code region when it scrolls. Arrow keys scroll the focused region.

Screen readers

  • The Copy button's text changes to Copied in a polite live region, so the copy is announced.
  • A scrolling region is named by title and language.

What you still need to do

  • Keep the code short enough to read. Link to the full file for anything long.
  • Plain text only: there are no syntax colors, so meaning must not depend on color.

When to use

Documentation and usage examples.

Do and don't

Do

  • Include a copy button.
  • Keep line length reasonable, wrap when needed.

Don't

  • Use for non-code content.
  • Omit the language label when it helps readers know what they are reading.

Other untracked components.

Status reflects the component tracker snapshot of 29 October 2026.