figma library
Figma API client library.
To get started, retrieve your Figma access token here and start making requests.
Classes
- ArcData
- Information about the arc properties of an ellipse. 0° is the x axis and increasing angles rotate clockwise.
- BooleanOperation
- Boolean operations combine any set of shape layers through one of four formulas: Union, Subtract, Intersect, and Exclude.
- Canvas
- A Canvas node represents a Page in a Figma File. A Canvas node can then have any number of nodes as its children. Each subtree stemming from a Canvas node will represent a layer (e.g an object) on the Canvas.
- Color
- An RGBA color, represented by float values for each channel.
- ColorStop
- A position color pair representing a gradient stop.
- Comment
- A comment or reply left by a user.
- CommentsResponse
- Response wrapping a list of Comments from the Figma API docs.
- Component
- An arrangement of published UI elements that can be instantiated across Figma files.
- ComponentNode
- A component is a reusable piece of design that can be applied to different frames. Components can contain other components.
- ComponentProperty
- Component properties.
- ComponentPropertyDefinition
- Definition of a component property.
- ComponentResponse
- Response wrapping a Component from the Figma API docs.
- ComponentSet
- A node containing a set of variants of a component.
- ComponentsMeta
- Response wrapping a list of Components from the Figma API docs.
- ComponentsResponse
- Response wrapper containing a list of Components from the Figma API docs.
- Constraint
- Sizing constraint for exports.
- Cursor
- Pagination cursor.
- Document
- At the root of every File is a Document node, and from that Document node stems any Canvas nodes.
- Effect
- A visual effect such as a shadow or blur.
- Ellipse
- An ellipse shaped vector.
- ExportSetting
- Format and size to export an asset at.
- FigmaClient
- A client for interacting with the Figma API.
- FigmaQuery
- A wrapper that wraps all available query values for the Figma API.
- FileResponse
- A response object containing a file.
- FlowStartingPoint
- A starting point for a flow within a frame.
- Frame
- A Figma frame.
- FrameInfo
- Data on the frame a component resides in.
- Group
- ImageResponse
- A response object containing a list of images.
- Instance
- InstanceSwapPreferredValue
- A preferred value for an instance swap property.
- LayoutConstraint
- Layout constraint relative to containing Frame.
- LayoutGrid
- Guides to align and place objects within a frame.
- Line
- Node
- A generic node in the document.
- NodesResponse
- A response object containing a list of a project's files.
- Overrides
- All overrides for a component.
- Paint
- A solid color, gradient, or image texture that can be applied as fills or strokes.
- PaintOverride
- Paint metadata to override default paints.
- Path
- A path in a frame.
- PostComment
- A request object for posting a comment.
- Project
- A Project can be identified by both the Project name, and the ProjectID.
- ProjectFile
- A Figma project file.
- ProjectFilesResponse
- A response object containing a list of a project's files.
- PrototypeDevice
- A device used for a prototype.
- Rectangle
- A rectangle is a rectangular-shaped vector that has a width and height and may have rounded corners.
- RegularPolygon
- Size
- A width and a height.
- SizeRectangle
- A rectangle that expresses a bounding box in absolute coordinates.
- Slice
- A slice is a special kind of node that represents a section of the canvas that can be exported. Slices do not clip their children, and can contain children that are outside of their bounds.
- Star
- A star shape represented as a Vector.
- StrokeWeights
- Individual stroke weights for Frame and Vector nodes.
- Style
- A set of properties that can be applied to nodes and published. Styles for a property can be created in the corresponding property's panel while editing a file.
- StyleResponse
- A response object containing a Style object.
- StylesMeta
- Wrapper containing a Style list along some metadata.
- StylesResponse
- A response object containing a list of styles.
- TeamProjectsResponse
- A response object containing a list of a team's projects.
- Text
- A text node, represented as a Vector and modified by a TypeStyle.
- TypeStyle
- Metadata for character formatting.
- User
- A description of a Figma user.
- Vector
- A vector node, either a path or a group of paths. All geometry in a vector is either strokes or fills. Shapes like Ellipse, Rectangle and Line are vectors, as well as Text, among others.
- Vector2D
- A 2D vector, represented by an x and y coordinate.
- Version
- A version of a file.
- VersionsResponse
- A response object containing a list of versions.
Enums
- BlendMode
- Enum describing how layer blends with layers below.
- ComponentPropertyType
- Component property type.
- ConstraintType
- Type of constraint to apply.
- CounterAxisAlignItems
- Determines how the auto-layout frame’s children should be aligned in the primary axis direction.
- CounterAxisSizingMode
- Whether the counter axis has a fixed length (determined by the user) or an automatic length (determined by the layout engine). This property is only applicable for auto-layout frames.
- EasingType
- Enum describing animation easing curves.
- EffectType
- Type of effect.
- ExportFormat
- Image type, supports JPG, PDF, PNG and SVG formats.
- HorizontalConstraint
- Type of horizontal constraint to apply.
- InstanceSwapPreferredValueType
- The type of node for a preferred value.
- LayoutAlign
- How the layer is aligned inside an auto-layout frame. This property is only provided for direct children of auto-layout frames.
- LayoutMode
- Whether this layer uses auto-layout to position its children.
- LayoutPattern
- Orientation of the grid as a string enum.
- LayoutPositioning
- Type of layout positioning applied to a node.
- LineHeightUnit
- The unit of the line height value specified by the user.
- LineType
- Operation
- A string enum indicating the type of boolean operation applied.
- OverflowDirection
- Defines the scrolling behavior of the frame, if there exist contents outside of the frame boundaries. The frame can either scroll vertically, horizontally, or in both directions to the extents of the content contained within it. This behavior can be observed in a prototype.
- PaintType
- Type of paint as a string enum.
- PrimaryAxisAlignItems
- Determines how the auto-layout frame’s children should be aligned in the primary axis direction.
- PrimaryAxisSizingMode
- Whether the primary axis has a fixed length (determined by the user) or an automatic length (determined by the layout engine).
- PrototypeDeviceRotation
- Device rotation.
- PrototypeDeviceType
- Device type.
- ScaleMode
- Image scaling mode.
- StrokeAlign
- Position of stroke relative to vector outline.
- StrokeCap
- A string enum with value of StrokeCap.none, StrokeCap.round, StrokeCap.square, StrokeCap.lineArrow or StrokeCap.triangleArrow, describing the end caps of vector paths.
- StrokeJoin
- A string enum with value of StrokeJoin.miter, StrokeJoin.bevel, or StrokeCap.round, describing how corners in vector paths are rendered.
- StyleType
- The type of style as string enum.
- StyleTypeKey
- The type of style as string enum for keys.
- TextAlignHorizontal
- Horizontal text alignment as string enum.
- TextAlignVertical
- Vertical text alignment as string enum.
- TextAutoResize
- Dimensions along which text will auto resize.
- TextCase
- Text casing applied to the node, default is the original casing.
- TextDecoration
- Text decoration applied to the node, default is none.
- VerticalConstraint
- Type of vertical constraint to apply.
- WindingRule
Extensions
- $ArcDataCopyWith on ArcData
- $BooleanOperationCopyWith on BooleanOperation
- $CanvasCopyWith on Canvas
- $ColorCopyWith on Color
- $ColorStopCopyWith on ColorStop
- $CommentCopyWith on Comment
- $CommentsResponseCopyWith on CommentsResponse
- $ComponentCopyWith on Component
- $ComponentNodeCopyWith on ComponentNode
- $ComponentPropertyCopyWith on ComponentProperty
- $ComponentPropertyDefinitionCopyWith on ComponentPropertyDefinition
- $ComponentResponseCopyWith on ComponentResponse
- $ComponentSetCopyWith on ComponentSet
- $ComponentsMetaCopyWith on ComponentsMeta
- $ComponentsResponseCopyWith on ComponentsResponse
- $ConstraintCopyWith on Constraint
- $CursorCopyWith on Cursor
- $DocumentCopyWith on Document
- $EffectCopyWith on Effect
- $EllipseCopyWith on Ellipse
- $ExportSettingCopyWith on ExportSetting
- $FileResponseCopyWith on FileResponse
- $FlowStartingPointCopyWith on FlowStartingPoint
- $FrameCopyWith on Frame
- $FrameInfoCopyWith on FrameInfo
- $GroupCopyWith on Group
- $ImageResponseCopyWith on ImageResponse
- $InstanceCopyWith on Instance
- $InstanceSwapPreferredValueCopyWith on InstanceSwapPreferredValue
- $LayoutConstraintCopyWith on LayoutConstraint
- $LayoutGridCopyWith on LayoutGrid
- $LineCopyWith on Line
- $NodeCopyWith on Node
- $NodesResponseCopyWith on NodesResponse
- $OverridesCopyWith on Overrides
- $PaintCopyWith on Paint
- $PaintOverrideCopyWith on PaintOverride
- $PathCopyWith on Path
- $PostCommentCopyWith on PostComment
- $ProjectCopyWith on Project
- $ProjectFileCopyWith on ProjectFile
- $ProjectFilesResponseCopyWith on ProjectFilesResponse
- $PrototypeDeviceCopyWith on PrototypeDevice
- $RectangleCopyWith on Rectangle
- $RegularPolygonCopyWith on RegularPolygon
- $SizeCopyWith on Size
- $SizeRectangleCopyWith on SizeRectangle
- $SliceCopyWith on Slice
- $StarCopyWith on Star
- $StrokeWeightsCopyWith on StrokeWeights
- $StyleCopyWith on Style
- $StyleResponseCopyWith on StyleResponse
- $StylesMetaCopyWith on StylesMeta
- $StylesResponseCopyWith on StylesResponse
- $TeamProjectsResponseCopyWith on TeamProjectsResponse
- $TextCopyWith on Text
- $TypeStyleCopyWith on TypeStyle
- $UserCopyWith on User
- $Vector2DCopyWith on Vector2D
- $VectorCopyWith on Vector
- $VersionCopyWith on Version
- $VersionsResponseCopyWith on VersionsResponse
Constants
Exceptions / Errors
- FigmaException
- An error from the Figma API docs.