D
D
Developers
Search…
Shadow
Shadow tokens define one single shadow, such as 2px 2px 4px #000000 .

Example Token Payload

This is what the shadow payload looks like:
1
{
2
"id": string
3
"name": string
4
"description": string
5
"tokenType": "Shadow"
6
"origin": ItemOrigin | null
7
"value": {
8
"color": {
9
"hex": string
10
"r": int (0-255),
11
"g": int (0-255),
12
"b": int (0-255),
13
"a": int (0-255),
14
"referencedToken": Color | null
15
},
16
"x": {
17
"unit": "px",
18
"measure": double
19
"referencedToken": Measure | null
20
},
21
"y": {
22
"unit": "px",
23
"measure": double
24
"referencedToken": Measure | null
25
},
26
"spread": {
27
"unit": "px",
28
"measure": double
29
"referencedToken": Measure | null
30
},
31
"radius": {
32
"unit": "px",
33
"measure": double
34
"referencedToken": Measure | null
35
},
36
"opacity": double (0-1)
37
"referencedToken": Shadow | null
38
}
39
}
Copied!

Associated functions

You can use the following functions to retrieve shadow tokens from your design system:
Last modified 6mo ago