Skip to content
Binary UIKit reference Stable

CodeBlock

Read-only code surface with copy support.

Choose CodeBlock for read-only code that readers may need to copy.

Interactive example

Loading interactive example

API

MemberTypeKindRequiredDefault
codestringpropYes
copyLabelstringpropNo'Copy code'
copyablebooleanpropNotrue
filenamestringpropNoundefined
highlight(code: string, language: string) => stringcallbackNoundefined
labelstringpropNoundefined
languageCodeLang | (string & {})propNo'text'
maxHeightnumberpropNoundefined
showLineNumbersbooleanpropNofalse
wrapbooleanpropNofalse

Examples

Source

Loading source