CodeBlock

Code display with optional filename header and copy button.

Example

app.tsx
import '@toucan-ui/tokens/css';
import { Button } from '@toucan-ui/core';

Props

NameTypeDefaultRequiredDescription
codestringRequiredCode content
languagestringNoLanguage label
filenamestringNoFilename shown in header

Composed Atoms