Skip to main content

CodeProps

interface CodeProps extends ShapeProps

Properties​

alignContent​

Inherited from ShapeProps.alignContent

alignItems​

Inherited from ShapeProps.alignItems

alignSelf​

Inherited from ShapeProps.alignSelf

anchor​

Inherited from ShapeProps.anchor

anchorX​

Inherited from ShapeProps.anchorX

anchorY​

Inherited from ShapeProps.anchorY

antialiased​

Inherited from ShapeProps.antialiased

basis​

basis?: SignalValueFlexBasis
Inherited from ShapeProps.basis

bottom​

The position of the bottom edge of this node.

This shortcut property will set the node's position so that the bottom edge ends up in the given place. If present, overrides the NodeProps.position property.

Inherited from ShapeProps.bottom

bottomLeft​

The position of the bottom left corner of this node.

This shortcut property will set the node's position so that the bottom left corner ends up in the given place. If present, overrides the NodeProps.position property.

Inherited from ShapeProps.bottomLeft

bottomRight​

The position of the bottom right corner of this node.

This shortcut property will set the node's position so that the bottom right corner ends up in the given place. If present, overrides the NodeProps.position property.

Inherited from ShapeProps.bottomRight

bowing​

Controls the curve deviation from a straight line.

A value of 0 will cause lines to be perfectly straight. Higher values introduce more curvature.

Inherited from ShapeProps.bowing

cache​

Inherited from ShapeProps.cache

cachePadding​

Controls the padding of the cached canvas used by this node.

By default, the size of the cache is determined based on the bounding box of the node and its children. That includes effects such as stroke or shadow. This property can be used to expand the cache area further. Usually used to account for custom effects created by shaders.

Inherited from ShapeProps.cachePadding

cachePaddingBottom​

Controls the padding of the cached canvas used by this node.

By default, the size of the cache is determined based on the bounding box of the node and its children. That includes effects such as stroke or shadow. This property can be used to expand the cache area further. Usually used to account for custom effects created by shaders.

Inherited from ShapeProps.cachePaddingBottom

cachePaddingLeft​

Controls the padding of the cached canvas used by this node.

By default, the size of the cache is determined based on the bounding box of the node and its children. That includes effects such as stroke or shadow. This property can be used to expand the cache area further. Usually used to account for custom effects created by shaders.

Inherited from ShapeProps.cachePaddingLeft

cachePaddingRight​

Controls the padding of the cached canvas used by this node.

By default, the size of the cache is determined based on the bounding box of the node and its children. That includes effects such as stroke or shadow. This property can be used to expand the cache area further. Usually used to account for custom effects created by shaders.

Inherited from ShapeProps.cachePaddingRight

cachePaddingTop​

Controls the padding of the cached canvas used by this node.

By default, the size of the cache is determined based on the bounding box of the node and its children. That includes effects such as stroke or shadow. This property can be used to expand the cache area further. Usually used to account for custom effects created by shaders.

Inherited from ShapeProps.cachePaddingTop

children​

children?: SignalValueComponentChildren
Inherited from ShapeProps.children

clip​

clip?: SignalValueboolean
Inherited from ShapeProps.clip

code​

code?: SignalValuePossibleCodeScope

The code to display.


columnGap​

Inherited from ShapeProps.columnGap

composite​

Inherited from ShapeProps.composite

compositeOperation​

compositeOperation?: SignalValueGlobalCompositeOperation
Inherited from ShapeProps.compositeOperation

direction​

direction?: SignalValueFlexDirection
Inherited from ShapeProps.direction

drawHooks​

Custom drawing logic for the code.

Check out DrawHooks for available render hooks.


fill​

fill?: SignalValuePossibleCanvasStyle
Inherited from ShapeProps.fill

fillShaders​

fillShaders?: PossibleShaderConfig
Inherited from ShapeProps.fillShaders

filters​

Inherited from ShapeProps.filters

fontFamily​

Inherited from ShapeProps.fontFamily

fontSize​

Inherited from ShapeProps.fontSize

fontStyle​

Inherited from ShapeProps.fontStyle

fontWeight​

Inherited from ShapeProps.fontWeight

gap​

Inherited from ShapeProps.gap

grow​

Inherited from ShapeProps.grow

height​

Inherited from ShapeProps.height

highlighter​

highlighter?: SignalValueCodeHighlighterunknownnull

The code highlighter to use for this code node.

Defaults to a shared code.LezerHighlighter.


justifyContent​

Inherited from ShapeProps.justifyContent

key​

key?: string
Inherited from ShapeProps.key

layout​

layout?: LayoutMode
Inherited from ShapeProps.layout

layoutChildren​

layoutChildren?: LayoutMode

Whether this node lays out its own children with flex. When null (the default), falls back to layout.

Inherited from ShapeProps.layoutChildren

layoutSelf​

layoutSelf?: LayoutMode

Whether this node participates in its parent's flex layout. When null (the default), falls back to layout.

Inherited from ShapeProps.layoutSelf

left​

The position of the left edge of this node.

This shortcut property will set the node's position so that the left edge ends up in the given place. If present, overrides the NodeProps.position property.

Inherited from ShapeProps.left

letterSpacing​

Inherited from ShapeProps.letterSpacing

lineCap​

lineCap?: SignalValueCanvasLineCap
Inherited from ShapeProps.lineCap

lineDash​

Inherited from ShapeProps.lineDash

lineDashOffset​

Inherited from ShapeProps.lineDashOffset

lineHeight​

Inherited from ShapeProps.lineHeight

lineJoin​

lineJoin?: SignalValueCanvasLineJoin
Inherited from ShapeProps.lineJoin

lineWidth​

Inherited from ShapeProps.lineWidth

margin​

Inherited from ShapeProps.margin

marginBottom​

Inherited from ShapeProps.marginBottom

marginLeft​

Inherited from ShapeProps.marginLeft

marginRight​

Inherited from ShapeProps.marginRight

marginTop​

Inherited from ShapeProps.marginTop

maxHeight​

maxHeight?: SignalValueLengthLimit
Inherited from ShapeProps.maxHeight

maxWidth​

maxWidth?: SignalValueLengthLimit
Inherited from ShapeProps.maxWidth

middle​

The position of the center of this node.

This shortcut property will set the node's position so that the center ends up in the given place. If present, overrides the NodeProps.position property. When anchor is not set, this will be the same as the NodeProps.position.

Inherited from ShapeProps.middle

minHeight​

minHeight?: SignalValueLengthLimit
Inherited from ShapeProps.minHeight

minWidth​

minWidth?: SignalValueLengthLimit
Inherited from ShapeProps.minWidth

opacity​

Inherited from ShapeProps.opacity

padding​

Inherited from ShapeProps.padding

paddingBottom​

Inherited from ShapeProps.paddingBottom

paddingLeft​

Inherited from ShapeProps.paddingLeft

paddingRight​

Inherited from ShapeProps.paddingRight

paddingTop​

Inherited from ShapeProps.paddingTop

position​

Inherited from ShapeProps.position

ratio​

Inherited from ShapeProps.ratio

ref​

Inherited from ShapeProps.ref

The position of the right edge of this node.

This shortcut property will set the node's position so that the right edge ends up in the given place. If present, overrides the NodeProps.position property.

Inherited from ShapeProps.right

rotation​

Inherited from ShapeProps.rotation

rough​

Enable rough.js rendering.

Inherited from ShapeProps.rough

roughDisableMultiStroke​

Whether to disable multi-stroke rendering.

By default, Rough.js renders strokes with multiple lines for a more sketchy appearance. Set to true to use a single stroke.

Inherited from ShapeProps.roughDisableMultiStroke

roughDisableMultiStrokeFill​

Whether to disable multi-stroke fill.

By default, Rough.js renders fills with multiple passes. Set to true to use a single fill pass.

Inherited from ShapeProps.roughDisableMultiStrokeFill

roughFillStyle​

roughFillStyle?: SignalValueRoughFillStyle

Fill style for the shape.

Inherited from ShapeProps.roughFillStyle

roughFillWeight​

Thickness of the lines used for filling.

Only applicable for hachure, cross-hatch, and similar fill styles.

Inherited from ShapeProps.roughFillWeight

roughHachureAngle​

Angle of the hachure lines in degrees.

Only applicable for hachure and cross-hatch fill styles.

Inherited from ShapeProps.roughHachureAngle

roughHachureGap​

Gap between hachure lines in pixels.

Only applicable for hachure, cross-hatch, and similar fill styles.

Inherited from ShapeProps.roughHachureGap

roughness​

Numerical value indicating how rough the drawing is.

A value of 0 will produce a smooth shape, while higher values introduce more irregularity. Typical range is 0-10.

Inherited from ShapeProps.roughness

roughSeed​

Seed for the random number generator.

Using the same seed produces consistent results, which is useful for reproducible animations.

Inherited from ShapeProps.roughSeed

rowGap​

Inherited from ShapeProps.rowGap

scale​

Inherited from ShapeProps.scale

scaleX​

Inherited from ShapeProps.scaleX

scaleY​

Inherited from ShapeProps.scaleY

selection​

selection?: SignalValuePossibleCodeSelection

The currently selected code range.

Either a single code.CodeRange or an array of them describing which parts of the code should be visually emphasized.

You can use code.word and code.lines to quickly create ranges.


shaders​

shaders?: PossibleShaderConfig
Experimental
This is an experimental feature. The behavior and API may change drastically between minor releases.
Inherited from ShapeProps.shaders

shadowBlur​

Inherited from ShapeProps.shadowBlur

shadowColor​

Inherited from ShapeProps.shadowColor

shadowOffset​

Inherited from ShapeProps.shadowOffset

shadowOffsetX​

Inherited from ShapeProps.shadowOffsetX

shadowOffsetY​

Inherited from ShapeProps.shadowOffsetY

shrink​

Inherited from ShapeProps.shrink

size​

Inherited from ShapeProps.size

skew​

Inherited from ShapeProps.skew

skewX​

Inherited from ShapeProps.skewX

skewY​

Inherited from ShapeProps.skewY

spawner​

spawner?: SignalValueComponentChildren

Deprecated

Use children instead.

Inherited from ShapeProps.spawner

stroke​

stroke?: SignalValuePossibleCanvasStyle
Inherited from ShapeProps.stroke

strokeFirst​

Inherited from ShapeProps.strokeFirst

strokeShaders​

strokeShaders?: PossibleShaderConfig
Inherited from ShapeProps.strokeShaders

textAlign​

Inherited from ShapeProps.textAlign

textDirection​

textDirection?: SignalValueCanvasDirection
Inherited from ShapeProps.textDirection

textWrap​

Inherited from ShapeProps.textWrap

top​

The position of the top edge of this node.

This shortcut property will set the node's position so that the top edge ends up in the given place. If present, overrides the NodeProps.position property.

Inherited from ShapeProps.top

topLeft​

The position of the top left corner of this node.

This shortcut property will set the node's position so that the top left corner ends up in the given place. If present, overrides the NodeProps.position property.

Inherited from ShapeProps.topLeft

topRight​

The position of the top right corner of this node.

This shortcut property will set the node's position so that the top right corner ends up in the given place. If present, overrides the NodeProps.position property.

Inherited from ShapeProps.topRight

translate​

Inherited from ShapeProps.translate

translateX​

Inherited from ShapeProps.translateX

translateY​

Inherited from ShapeProps.translateY

verticalAlign​

verticalAlign?: SignalValueVerticalAlign
Inherited from ShapeProps.verticalAlign

width​

Inherited from ShapeProps.width

wordBreak​

Inherited from ShapeProps.wordBreak

wrap​

wrap?: SignalValueFlexWrap
Inherited from ShapeProps.wrap

x​

x?: SignalValuenumber
Inherited from ShapeProps.x

y​

y?: SignalValuenumber
Inherited from ShapeProps.y

zIndex​

Inherited from ShapeProps.zIndex