Get desktop application:
View/edit binary Protocol Buffers messages
The background of a node
Used in:
, ,Clear all the pixels underneath, used for hole-punch compositing.
DiamondGradient support possibly in the future.
A type of gradient where the colors transition along a circular path defined by a center point, an angle, and a scale.
Used in:
A single color stop within a gradient.
Used in:
, ,References an image via the key and the modifiers that will be used with it
Used in:
Instead of keeping decoded images in ViewStyle objects, we keep keys to the images in the ImageContext and then fetch decoded images when rendering. This means we can serialize the whole ImageContext, and always get the right image when we render.
A type of gradient where the colors transition smoothly along a straight line.
Used in:
A type of gradient where the colors transition smoothly from a central point outwards in a circular pattern.
Used in:
Defines how an image background is scaled to fit the background area.
Used in:
Bounds of a rectangle
Used in:
Representation of a variable collection. Every variable belongs to a collection, and a collection contains one or more modes.
Used in:
name -> id
id -> Mode
Color represents a color value within a design, encoded as RGBA (Red, Green, Blue, Alpha) where each component is an 8-bit integer. Alpha determines opacity, with 255 being fully opaque and 0 fully transparent. Encoding each component to uint32, which uses variable-length encoding.
Used in:
, , ,Holds either a direct color representation (e.g., RGBA values) or a reference to a color variable, providing flexibility in how you define colors.
Used in:
, , ,Holds a reference to a design variable. Fallback is the node color value from figma.
Used in:
Used in:
,Used in:
An event that causes one or more variants to change
Used in:
Color represented using floats in the range of 0 to 1.
Used in:
,FontFeature refers to specific typographic settings within a typeface, such as ligatures (e.g., "fi" becoming a single glyph) or small capitals. These features can enhance the visual appearance and readability of text, providing additional stylistic options for designers.
Used in:
,The width of a font as an approximate fraction of the normal width. Widths range from 0.5 to 2.0 inclusive, with 1.0 as the normal width.
Used in:
,Allows italic or oblique faces to be selected.
Used in:
,A face that is neither italic not obliqued.
A form that is generally cursive in nature.
A typically-sloped version of the regular face.
FontWeight specifies the visual thickness of a typeface. It's represented numerically, usually ranging from 100 (thin) to 900 (black). Common values include 400 (regular), 500 (medium), and 700 (bold).
Used in:
,Initially only support url. No nodeId hyperlink support.
Used in:
,A key frame that shows the given variant at the given frame
Used in:
A key frame variant that blends two or more variants
Used in:
Determines the vertical spacing between lines of text.
Used in:
,Representation of a variable mode. Variables can have fixed values for each available mode
Used in:
Holds either a numerical value (e.g., 100 for a font size) or a reference to a design variable. This allows for dynamic values that can adapt based on the current variable values.
Used in:
, , , ,Holds a reference to a design variable. Fallback is the node float value from figma.
Used in:
Path represents a complex shape in a design, defined by a series of commands (e.g., move, line, curve) and associated numerical data. It determines the outline of graphical elements or UI components.
Used in:
, ,WindingRule determines how the interior of a self-intersecting or overlapping path is filled.
Used in:
NonZero fills regions based on the direction of the path segments as they cross the ray.
EvenOdd fills regions based on whether a ray drawn from a point crosses the path an even or odd number of times.
Rectangle: Rectangle represents a rectangular region within a design, defined by its position (x, y coordinates) and dimensions (width, height).
Used in:
Represents a dimension in pixels or percentage
Used in:
Data for the parent of a set of variants
Used in:
A generic data structure for scalable ui to represent a component set or variant
Used in:
Data for a single variant of a component set
Used in:
Details for the runtime shader
Used in:
,string for runtime shader code
fallback color when runtime shader code isn't supported
shader uniforms, name => ShaderUniform
Data for shader uniform, containing name, type and default value set from plugin.
Used in:
name
type
shader uniform value
If this shader uniform should be ignored. No action to set the uniform value. For images, we have imageResolution bundled to the image input. The uniform value will be ignored but the uniform is in list for type check.
Shader uniform value, currently support float, FloatColor and float array.
Used in:
uniform "type" is "float", "half" or "iTime".
uniform "type" is "float2", "float3", "float4", "half2", "half3" or "half4" in the plugin data.
uniform "type" is "color3" or "color4" in the plugin data. Alpha would be ignored for "color3" when set uniform value to the runtime shader.
uniform "type" is "int2", "int3" or "int4" in the plugin data.
uniform "shader" holds an image ref key
uniform "shader" holds an image bytes data. It is created for uniform value customization.
uniform "shader" holds an image resource id. It is created for uniform value customization.
Float array value for float2, float3, float4, half2, half3 and half4.
Used in:
Image bytes for image uniform(shader).
Used in:
ImageRef for image uniform(shader).
Used in:
Image resource for image uniform(shader).
Used in:
Int array value for int2, int3 and int4.
Used in:
Size encapsulates the dimensions of an element, expressed as width and height values. These values typically represent pixels or density-independent pixels (dp), allowing for consistent sizing across different screen densities.
Used in:
,A stroke is similar to a border, except that it does not change layout (a border insets the children by the border size), it may be inset, centered or outset from the view bounds and there can be multiple strokes on a view.
Used in:
Runtime shader from the shader plugin as stroke. When shader is present, strokes will not be drawn.
How is a stroke aligned to its containing box?
Used in:
The stroke is entirely within the containing view. The stroke's outer edge matches the outer edge of the containing view.
The stroke is centered on the edge of the containing view, and extends into the view on the inside, and out of the view on the outside.
The stroke is entirely outside of the view. The stroke's inner edge is the outer edge of the containing view.
Stroke weight is either a uniform value for all sides, or individual weights for each side.
Used in:
One weight is used for all sides.
Individual weights for each side (typically only applied on boxes).
Used in:
Allows underline or strikethrough to be selected.
Used in:
,Representation of a Figma variable. We convert a figma_schema::Variable into this format to make the fields a bit easier to access.
Used in:
Variable Types
Used in:
Each variable contains a map of possible values. This data structure helps keep track of that data and contains functions to retrieve the value of a variable given a mode.
Used in:
Stores variable mappings
Used in:
ID -> Collection
Name -> ID
ID -> Variable
Collection ID -> [Name -> ID]
Maps Collection names to IDs
Used in:
Holds the value of a variable, whichever type it is.
Used in:
Vector defines a two-dimensional geometric vector, consisting of x and y components. Vectors are fundamental for representing spatial relationships and performing geometric transformations within a definition.
Used in:
Represents the geometric shape of a visual element, such as a rectangle, ellipse, or a custom path. It determines the boundaries of the element and influences how it is rendered and interacted with within a design.
Used in:
A container for other objects. Equivalent to a Compose Box or a Figma Frame
Used in:
A rounded rectangle
Used in:
Should have exactly four corners
Defines the appearance of the stroke's end points (e.g., round, square).
Used in:
,Not supported
Represents a complex arc shape within a design.
Used in:
The outer path defining the overall shape of the arc.
An optional inner path used for creating an outline or stroke effect.
A vector path
Used in:
A shape defined by multiple paths, with potentially rounded corners
Used in:
Exactly 4