Figma resources
Generate Figma variables and components from the same definitions the code uses.
What it does
The plugin reads the Xerobi registry and tokens, then creates Figma variables for colour (light and dark), spacing, radius and typography, and a component set for each component that has variants. Components in Figma come from the same source as the React components.
Install the plugin
The plugin is in the repository at packages/figma. Build it, then in Figma choose Plugins, Development, Import plugin from manifest, and select packages/figma/manifest.json.
bun run build --filter=@xerobi/ui-figmaGenerate
Run the plugin, pick the brand colour, and choose variables, components or both. The brand colour drives the primary ramp using the same derivation as the code.
Keeping in sync
Regenerate after a token or variant change. The plugin updates existing variables and component sets by name instead of duplicating them.