Code

Inline code span for identifiers, commands, and short snippets

Category: display · WCAG 2.2-AA · typography, code, inline, mono

Sizes

Props

PropTypeDefaultDescription
size'sm' | 'md'mdVisual size of the component (e.g. 'sm', 'md', 'lg').

Design tokens

When to use

When not to use

How to build an accessible Code in React →

Examples

Default

<Code>npx cascivo add button</Code>

In a sentence

Sits inline with surrounding text

<Text>Run <Code>vp check</Code> before committing.</Text>

Small

<Code size="sm">--cascivo-color-accent</Code>

Related components

← Back to docs