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/code

Examples

Live previews render through the docs app's PandaCSS codegen.

Theme
<Code>npm install</Code>
Theme
<Code variant="outline">pnpm build</Code>
Theme
<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.

PropTypeRequiredDefaultDescription
`variant``CodeVariant`No-Visual treatment. Defaults to \`soft\`.

Variants

Variant axes exposed by the underlying PandaCSS recipe or slot recipe.

VariantValues
`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`