@revideo/2d / components / CodeProps
Interface: CodeProps
Defined in: 2d/src/lib/components/Code.ts:76
Extends
Properties
alignContent?
optionalalignContent?:SignalValue<FlexContent>
Defined in: 2d/src/lib/components/Layout.ts:89
Inherited from
alignItems?
optionalalignItems?:SignalValue<FlexItems>
Defined in: 2d/src/lib/components/Layout.ts:90
Inherited from
alignSelf?
optionalalignSelf?:SignalValue<FlexItems>
Defined in: 2d/src/lib/components/Layout.ts:91
Inherited from
antialiased?
optionalantialiased?:SignalValue<boolean>
Defined in: 2d/src/lib/components/Shape.ts:26
Inherited from
basis?
optionalbasis?:SignalValue<FlexBasis>
Defined in: 2d/src/lib/components/Layout.ts:83
Inherited from
bottom?
optionalbottom?:SignalValue<PossibleVector2>
Defined in: 2d/src/lib/components/Layout.ts:138
The position of the bottom edge of this node.
Remarks
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
bottomLeft?
optionalbottomLeft?:SignalValue<PossibleVector2>
Defined in: 2d/src/lib/components/Layout.ts:183
The position of the bottom left corner of this node.
Remarks
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
bottomRight?
optionalbottomRight?:SignalValue<PossibleVector2>
Defined in: 2d/src/lib/components/Layout.ts:192
The position of the bottom right corner of this node.
Remarks
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
cache?
optionalcache?:SignalValue<boolean>
Defined in: 2d/src/lib/components/Node.ts:99
Inherited from
cachePadding?
optionalcachePadding?:SignalValue<PossibleSpacing>
Defined in: 2d/src/lib/components/Node.ts:119
Controls the padding of the cached canvas used by this node.
Remarks
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
cachePaddingBottom?
optionalcachePaddingBottom?:SignalValue<number>
Defined in: 2d/src/lib/components/Node.ts:107
Controls the padding of the cached canvas used by this node.
Remarks
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
cachePaddingLeft?
optionalcachePaddingLeft?:SignalValue<number>
Defined in: 2d/src/lib/components/Node.ts:111
Controls the padding of the cached canvas used by this node.
Remarks
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
cachePaddingRight?
optionalcachePaddingRight?:SignalValue<number>
Defined in: 2d/src/lib/components/Node.ts:115
Controls the padding of the cached canvas used by this node.
Remarks
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
cachePaddingTop?
optionalcachePaddingTop?:SignalValue<number>
Defined in: 2d/src/lib/components/Node.ts:103
Controls the padding of the cached canvas used by this node.
Remarks
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
children?
optionalchildren?:SignalValue<ComponentChildren>
Defined in: 2d/src/lib/components/Node.ts:71
Inherited from
clip?
optionalclip?:SignalValue<boolean>
Defined in: 2d/src/lib/components/Layout.ts:193
Inherited from
code?
optionalcode?:SignalValue<PossibleCodeScope>
Defined in: 2d/src/lib/components/Code.ts:84
The code to display.
columnGap?
optionalcolumnGap?:SignalValue<Length>
Defined in: 2d/src/lib/components/Layout.ts:93
Inherited from
composite?
optionalcomposite?:SignalValue<boolean>
Defined in: 2d/src/lib/components/Node.ts:121
Inherited from
compositeOperation?
optionalcompositeOperation?:SignalValue<GlobalCompositeOperation>
Defined in: 2d/src/lib/components/Node.ts:122
Inherited from
direction?
optionaldirection?:SignalValue<FlexDirection>
Defined in: 2d/src/lib/components/Layout.ts:82
Inherited from
drawHooks?
optionaldrawHooks?:SignalValue<DrawHooks>
Defined in: 2d/src/lib/components/Code.ts:92
Custom drawing logic for the code.
Remarks
Check out DrawHooks for available render hooks.
fill?
optionalfill?:SignalValue<PossibleCanvasStyle>
Defined in: 2d/src/lib/components/Shape.ts:18
Inherited from
filters?
optionalfilters?:SignalValue<Filter[]>
Defined in: 2d/src/lib/components/Node.ts:91
Inherited from
fontFamily?
optionalfontFamily?:SignalValue<string>
Defined in: 2d/src/lib/components/Layout.ts:96
Inherited from
fontSize?
optionalfontSize?:SignalValue<number>
Defined in: 2d/src/lib/components/Layout.ts:97
Inherited from
fontStyle?
optionalfontStyle?:SignalValue<string>
Defined in: 2d/src/lib/components/Layout.ts:98
Inherited from
fontWeight?
optionalfontWeight?:SignalValue<number>
Defined in: 2d/src/lib/components/Layout.ts:99
Inherited from
gap?
optionalgap?:SignalValue<Length>
Defined in: 2d/src/lib/components/Layout.ts:94
Inherited from
grow?
optionalgrow?:SignalValue<number>
Defined in: 2d/src/lib/components/Layout.ts:84
Inherited from
height?
optionalheight?:SignalValue<Length>
Defined in: 2d/src/lib/components/Layout.ts:63
Inherited from
highlighter?
optionalhighlighter?:SignalValue<CodeHighlighter<unknown> |null>
Defined in: 2d/src/lib/components/Code.ts:80
The code highlighter to use for this code node.
Remarks
Defaults to a shared code.LezerHighlighter.
justifyContent?
optionaljustifyContent?:SignalValue<FlexContent>
Defined in: 2d/src/lib/components/Layout.ts:88
Inherited from
key?
optionalkey?:string
Defined in: 2d/src/lib/components/Node.ts:76
Inherited from
layout?
optionallayout?:LayoutMode
Defined in: 2d/src/lib/components/Layout.ts:59
Inherited from
left?
optionalleft?:SignalValue<PossibleVector2>
Defined in: 2d/src/lib/components/Layout.ts:147
The position of the left edge of this node.
Remarks
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
letterSpacing?
optionalletterSpacing?:SignalValue<number>
Defined in: 2d/src/lib/components/Layout.ts:101
Inherited from
lineCap?
optionallineCap?:SignalValue<CanvasLineCap>
Defined in: 2d/src/lib/components/Shape.ts:23
Inherited from
lineDash?
optionallineDash?:SignalValue<number[]>
Defined in: 2d/src/lib/components/Shape.ts:24
Inherited from
lineDashOffset?
optionallineDashOffset?:SignalValue<number>
Defined in: 2d/src/lib/components/Shape.ts:25
Inherited from
lineHeight?
optionallineHeight?:SignalValue<Length>
Defined in: 2d/src/lib/components/Layout.ts:100
Inherited from
lineJoin?
optionallineJoin?:SignalValue<CanvasLineJoin>
Defined in: 2d/src/lib/components/Shape.ts:22
Inherited from
lineWidth?
optionallineWidth?:SignalValue<number>
Defined in: 2d/src/lib/components/Shape.ts:21
Inherited from
margin?
optionalmargin?:SignalValue<PossibleSpacing>
Defined in: 2d/src/lib/components/Layout.ts:74
Inherited from
marginBottom?
optionalmarginBottom?:SignalValue<number>
Defined in: 2d/src/lib/components/Layout.ts:71
Inherited from
marginLeft?
optionalmarginLeft?:SignalValue<number>
Defined in: 2d/src/lib/components/Layout.ts:72
Inherited from
marginRight?
optionalmarginRight?:SignalValue<number>
Defined in: 2d/src/lib/components/Layout.ts:73
Inherited from
marginTop?
optionalmarginTop?:SignalValue<number>
Defined in: 2d/src/lib/components/Layout.ts:70
Inherited from
maxHeight?
optionalmaxHeight?:SignalValue<LengthLimit>
Defined in: 2d/src/lib/components/Layout.ts:65
Inherited from
maxWidth?
optionalmaxWidth?:SignalValue<LengthLimit>
Defined in: 2d/src/lib/components/Layout.ts:64
Inherited from
middle?
optionalmiddle?:SignalValue<PossibleVector2>
Defined in: 2d/src/lib/components/Layout.ts:120
The position of the center of this node.
Remarks
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 offset is not set, this will be the same as the NodeProps.position.
Inherited from
minHeight?
optionalminHeight?:SignalValue<LengthLimit>
Defined in: 2d/src/lib/components/Layout.ts:67
Inherited from
minWidth?
optionalminWidth?:SignalValue<LengthLimit>
Defined in: 2d/src/lib/components/Layout.ts:66
Inherited from
offset?
optionaloffset?:SignalValue<PossibleVector2>
Defined in: 2d/src/lib/components/Layout.ts:109
Inherited from
offsetX?
optionaloffsetX?:SignalValue<number>
Defined in: 2d/src/lib/components/Layout.ts:107
Inherited from
offsetY?
optionaloffsetY?:SignalValue<number>
Defined in: 2d/src/lib/components/Layout.ts:108
Inherited from
opacity?
optionalopacity?:SignalValue<number>
Defined in: 2d/src/lib/components/Node.ts:90
Inherited from
padding?
optionalpadding?:SignalValue<PossibleSpacing>
Defined in: 2d/src/lib/components/Layout.ts:80
Inherited from
paddingBottom?
optionalpaddingBottom?:SignalValue<number>
Defined in: 2d/src/lib/components/Layout.ts:77
Inherited from
paddingLeft?
optionalpaddingLeft?:SignalValue<number>
Defined in: 2d/src/lib/components/Layout.ts:78
Inherited from
paddingRight?
optionalpaddingRight?:SignalValue<number>
Defined in: 2d/src/lib/components/Layout.ts:79
Inherited from
paddingTop?
optionalpaddingTop?:SignalValue<number>
Defined in: 2d/src/lib/components/Layout.ts:76
Inherited from
position?
optionalposition?:SignalValue<PossibleVector2>
Defined in: 2d/src/lib/components/Node.ts:80
Inherited from
ratio?
optionalratio?:SignalValue<number>
Defined in: 2d/src/lib/components/Layout.ts:68
Inherited from
ref?
optionalref?:ReferenceReceiver<any>
Defined in: 2d/src/lib/components/Node.ts:70
Inherited from
right?
optionalright?:SignalValue<PossibleVector2>
Defined in: 2d/src/lib/components/Layout.ts:156
The position of the right edge of this node.
Remarks
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
rotation?
optionalrotation?:SignalValue<number>
Defined in: 2d/src/lib/components/Node.ts:81
Inherited from
rowGap?
optionalrowGap?:SignalValue<Length>
Defined in: 2d/src/lib/components/Layout.ts:92
Inherited from
scale?
optionalscale?:SignalValue<PossibleVector2>
Defined in: 2d/src/lib/components/Node.ts:84
Inherited from
scaleX?
optionalscaleX?:SignalValue<number>
Defined in: 2d/src/lib/components/Node.ts:82
Inherited from
scaleY?
optionalscaleY?:SignalValue<number>
Defined in: 2d/src/lib/components/Node.ts:83
Inherited from
selection?
optionalselection?:SignalValue<PossibleCodeSelection>
Defined in: 2d/src/lib/components/Code.ts:88
The currently selected code range.
Remarks
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?
optionalshaders?:PossibleShaderConfig
Defined in: 2d/src/lib/components/Node.ts:126
Experimental
Inherited from
shadowBlur?
optionalshadowBlur?:SignalValue<number>
Defined in: 2d/src/lib/components/Node.ts:94
Inherited from
shadowColor?
optionalshadowColor?:SignalValue<PossibleColor>
Defined in: 2d/src/lib/components/Node.ts:93
Inherited from
shadowOffset?
optionalshadowOffset?:SignalValue<PossibleVector2>
Defined in: 2d/src/lib/components/Node.ts:97
Inherited from
shadowOffsetX?
optionalshadowOffsetX?:SignalValue<number>
Defined in: 2d/src/lib/components/Node.ts:95
Inherited from
shadowOffsetY?
optionalshadowOffsetY?:SignalValue<number>
Defined in: 2d/src/lib/components/Node.ts:96
Inherited from
shrink?
optionalshrink?:SignalValue<number>
Defined in: 2d/src/lib/components/Layout.ts:85
Inherited from
size?
optionalsize?:SignalValue<PossibleVector2<Length>>
Defined in: 2d/src/lib/components/Layout.ts:106
Inherited from
skew?
optionalskew?:SignalValue<PossibleVector2>
Defined in: 2d/src/lib/components/Node.ts:87
Inherited from
skewX?
optionalskewX?:SignalValue<number>
Defined in: 2d/src/lib/components/Node.ts:85
Inherited from
skewY?
optionalskewY?:SignalValue<number>
Defined in: 2d/src/lib/components/Node.ts:86
Inherited from
spawner?
optionalspawner?:SignalValue<ComponentChildren>
Defined in: 2d/src/lib/components/Node.ts:75
Deprecated
Use children instead.
Inherited from
stroke?
optionalstroke?:SignalValue<PossibleCanvasStyle>
Defined in: 2d/src/lib/components/Shape.ts:19
Inherited from
strokeFirst?
optionalstrokeFirst?:SignalValue<boolean>
Defined in: 2d/src/lib/components/Shape.ts:20
Inherited from
tagName?
optionaltagName?: keyof HTMLElementTagNameMap
Defined in: 2d/src/lib/components/Layout.ts:60
Inherited from
textAlign?
optionaltextAlign?:SignalValue<CanvasTextAlign>
Defined in: 2d/src/lib/components/Layout.ts:104
Inherited from
textDirection?
optionaltextDirection?:SignalValue<CanvasDirection>
Defined in: 2d/src/lib/components/Layout.ts:103
Inherited from
textWrap?
optionaltextWrap?:SignalValue<TextWrap>
Defined in: 2d/src/lib/components/Layout.ts:102
Inherited from
top?
optionaltop?:SignalValue<PossibleVector2>
Defined in: 2d/src/lib/components/Layout.ts:129
The position of the top edge of this node.
Remarks
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
topLeft?
optionaltopLeft?:SignalValue<PossibleVector2>
Defined in: 2d/src/lib/components/Layout.ts:165
The position of the top left corner of this node.
Remarks
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
topRight?
optionaltopRight?:SignalValue<PossibleVector2>
Defined in: 2d/src/lib/components/Layout.ts:174
The position of the top right corner of this node.
Remarks
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
width?
optionalwidth?:SignalValue<Length>
Defined in: 2d/src/lib/components/Layout.ts:62
Inherited from
wrap?
optionalwrap?:SignalValue<FlexWrap>
Defined in: 2d/src/lib/components/Layout.ts:86
Inherited from
x?
optionalx?:SignalValue<number>
Defined in: 2d/src/lib/components/Node.ts:78
Inherited from
y?
optionaly?:SignalValue<number>
Defined in: 2d/src/lib/components/Node.ts:79
Inherited from
zIndex?
optionalzIndex?:SignalValue<number>
Defined in: 2d/src/lib/components/Node.ts:88