Figma Developers

Figma Developers

  • Introduction
  • API Reference
  • Updates

›Figma APIs

Figma APIs

  • API Overview
  • The Typings File
  • figma
  • figma.ui
  • figma.viewport
  • figma.clientStorage
  • API errors

Node APIs

  • Node Types
  • BooleanOperationNode
  • ComponentNode
  • ComponentSetNode
  • DocumentNode
  • EllipseNode
  • FrameNode
  • GroupNode
  • InstanceNode
  • LineNode
  • PageNode
  • PolygonNode
  • RectangleNode
  • SliceNode
  • StarNode
  • TextNode
  • VectorNode

Datatypes

  • Action
  • ArcData
  • BlendMode
  • Constraints
  • Effect
  • ExportSettings
  • FontName
  • Guide
  • HandleMirroring
  • Image
  • LayoutGrid
  • LetterSpacing
  • LineHeight
  • OverflowDirection
  • Overlay
  • Paint
  • PublishStatus
  • Reaction
  • Rect
  • RGB/RGBA
  • StrokeCap
  • StrokeJoin
  • TextCase
  • TextDecoration
  • Transition
  • Transform
  • Trigger
  • Vector
  • VectorPath
  • VectorNetwork
  • BaseStyle
  • EffectStyle
  • GridStyle
  • PaintStyle
  • TextStyle

Properties

  • description
  • description
  • findAll
  • findChild
  • findChildren
  • findOne
  • constraint
  • svgOutlineText
  • scaleFactor
  • guides
  • selectedTextRange
  • selection
  • autoRename
  • characters
  • deleteCharacters
  • insertCharacters
  • textAutoResize
  • data
  • windingRule
  • closePlugin
  • combineAsVariants
  • createBooleanOperation
  • createComponent
  • createEllipse
  • createFrame
  • createImage
  • createLine
  • createPage
  • createPolygon
  • createRectangle
  • createSlice
  • createStar
  • createText
  • createVector
  • flatten
  • group
  • loadFontAsync
  • mixed
  • notify
  • off
  • on
  • showUI
  • on
  • onmessage
  • postMessage
  • zoom
  • appendChild
  • children
  • constraints
  • cornerRadius
  • cornerSmoothing
  • counterAxisAlignItems
  • counterAxisSizingMode
  • exportAsync
  • fills
  • fillStyleId
  • findAll
  • findChild
  • findChildren
  • findOne
  • id
  • insertChild
  • layoutAlign
  • layoutGrow
  • layoutMode
  • locked
  • name
  • numberOfFixedChildren
  • overflowDirection
  • parent
  • primaryAxisAlignItems
  • primaryAxisSizingMode
  • relativeTransform
  • remove
  • removed
  • rescale
  • resize
  • resizeWithoutConstraints
  • rotation
  • setPluginData
  • setRelaunchData
  • setSharedPluginData
  • strokeAlign
  • strokeCap
  • strokeJoin
  • toString
  • visible
  • x
  • y

figma.clientStorage

The figma.clientStorage API allows you to store data on the user's local machine. Unlike data stored with the document (such as setPluginData), this data is not synchronized across users. It's similar to the Window.localStorage API, but is asynchronous, and allows storing objects, arrays, strings, numbers, booleans, null, undefined and Uint8Array. Like localStorage, you should expect that user actions such as clearing the browser cache might clear all stored data.

getAsync(key: string): Promise<any | undefined>

Retrieves a value from client storage with the given key.

setAsync(key: string, value: any): Promise<void>

Sets a value to client storage with the given key.

← figma.viewportAPI errors →
Learn more about Figma