Type aliases
BlendMode
BlendMode: "PASS_THROUGH" | "NORMAL" | "DARKEN" | "MULTIPLY" | "LINEAR_BURN" | "COLOR_BURN" | "LIGHTEN" | "SCREEN" | "LINEAR_DODGE" | "COLOR_DODGE" | "OVERLAY" | "SOFT_LIGHT" | "HARD_LIGHT" | "DIFFERENCE" | "EXCLUSION" | "HUE" | "SATURATION" | "COLOR" | "LUMINOSITY"
CANVAS
Type declaration
backgroundColor: Color
prototypeStartNodeID: string
Color
Color: { a: number; b: number; g: number; r: number }
Type declaration
a: number
b: number
g: number
r: number
ColorStop
Color
Stop
: { color
: Color; position
: string }Component
Component: { description: string; key: string; name: string }
Type declaration
description: string
key: string
name: string
Constraint
Constraint: { type: "SCALE" | "WIDTH" | "HEIGHT"; value: number }
Type declaration
type: "SCALE" | "WIDTH" | "HEIGHT"
value: number
EasingType
EasingType: "EASE_IN" | "EASE_OUT" | "EASE_IN_AND_OUT" | "LINEAR"
Effect
Effect
: { blendMode
: BlendMode; color
: Color; offset
: Vector; radius
: number; type
: "INNER_SHADOW" | "DROP_SHADOW" | "LAYER_BLUR" | "BACKGROUND_BLUR"; visible
: boolean }Type declaration
radius: number
type: "INNER_SHADOW" | "DROP_SHADOW" | "LAYER_BLUR" | "BACKGROUND_BLUR"
visible: boolean
ExportSetting
Export
Setting
: { constraint
: Constraint; format
: "JPG" | "PNG" | "SVG"; suffix
: string }Type declaration
format: "JPG" | "PNG" | "SVG"
suffix: string
FigmaNode
FigmaNode: { id: string; name: string; pluginData: any; sharedPluginData: any; type: string; visible: boolean }
Type declaration
id: string
name: string
pluginData: any
sharedPluginData: any
type: string
visible: boolean
FrameOffset
Frame
Offset
: { node_id
: string; node_offset
: Vector }Type declaration
node_id: string
node_offset: Vector
Hyperlink
Hyperlink: { nodeID: string; type: "URL" | "NODE"; url: string }
Type declaration
nodeID: string
type: "URL" | "NODE"
url: string
LayoutConstraint
LayoutConstraint: { horizontal?: "LEFT" | "RIGHT" | "CENTER" | "LEFT_RIGHT" | "SCALE"; vertical?: "TOP" | "BOTTOM" | "CENTER" | "TOP_BOTTOM" | "SCALE" }
Type declaration
Optional horizontal?: "LEFT" | "RIGHT" | "CENTER" | "LEFT_RIGHT" | "SCALE"
Optional vertical?: "TOP" | "BOTTOM" | "CENTER" | "TOP_BOTTOM" | "SCALE"
LayoutGrid
Layout
Grid
: { alignment
: "MIN" | "STRETCH" | "CENTER"; color
: Color; count
: number; gutterSize
: number; offset
: number; pattern
: "COLUMNS" | "ROWS" | "GRID"; sectionSize
: number; visible
: boolean }Type declaration
alignment: "MIN" | "STRETCH" | "CENTER"
count: number
gutterSize: number
offset: number
pattern: "COLUMNS" | "ROWS" | "GRID"
sectionSize: number
visible: boolean
Paint
Paint
: { ColorStop
?: ColorStop[]; blendMode
?: BlendMode; color
?: Color; gifRef
?: string; gradientHandlePositions
?: Vector | Vector[]; gradientStops
?: any[]; imageRef
?: string; imageTransform
?: Transform; opacity
?: number; position
?: string; rotation
?: number; scaleMode
?: "FILL" | "FIT" | "TILE" | "STRETCH"; scalingFactor
?: number; type
?: "SOLID" | "GRADIENT_LINEAR" | "GRADIENT_RADIAL" | "GRADIENT_ANGULAR" | "GRADIENT_DIAMOND" | "IMAGE" | "EMOJI"; visible
?: boolean }Type declaration
Optional ColorStop?: ColorStop[]
Optional blendMode?: BlendMode
Optional color?: Color
Optional gifRef?: string
Optional gradientHandlePositions?: Vector | Vector[]
Optional gradientStops?: any[]
Optional imageRef?: string
Optional imageTransform?: Transform
Optional opacity?: number
Optional position?: string
Optional rotation?: number
Optional scaleMode?: "FILL" | "FIT" | "TILE" | "STRETCH"
Optional scalingFactor?: number
Optional type?: "SOLID" | "GRADIENT_LINEAR" | "GRADIENT_RADIAL" | "GRADIENT_ANGULAR" | "GRADIENT_DIAMOND" | "IMAGE" | "EMOJI"
Optional visible?: boolean
Rectangle
Rectangle: { height?: number; width?: number; x?: number; y?: number }
Type declaration
Optional height?: number
Optional width?: number
Optional x?: number
Optional y?: number
Size
Size: { height: number; width: number }
Type declaration
height: number
width: number
Strokes
Strokes
: { color
: Color; length
: number; type
: string }Type declaration
length: number
type: string
Style
Style
: { description
: string; key
: string; name
: string; style_type
: StyleType }Type declaration
description: string
key: string
name: string
StyleType
StyleType: "FILL" | "TEXT" | "EFFECT" | "GRID"
TypeStyle
Type
Style
: { fills
?: Paint[]; fontFamily
?: string; fontPostScriptName
?: string; fontSize
?: number; fontWeight
?: number; hyperlink
?: Hyperlink; italic
?: boolean; letterSpacing
?: number; lineHeightPercent
?: number; lineHeightPercentFontSize
?: number; lineHeightPx
?: number; lineHeightUnit
?: "PIXELS" | "FONT_SIZE_%" | "INTRINSIC_%"; opentypeFlags
?: Map<string, number>; paragraphIndent
?: number; paragraphSpacing
?: number; textAlignHorizontal
?: "LEFT" | "RIGHT" | "CENTER" | "JUSTIFIED"; textAlignVertical
?: "TOP" | "CENTER" | "BOTTOM"; textAutoResize
?: "HEIGHT" | "WIDTH_AND_HEIGHT"; textCase
?: "LOWER" | "UPPER" | "TITLE" | "SMALL_CAPS" | "SMALL_CAPS_FORCED"; textDecoration
?: "STRIKETHROUGH" | "UNDERLINE" }Type declaration
Optional fills?: Paint[]
Optional fontFamily?: string
Optional fontPostScriptName?: string
Optional fontSize?: number
Optional fontWeight?: number
Optional hyperlink?: Hyperlink
Optional italic?: boolean
Optional letterSpacing?: number
Optional lineHeightPercent?: number
Optional lineHeightPercentFontSize?: number
Optional lineHeightPx?: number
Optional lineHeightUnit?: "PIXELS" | "FONT_SIZE_%" | "INTRINSIC_%"
Optional opentypeFlags?: Map<string, number>
Optional paragraphIndent?: number
Optional paragraphSpacing?: number
Optional textAlignHorizontal?: "LEFT" | "RIGHT" | "CENTER" | "JUSTIFIED"
Optional textAlignVertical?: "TOP" | "CENTER" | "BOTTOM"
Optional textAutoResize?: "HEIGHT" | "WIDTH_AND_HEIGHT"
Optional textCase?: "LOWER" | "UPPER" | "TITLE" | "SMALL_CAPS" | "SMALL_CAPS_FORCED"
Optional textDecoration?: "STRIKETHROUGH" | "UNDERLINE"
VECTOR
VECTOR
: { absoluteBoundingBox
: Rectangle; blendMode
: BlendMode; constraintsLayout
: Constraint; effects
: Effect[]; exportSettings
: ExportSetting[]; fillGeometry
: Path[]; fills
: Paint[]; isMask
: boolean; layoutAlign
: "MIN" | "CENTER" | "MAX" | "STRETCH"; locked
: boolean; opacity
: number; preserveRatio
: boolean; relativeTransform
: Transform; size
: Vector; strokeAlignString
: "INSIDE" | "OUTSIDE" | "CENTER"; strokeCap
: "NONE" | "ROUND" | "SQUARE" | "LINE_ARROW" | "TRIANGLE_ARROW"; strokeDashes
: number[]; strokeGeometry
: Path[]; strokeJoin
: "MITER" | "BEVEL" | "ROUND"; strokeMiterAngle
: number; strokeWeight
: number; strokes
: Paint[]; styles
: Map<StyleType, string>; transitionDuration
: number; transitionEasing
: EasingType; transitionNodeID
: string }Type declaration
absoluteBoundingBox: Rectangle
fillGeometry: Path[]
isMask: boolean
layoutAlign: "MIN" | "CENTER" | "MAX" | "STRETCH"
locked: boolean
opacity: number
preserveRatio: boolean
relativeTransform: Transform
strokeAlignString: "INSIDE" | "OUTSIDE" | "CENTER"
strokeCap: "NONE" | "ROUND" | "SQUARE" | "LINE_ARROW" | "TRIANGLE_ARROW"
strokeDashes: number[]
strokeGeometry: Path[]
strokeJoin: "MITER" | "BEVEL" | "ROUND"
strokeMiterAngle: number
strokeWeight: number
strokes: Paint[]
styles: Map<StyleType, string>
transitionDuration: number
transitionNodeID: string
Vector
Vector: { x: number; y: number }
/