Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Official Figma skill for writing directly to the Figma canvas through the MCP server and Plugin API.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
wwds-effect-styles.md
1# Working with design systems: Effect Styles23Effect styles in Figma are named, reusable definitions of one or more visual effects — drop shadows, inner shadows, and blurs. They are the closest equivalent to a shadow or elevation token in a design system.45Effect styles are distinct from variables. There is no single variable type that represents a shadow. However, individual numeric and color properties within an effect _can_ be bound to variables, allowing shadow values to participate in a token system.67## Model89An `EffectStyle` has one core writable property beyond the base style fields:1011| Property | Type | Notes |12| ------------- | ----------------------- | ----------------------------------------------------- |13| `name` | `string` | Slash-delimited for grouping (e.g. `"Elevation/200"`) |14| `effects` | `ReadonlyArray<Effect>` | **Read-only array** — clone, modify, reassign |15| `description` | `string` | Inherited from `BaseStyleMixin` |1617### Effect types1819An `Effect` is a discriminated union. The most common types:2021| `type` | Key properties |22| ----------------- | ---------------------------------------------------------------------------------------------------- |23| `DROP_SHADOW` | `color: RGBA`, `offset: Vector`, `radius: number`, `spread: number`, `visible: boolean`, `blendMode` |24| `INNER_SHADOW` | Same as `DROP_SHADOW` |25| `LAYER_BLUR` | `radius: number`, `visible: boolean` |26| `BACKGROUND_BLUR` | `radius: number`, `visible: boolean` |2728All colors are in 0–1 range (`RGBA`), not 0–255.2930### Variable bindings on effects3132Effect properties that can be bound to variables (via `setBoundVariableForEffect(effect, field, variable)` on a node, or inline when constructing):3334`color`, `radius`, `spread`, `offsetX`, `offsetY`3536Note: `setBoundVariableForEffect` returns a **new** effect object — you must capture it and reassign the `effects` array.3738### Applying an effect style to a node3940Assign the style's `id` to the node's `effectStyleId`. The node's `effects` property will then reflect the style's values.4142## Common gotchas4344- **`effects` is read-only**: You cannot mutate the array in place. Clone it, modify the clone, then reassign: `style.effects = [...style.effects, newEffect]`.45- **Effects stack in order**: The order of effects in the array matters visually. Drop shadows render bottom-to-top.46- **Colors are RGBA 0–1**: `{ r: 0, g: 0, b: 0, a: 0.15 }` — not hex, not 0–255.47- **`getLocalEffectStyles()` is deprecated**: Always use `getLocalEffectStylesAsync()`.48- **Styles are not automatically applied**: Creating an `EffectStyle` has no effect on any node until you assign its ID to a node.4950## Code patterns5152For runnable code examples (listing, creating, applying effect styles), see [effect-style-patterns.md](../effect-style-patterns.md).53