Skip to content
roguelite labsAnthony Spezzano ↗
Prompt/CodeBlock

CodeBlock

Styled code display with language badge, optional filename, and one-click copy button.

Use and inspectUse this as a presentational interface around your own submit, stream, or state handlers. Reset preview only remounts the local example; it does not send a request or connect to a model.Next: inspect the source and wire its callback to a bounded backend action.
CodeBlockStyled code display with language badge, optional filename, and one-click copy button.
PropTypeDefaultDescription
code*stringThe code string to display
languagestringLanguage label shown in header
filenamestringOptional filename shown in header