interface TextNode { /** Human-friendly node name shown in Figma */ name: string /** Identifies the node as a text node */ type: 'TEXT' /** Whether the node is visible in the current document */ visible: boolean /** Raw text characters contained in the node */ characters: string}
interface GroupNode { /** Human-friendly node name shown in Figma */ name: string /** Identifies the node as a group */ type: 'GROUP' /** Whether the node is visible in the current document */ visible: boolean /** Ordered child nodes within this container */ children: DesignNode[]}
interface FrameNode { /** Human-friendly node name shown in Figma */ name: string /** Identifies the node as a frame */ type: 'FRAME' /** Whether the node is visible in the current document */ visible: boolean /** Ordered child nodes within this container */ children: DesignNode[]}
interface VectorNode { /** Human-friendly node name shown in Figma */ name: string /** Identifies the node as a vector */ type: 'VECTOR' /** Whether the node is visible in the current document */ visible: boolean /** Fill styles applied to the vector */ fills: Fill[]}
Component instance with properties and optional main component reference.
interface DesignComponent<T extends object = Record<string, ComponentPropertyValue>> { /** Human-friendly node name shown in Figma */ name: string /** Identifies the node as a component instance */ type: 'INSTANCE' /** Whether the node is visible in the current document */ visible: boolean /** Ordered child nodes within this container */ children: DesignNode[] /** Component property map keyed by property name */ properties: T /** Reference to the main component definition, if linked */ mainComponent?: { /** ID of the main component this instance is linked to */ id: string /** Name of the main component this instance is linked to */ name: string } | null}
interface DevComponent<T extends object = Record<string, unknown>> { /** Component tag or name to render */ name: string /** Props that should be passed to the component */ props: T /** Ordered child components or string literals */ children: (DevComponent | string)[]}
interface Plugin { /** Human-readable name displayed in the UI */ name: string /** Map of code block identifiers to configuration */ code: CodeOptions}