Duration
A length of time, for animation and transition tokens.
Value format
{ "$type": "duration", "$value": { "value": 300, "unit": "ms" } }| Field | Allowed |
|---|---|
value | A non-negative number |
unit | "ms" or "s" |
What you can type
| Input | Stored as |
|---|---|
300ms | { value: 300, unit: "ms" } |
0.5s | { value: 0.5, unit: "s" } |
300 | { value: 300, unit: "ms" } — a bare number defaults to ms |
Applying to Figma
Not applicable
Figma has no layer property that a duration maps to, so duration tokens have no apply targets. Attempting to apply one reports “Token type duration not supported yet.”
This is a platform limit, not a gap in the plugin. Duration tokens exist so that your animation timings live in the same document as the rest of the system, and so they export to the codebase where they are consumable.
What does work
- Authoring and editing in the dialog
- Validation against the DTCG spec
- Use as a slot inside a transition token
- References, export, folder export, and sync