Component
Code
Marks inline code or a short command within running text.
Install
Run the CLI to copy the source into your project.
pnpm dlx @stalk-ui/cli add @stalk-ui/codeExamples
Live previews render through the docs app's PandaCSS codegen.
<Code>npm install</Code>
<Code variant="outline">pnpm build</Code>
<Text> Run <Code>pnpm dlx @stalk-ui/cli add button</Code> to copy a component. </Text>
Props
Public component props extracted from the source TypeScript types.
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
| `variant` | `CodeVariant` | No | - | Visual treatment. Defaults to \`soft\`. |
Variants
Variant axes exposed by the underlying PandaCSS recipe or slot recipe.
| Variant | Values |
|---|---|
| `variant` | `soft`, `outline`, `ghost` |
Registry
Files this component contributes to your registry install.
- Manifest: `/r/code.json`
- Recipe: `code`
- Files: `src/components/ui/code.tsx`