Skip to content
Code with filename, light
Light
Code with filename, dark
Dark

Every state

  • Code with filename, default, light
    Code with filename, default, dark

    default

  • Code with filename, plain, light
    Code with filename, plain, dark

    plain

  • Code with filename, copied, light
    Code with filename, copied, dark

    copied

  • Code with filename, focus, light
    Code with filename, focus, dark

    focus

Props

PropTypeDefaultWhat it does
filenamestring–Shown in the tab
languagestring–Label on the right; empty hides it
codestring–The code as plain text, also what copy copies
highlightnumber[]–1-based lines to highlight
showLineNumbersboolean–Line numbers in a gutter
childrenReactNode–Pre-highlighted markup that replaces the tokenized lines
copyLabelstring–Copy button name
copiedLabelstring–Shown after copying

Used in

A block built with code-02; installing one installs it too

More code

All 6
code-02 is in UI ProGet UI Pro, €199

Preview

Open the page
In UI Pro: get it, €199 once

With every block and theme. 400+ buyers since 2020. Plans