Code

Code inside running text.

View as Markdown

Set NODE_ENV to production before you run the build.

<Text color="secondary">  Set <Code>NODE_ENV</Code> to <Code>production</Code> before you run the build.</Text>

Installation

$ npx shadcn@latest add @constella/code

Usage

import { Code } from "@/components/typography/code";
<Code>NODE_ENV</Code>

Its size is relative, so it sits a step under the text around it at any size. For a block of code, use Code Block.

API Reference

PropTypeDefault
renderReactElement | function<code>
sxSx, applied last-