ICodeProps

interface
Data Display

Props for OrigamCode — a shiki-powered code block with line numbers, line highlighting, copy button, compact pill mode and theme awareness.

TypeScript

Definition

The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.

typescript

Inheritance

Extends

Parent interfaces this one inherits from. Their properties are available on every consumer of this interface.

API

Properties

Every property declared by this interface, with its type, optionality and default.

code
string
The code to highlight. When omitted the default slot is used as the source. When both are provided the prop wins.
lang
TCodeLangOpen
Language grammar to apply (e.g. "typescript", "vue"). Unknown values fall back to "plaintext" with a one-shot console warning.
lineNumbers
boolean
Show a left gutter with line numbers. Pure CSS — uses a CSS counter incremented per .origam-code__row.
highlightLines
number[] | string | null
Lines to highlight. Accepts a pre-computed array of 1-based line numbers or a comma/range string ("2,5-7"). null / empty disables the feature.
copyable
boolean
Show the copy-to-clipboard button in the top-right corner. Defaults to true.
format
boolean
Auto-format the code before highlighting. Reserved for v3 — currently a no-op that warns once in dev.
wrap
boolean
Wrap long lines instead of scrolling horizontally. Off by default so the visual column matches the source file.
filename
string
Optional filename rendered in the header bar (e.g. "App.vue"). When provided and copyable is true, the header also hosts the copy button.
compact
boolean
Render the block as a single-line pill — ideal for a copyable install command. Suppresses header, filename and line-numbers.
prompt
string
Decorative prompt prefix rendered before the code (e.g. "$" for a shell command). Purely visual — never included in the clipboard copy.
hideHeader
boolean
flat
boolean
scrollerAriaLabel
string

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Basic code block with language and line numbers

vue

Compact install-command pill

vue