Code

An inline code chip for identifiers and commands in prose.

Install with pnpm add astralis-ui, import the stylesheet once, and wrap your app in AstralisProvider.

Import#

import { Code } from "astralis-ui";

Variants and sizes#

variants
subtlesolidoutline
sizes
size smsize mdsize lg

For multi-line snippets, use Code Block.

Props#

Code extends Box.

PropTypeDefaultDescription
variant"subtle" | "solid" | "outline""subtle"Tinted, strongly tinted, or bordered — all track the active theme.
size"sm" | "md" | "lg""sm"Font size step.