CodeSnippet
CodeSnippet is the lightweight inline companion to CodeBlock. It works well for command names, package imports, API identifiers, and short installation snippets inside prose.
Basic usage
Live Editor
function ImportHint() { return ( <ThemeProvider> <CodeSnippet code="@editora/ui-react/server" tone="brand" /> </ThemeProvider> ); }
Result
Loading...
Block mode
<CodeSnippet block code={"const value = 42;"} />
Key props
code, tone, size, block
Notes
- Use
CodeSnippetwhen the content should stay visually compact. blockswitches it from inline token styling to a lightweight standalone code surface.