Skip to content

Code

Install with pnpm add @invisible-ui/svelte, then import Button.svelte.

Inline <code> for short snippets, identifiers and commands within prose.

<script>
import Code from "@invisible-ui/svelte/Code.svelte";
</script>

In Elements:

<p>Run <ds-code>pnpm install</ds-code> to get started.</p>

None — the content is the default slot. For multi-line blocks with a copy button, use CodeBlock.

<p>Run <Code>pnpm build</Code> to compile.</p>

In React:

<p>
Run <Code>pnpm build</Code> to compile.
</p>

Themeable via --ds-code-*.