CodeSnippet
Display

CodeSnippet.

Code with a copy action built in.

Real interactive component
Live demo
tsx
import { Button } from "@iconical/ui";
<Button variant="primary">Hello</Button>

The preview uses the actual shared component, including your current theme, rounding, border and motion preferences.

Props & API reference

Parameters available in the shared component, including value types, requirements and accepted options.

3 props
ParameterTypeRequiredDefaultPossible valuesDescription
codestringYes——Snippet text displayed in the code pane.
languagestringNotsx—Language label above the snippet.
classNamestringNo——Additional CSS class on the outer component element.