@coinbase/cds-mcp-server 8.21.8 → 8.22.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/mcp-docs/mobile/components/AreaChart.txt +39 -37
- package/mcp-docs/mobile/components/Avatar.txt +18 -18
- package/mcp-docs/mobile/components/AvatarButton.txt +19 -19
- package/mcp-docs/mobile/components/Banner.txt +62 -23
- package/mcp-docs/mobile/components/BarChart.txt +37 -35
- package/mcp-docs/mobile/components/Box.txt +18 -18
- package/mcp-docs/mobile/components/BrowserBar.txt +18 -18
- package/mcp-docs/mobile/components/Button.txt +19 -19
- package/mcp-docs/mobile/components/Carousel.txt +18 -18
- package/mcp-docs/mobile/components/CartesianChart.txt +75 -44
- package/mcp-docs/mobile/components/CheckboxCell.txt +19 -19
- package/mcp-docs/mobile/components/Chip.txt +20 -20
- package/mcp-docs/mobile/components/Coachmark.txt +18 -18
- package/mcp-docs/mobile/components/ContentCard.txt +18 -18
- package/mcp-docs/mobile/components/ContentCardBody.txt +18 -18
- package/mcp-docs/mobile/components/ContentCardFooter.txt +18 -18
- package/mcp-docs/mobile/components/ContentCardHeader.txt +18 -18
- package/mcp-docs/mobile/components/ContentCell.txt +18 -18
- package/mcp-docs/mobile/components/ControlGroup.txt +18 -18
- package/mcp-docs/mobile/components/DatePicker.txt +1 -1
- package/mcp-docs/mobile/components/Divider.txt +18 -18
- package/mcp-docs/mobile/components/DotCount.txt +1 -1
- package/mcp-docs/mobile/components/DotSymbol.txt +2 -2
- package/mcp-docs/mobile/components/Fallback.txt +18 -18
- package/mcp-docs/mobile/components/HStack.txt +18 -18
- package/mcp-docs/mobile/components/Icon.txt +6 -0
- package/mcp-docs/mobile/components/IconButton.txt +19 -19
- package/mcp-docs/mobile/components/InputChip.txt +20 -20
- package/mcp-docs/mobile/components/Interactable.txt +19 -19
- package/mcp-docs/mobile/components/LineChart.txt +1608 -898
- package/mcp-docs/mobile/components/Link.txt +18 -18
- package/mcp-docs/mobile/components/ListCell.txt +37 -19
- package/mcp-docs/mobile/components/Lottie.txt +18 -18
- package/mcp-docs/mobile/components/MediaChip.txt +20 -20
- package/mcp-docs/mobile/components/MultiContentModule.txt +18 -18
- package/mcp-docs/mobile/components/NavigationTitle.txt +18 -18
- package/mcp-docs/mobile/components/NavigationTitleSelect.txt +18 -18
- package/mcp-docs/mobile/components/Numpad.txt +18 -18
- package/mcp-docs/mobile/components/Overlay.txt +18 -18
- package/mcp-docs/mobile/components/PageFooter.txt +17 -17
- package/mcp-docs/mobile/components/PageHeader.txt +17 -17
- package/mcp-docs/mobile/components/PeriodSelector.txt +26 -26
- package/mcp-docs/mobile/components/Point.txt +203 -98
- package/mcp-docs/mobile/components/Pressable.txt +19 -19
- package/mcp-docs/mobile/components/ProgressBar.txt +1 -1
- package/mcp-docs/mobile/components/ProgressBarWithFixedLabels.txt +1 -1
- package/mcp-docs/mobile/components/ProgressBarWithFloatLabel.txt +1 -1
- package/mcp-docs/mobile/components/ProgressCircle.txt +1 -1
- package/mcp-docs/mobile/components/RadioCell.txt +19 -19
- package/mcp-docs/mobile/components/ReferenceLine.txt +197 -54
- package/mcp-docs/mobile/components/RollingNumber.txt +18 -18
- package/mcp-docs/mobile/components/Scrubber.txt +597 -79
- package/mcp-docs/mobile/components/SegmentedTabs.txt +18 -18
- package/mcp-docs/mobile/components/SelectAlpha.txt +1 -1
- package/mcp-docs/mobile/components/SelectChip.txt +20 -20
- package/mcp-docs/mobile/components/SlideButton.txt +19 -19
- package/mcp-docs/mobile/components/Spacer.txt +6 -6
- package/mcp-docs/mobile/components/SparklineInteractive.txt +3 -3
- package/mcp-docs/mobile/components/Spinner.txt +1 -1
- package/mcp-docs/mobile/components/Stepper.txt +18 -18
- package/mcp-docs/mobile/components/TabLabel.txt +18 -18
- package/mcp-docs/mobile/components/TabNavigation.txt +18 -18
- package/mcp-docs/mobile/components/TabbedChips.txt +18 -18
- package/mcp-docs/mobile/components/TabbedChipsAlpha.txt +1 -1
- package/mcp-docs/mobile/components/Tabs.txt +18 -18
- package/mcp-docs/mobile/components/Tag.txt +18 -18
- package/mcp-docs/mobile/components/Text.txt +18 -18
- package/mcp-docs/mobile/components/Toast.txt +18 -18
- package/mcp-docs/mobile/components/Tooltip.txt +17 -1
- package/mcp-docs/mobile/components/TopNavBar.txt +18 -18
- package/mcp-docs/mobile/components/VStack.txt +18 -18
- package/mcp-docs/mobile/components/XAxis.txt +86 -24
- package/mcp-docs/mobile/components/YAxis.txt +75 -17
- package/mcp-docs/mobile/routes.txt +1 -1
- package/mcp-docs/web/components/AreaChart.txt +523 -301
- package/mcp-docs/web/components/Avatar.txt +27 -27
- package/mcp-docs/web/components/AvatarButton.txt +28 -28
- package/mcp-docs/web/components/Banner.txt +71 -32
- package/mcp-docs/web/components/BarChart.txt +182 -313
- package/mcp-docs/web/components/Box.txt +28 -28
- package/mcp-docs/web/components/Button.txt +28 -28
- package/mcp-docs/web/components/Calendar.txt +27 -27
- package/mcp-docs/web/components/Carousel.txt +27 -27
- package/mcp-docs/web/components/CartesianChart.txt +62 -309
- package/mcp-docs/web/components/CheckboxCell.txt +25 -25
- package/mcp-docs/web/components/Chip.txt +27 -27
- package/mcp-docs/web/components/Coachmark.txt +27 -27
- package/mcp-docs/web/components/ContainedAssetCard.txt +27 -27
- package/mcp-docs/web/components/ContentCard.txt +28 -28
- package/mcp-docs/web/components/ContentCardBody.txt +28 -28
- package/mcp-docs/web/components/ContentCardFooter.txt +28 -28
- package/mcp-docs/web/components/ContentCardHeader.txt +28 -28
- package/mcp-docs/web/components/ContentCell.txt +28 -28
- package/mcp-docs/web/components/ControlGroup.txt +27 -27
- package/mcp-docs/web/components/Divider.txt +27 -27
- package/mcp-docs/web/components/Fallback.txt +28 -28
- package/mcp-docs/web/components/FloatingAssetCard.txt +27 -27
- package/mcp-docs/web/components/Grid.txt +28 -28
- package/mcp-docs/web/components/GridColumn.txt +27 -27
- package/mcp-docs/web/components/HStack.txt +28 -28
- package/mcp-docs/web/components/Icon.txt +27 -27
- package/mcp-docs/web/components/IconButton.txt +28 -28
- package/mcp-docs/web/components/InputChip.txt +27 -27
- package/mcp-docs/web/components/Interactable.txt +28 -28
- package/mcp-docs/web/components/LineChart.txt +1598 -1116
- package/mcp-docs/web/components/Link.txt +28 -28
- package/mcp-docs/web/components/ListCell.txt +48 -30
- package/mcp-docs/web/components/Lottie.txt +27 -27
- package/mcp-docs/web/components/MediaChip.txt +27 -27
- package/mcp-docs/web/components/Modal.txt +27 -27
- package/mcp-docs/web/components/ModalBody.txt +27 -27
- package/mcp-docs/web/components/ModalFooter.txt +27 -27
- package/mcp-docs/web/components/ModalHeader.txt +27 -27
- package/mcp-docs/web/components/MultiContentModule.txt +28 -28
- package/mcp-docs/web/components/NavigationBar.txt +5 -5
- package/mcp-docs/web/components/NudgeCard.txt +27 -27
- package/mcp-docs/web/components/Overlay.txt +27 -27
- package/mcp-docs/web/components/PageFooter.txt +26 -26
- package/mcp-docs/web/components/PageHeader.txt +26 -26
- package/mcp-docs/web/components/Pagination.txt +27 -27
- package/mcp-docs/web/components/PeriodSelector.txt +49 -49
- package/mcp-docs/web/components/Point.txt +228 -79
- package/mcp-docs/web/components/Pressable.txt +28 -28
- package/mcp-docs/web/components/RadioCell.txt +25 -25
- package/mcp-docs/web/components/ReferenceLine.txt +208 -60
- package/mcp-docs/web/components/RemoteImage.txt +26 -26
- package/mcp-docs/web/components/RollingNumber.txt +28 -28
- package/mcp-docs/web/components/Scrubber.txt +463 -68
- package/mcp-docs/web/components/SectionHeader.txt +27 -27
- package/mcp-docs/web/components/SegmentedTabs.txt +27 -27
- package/mcp-docs/web/components/SelectChip.txt +27 -27
- package/mcp-docs/web/components/SelectOption.txt +27 -27
- package/mcp-docs/web/components/Sidebar.txt +27 -27
- package/mcp-docs/web/components/SidebarItem.txt +27 -27
- package/mcp-docs/web/components/Spacer.txt +34 -34
- package/mcp-docs/web/components/SparklineInteractive.txt +1 -1
- package/mcp-docs/web/components/Spinner.txt +27 -27
- package/mcp-docs/web/components/Stepper.txt +27 -27
- package/mcp-docs/web/components/TabLabel.txt +27 -27
- package/mcp-docs/web/components/TabNavigation.txt +26 -26
- package/mcp-docs/web/components/TabbedChips.txt +26 -26
- package/mcp-docs/web/components/TabbedChipsAlpha.txt +1 -1
- package/mcp-docs/web/components/Tabs.txt +27 -27
- package/mcp-docs/web/components/Tag.txt +27 -27
- package/mcp-docs/web/components/Text.txt +28 -28
- package/mcp-docs/web/components/TileButton.txt +28 -28
- package/mcp-docs/web/components/Toast.txt +27 -27
- package/mcp-docs/web/components/Tooltip.txt +17 -1
- package/mcp-docs/web/components/VStack.txt +28 -28
- package/mcp-docs/web/components/XAxis.txt +86 -22
- package/mcp-docs/web/components/YAxis.txt +133 -89
- package/package.json +1 -1
|
@@ -10,33 +10,74 @@ import { Point } from '@coinbase/cds-web-visualization'
|
|
|
10
10
|
|
|
11
11
|
## Examples
|
|
12
12
|
|
|
13
|
-
###
|
|
13
|
+
### Basics
|
|
14
14
|
|
|
15
15
|
Points are visual markers that highlight specific data values on a chart. They can be used to emphasize important data points, show discrete values, or provide interactive elements.
|
|
16
16
|
|
|
17
|
+
You can add points using `points` on Line or [LineChart](/components/graphs/LineChart).
|
|
18
|
+
|
|
17
19
|
```jsx live
|
|
18
20
|
<LineChart
|
|
19
21
|
enableScrubbing
|
|
22
|
+
showArea
|
|
23
|
+
showYAxis
|
|
20
24
|
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
25
|
+
points
|
|
21
26
|
series={[
|
|
22
27
|
{
|
|
23
28
|
id: 'prices',
|
|
24
29
|
data: [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58],
|
|
25
30
|
},
|
|
26
31
|
]}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
xAxis={{
|
|
33
|
+
/* This prevents points close to the right edge from awkward cutoff when scrubbing */
|
|
34
|
+
range: ({ min, max }) => ({ min, max: max - 8 }),
|
|
35
|
+
}}
|
|
30
36
|
yAxis={{
|
|
31
37
|
showGrid: true,
|
|
32
38
|
}}
|
|
33
|
-
renderPoints={() => true}
|
|
34
39
|
>
|
|
35
40
|
<Scrubber />
|
|
36
41
|
</LineChart>
|
|
37
42
|
```
|
|
38
43
|
|
|
39
|
-
|
|
44
|
+
You can also add Points directly to a chart.
|
|
45
|
+
|
|
46
|
+
```jsx live
|
|
47
|
+
function MyChart() {
|
|
48
|
+
const prices = [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58];
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<CartesianChart
|
|
52
|
+
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
53
|
+
series={[
|
|
54
|
+
{
|
|
55
|
+
id: 'prices',
|
|
56
|
+
data: prices,
|
|
57
|
+
},
|
|
58
|
+
]}
|
|
59
|
+
inset={{
|
|
60
|
+
// Overriding the right offset gives us more space to place this
|
|
61
|
+
right: 32,
|
|
62
|
+
}}
|
|
63
|
+
>
|
|
64
|
+
<YAxis showGrid position="left" tickLabelFormatter={(value) => `$${value}`} />
|
|
65
|
+
{prices.map((price, index) => (
|
|
66
|
+
<Point
|
|
67
|
+
seriesId="prices"
|
|
68
|
+
key={index}
|
|
69
|
+
dataX={index}
|
|
70
|
+
dataY={price}
|
|
71
|
+
label={`$${price}`}
|
|
72
|
+
labelPosition="right"
|
|
73
|
+
/>
|
|
74
|
+
))}
|
|
75
|
+
</CartesianChart>
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
#### Conditional
|
|
40
81
|
|
|
41
82
|
You can conditionally render points to highlight specific values in your data, such as maximum/minimum values or outliers.
|
|
42
83
|
|
|
@@ -56,55 +97,44 @@ function AssetPriceWithMinMax() {
|
|
|
56
97
|
|
|
57
98
|
return (
|
|
58
99
|
<LineChart
|
|
59
|
-
series={[
|
|
60
|
-
{
|
|
61
|
-
id: 'btc',
|
|
62
|
-
data: data,
|
|
63
|
-
color: assets.btc.color,
|
|
64
|
-
},
|
|
65
|
-
]}
|
|
66
100
|
showArea
|
|
67
101
|
areaType="dotted"
|
|
68
102
|
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
69
|
-
|
|
70
|
-
renderPoints={({ dataX, dataY }) => {
|
|
103
|
+
points={({ dataX, dataY }: PointBaseProps) => {
|
|
71
104
|
const isMin = dataY === minPrice;
|
|
72
105
|
const isMax = dataY === maxPrice;
|
|
73
106
|
|
|
74
107
|
if (isMin) {
|
|
75
|
-
return { label: formatPrice(dataY),
|
|
108
|
+
return { label: formatPrice(dataY), labelPosition: 'bottom' };
|
|
76
109
|
}
|
|
77
110
|
|
|
78
111
|
if (isMax) {
|
|
79
|
-
return { label: formatPrice(dataY),
|
|
112
|
+
return { label: formatPrice(dataY), labelPosition: 'top' };
|
|
80
113
|
}
|
|
81
114
|
}}
|
|
115
|
+
series={[
|
|
116
|
+
{
|
|
117
|
+
id: 'btc',
|
|
118
|
+
data: data,
|
|
119
|
+
color: assets.btc.color,
|
|
120
|
+
},
|
|
121
|
+
]}
|
|
122
|
+
style={{ outlineColor: assets.btc.color }}
|
|
82
123
|
/>
|
|
83
124
|
);
|
|
84
125
|
};
|
|
85
126
|
```
|
|
86
127
|
|
|
87
|
-
###
|
|
128
|
+
### Interaction
|
|
88
129
|
|
|
89
130
|
Points can be made interactive by adding click handlers, allowing users to explore data in more detail.
|
|
90
131
|
|
|
91
132
|
```jsx live
|
|
92
133
|
<LineChart
|
|
93
|
-
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
94
|
-
series={[
|
|
95
|
-
{
|
|
96
|
-
id: 'sales',
|
|
97
|
-
data: [120, 132, 101, 134, 90, 230, 210, 120, 180, 190, 210, 176],
|
|
98
|
-
},
|
|
99
|
-
]}
|
|
100
|
-
curve="monotone"
|
|
101
|
-
showYAxis
|
|
102
134
|
showArea
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}}
|
|
107
|
-
renderPoints={({ dataX, dataY }) => {
|
|
135
|
+
showYAxis
|
|
136
|
+
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
137
|
+
points={({ dataX, dataY }) => {
|
|
108
138
|
const months = [
|
|
109
139
|
'Jan',
|
|
110
140
|
'Feb',
|
|
@@ -125,30 +155,29 @@ Points can be made interactive by adding click handlers, allowing users to explo
|
|
|
125
155
|
accessibilityLabel: `${months[dataX]} sales: ${dataY} units`,
|
|
126
156
|
};
|
|
127
157
|
}}
|
|
158
|
+
series={[
|
|
159
|
+
{
|
|
160
|
+
id: 'sales',
|
|
161
|
+
data: [120, 132, 101, 134, 90, 230, 210, 120, 180, 190, 210, 176],
|
|
162
|
+
},
|
|
163
|
+
]}
|
|
164
|
+
yAxis={{
|
|
165
|
+
showGrid: true,
|
|
166
|
+
label: 'Sales (units)',
|
|
167
|
+
}}
|
|
128
168
|
/>
|
|
129
169
|
```
|
|
130
170
|
|
|
131
|
-
###
|
|
171
|
+
### Styling
|
|
132
172
|
|
|
133
|
-
Points support
|
|
173
|
+
Points support customization through various properties including colors, sizes, and labels.
|
|
134
174
|
|
|
135
175
|
```jsx live
|
|
136
176
|
<LineChart
|
|
137
|
-
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
138
|
-
series={[
|
|
139
|
-
{
|
|
140
|
-
id: 'performance',
|
|
141
|
-
data: [65, 70, 72, 85, 88, 92, 78, 82, 90, 95, 91, 94],
|
|
142
|
-
},
|
|
143
|
-
]}
|
|
144
|
-
curve="monotone"
|
|
145
|
-
showYAxis
|
|
146
177
|
showArea
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}}
|
|
151
|
-
renderPoints={({ dataX, dataY }) => {
|
|
178
|
+
showYAxis
|
|
179
|
+
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
180
|
+
points={({ dataX, dataY }) => {
|
|
152
181
|
const isHighPerformance = dataY >= 90;
|
|
153
182
|
const isLowPerformance = dataY < 75;
|
|
154
183
|
|
|
@@ -162,35 +191,159 @@ Points support extensive customization through various properties including colo
|
|
|
162
191
|
strokeWidth: 2,
|
|
163
192
|
stroke: 'var(--color-bg)',
|
|
164
193
|
label: isHighPerformance || isLowPerformance ? `${dataY}%` : undefined,
|
|
165
|
-
|
|
166
|
-
verticalAlignment: isHighPerformance ? 'bottom' : 'top',
|
|
167
|
-
dy: isHighPerformance ? -10 : 10,
|
|
168
|
-
color: isHighPerformance
|
|
169
|
-
? 'var(--color-fgPositive)'
|
|
170
|
-
: isLowPerformance
|
|
171
|
-
? 'var(--color-fgNegative)'
|
|
172
|
-
: undefined,
|
|
173
|
-
},
|
|
194
|
+
labelPosition: isHighPerformance ? 'top' : 'bottom',
|
|
174
195
|
};
|
|
175
196
|
}}
|
|
197
|
+
series={[
|
|
198
|
+
{
|
|
199
|
+
id: 'performance',
|
|
200
|
+
data: [65, 70, 72, 85, 88, 92, 78, 82, 90, 95, 91, 94],
|
|
201
|
+
},
|
|
202
|
+
]}
|
|
203
|
+
xAxis={{
|
|
204
|
+
range: ({ min, max }) => ({ min, max: max - 8 }),
|
|
205
|
+
}}
|
|
206
|
+
yAxis={{
|
|
207
|
+
showGrid: true,
|
|
208
|
+
label: 'Performance Score',
|
|
209
|
+
}}
|
|
176
210
|
/>
|
|
177
211
|
```
|
|
178
212
|
|
|
213
|
+
#### Labels
|
|
214
|
+
|
|
215
|
+
You can use `labelPosition`, `labelOffset`, and `labelFont` to adjust Point's label.
|
|
216
|
+
|
|
217
|
+
```jsx live
|
|
218
|
+
function Scatterplot() {
|
|
219
|
+
const dataPoints = [
|
|
220
|
+
{ x: 20, y: 30, label: 'A' },
|
|
221
|
+
{ x: 40, y: 65, label: 'B' },
|
|
222
|
+
{ x: 60, y: 45, label: 'C' },
|
|
223
|
+
{ x: 75, y: 80, label: 'D' },
|
|
224
|
+
];
|
|
225
|
+
|
|
226
|
+
return (
|
|
227
|
+
<CartesianChart
|
|
228
|
+
height={250}
|
|
229
|
+
xAxis={{
|
|
230
|
+
domain: { min: 0, max: 100 },
|
|
231
|
+
}}
|
|
232
|
+
yAxis={{
|
|
233
|
+
domain: { min: 0, max: 100 },
|
|
234
|
+
}}
|
|
235
|
+
>
|
|
236
|
+
<XAxis showLine showTickMarks showGrid />
|
|
237
|
+
<YAxis position="left" showLine showTickMarks showGrid />
|
|
238
|
+
{dataPoints.map((point, index) => (
|
|
239
|
+
<Point
|
|
240
|
+
key={index}
|
|
241
|
+
dataX={point.x}
|
|
242
|
+
dataY={point.y}
|
|
243
|
+
label={point.label}
|
|
244
|
+
labelPosition="top"
|
|
245
|
+
labelOffset={6}
|
|
246
|
+
labelFont="title3"
|
|
247
|
+
/>
|
|
248
|
+
))}
|
|
249
|
+
</CartesianChart>
|
|
250
|
+
);
|
|
251
|
+
}
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
#### Custom Label Position
|
|
255
|
+
|
|
256
|
+
You can also use `LabelComponent` to create custom label components.
|
|
257
|
+
|
|
258
|
+
```jsx live
|
|
259
|
+
function ScatterplotWithCustomLabels() {
|
|
260
|
+
const dataPoints = [
|
|
261
|
+
{ x: 12, y: 34, label: 'A', color: 'var(--color-fgAccent)' },
|
|
262
|
+
{ x: 28, y: 67, label: 'B', color: 'var(--color-fgAccent)' },
|
|
263
|
+
{ x: 45, y: 23, label: 'C', color: 'var(--color-fgAccent)' },
|
|
264
|
+
{ x: 67, y: 89, label: 'D', color: 'var(--color-bgPositive)' },
|
|
265
|
+
{ x: 82, y: 76, label: 'E', color: 'var(--color-bgPositive)' },
|
|
266
|
+
{ x: 34, y: 91, label: 'F', color: 'var(--color-bgPositive)' },
|
|
267
|
+
{ x: 56, y: 45, label: 'G', color: 'var(--color-bgPositive)' },
|
|
268
|
+
{ x: 19, y: 12, label: 'H', color: 'var(--color-fgWarning)' },
|
|
269
|
+
{ x: 73, y: 28, label: 'I', color: 'var(--color-fgWarning)' },
|
|
270
|
+
{ x: 91, y: 54, label: 'J', color: 'var(--color-fgWarning)' },
|
|
271
|
+
{ x: 15, y: 58, label: 'K', color: 'var(--color-fgPrimary)' },
|
|
272
|
+
{ x: 39, y: 72, label: 'L', color: 'var(--color-fgPrimary)' },
|
|
273
|
+
{ x: 88, y: 15, label: 'M', color: 'var(--color-fgPrimary)' },
|
|
274
|
+
{ x: 52, y: 82, label: 'N', color: 'var(--color-fgPrimary)' },
|
|
275
|
+
];
|
|
276
|
+
|
|
277
|
+
// Calculate domain based on data
|
|
278
|
+
const xValues = dataPoints.map((p) => p.x);
|
|
279
|
+
const yValues = dataPoints.map((p) => p.y);
|
|
280
|
+
const xMin = Math.min(...xValues);
|
|
281
|
+
const xMax = Math.max(...xValues);
|
|
282
|
+
const yMin = Math.min(...yValues);
|
|
283
|
+
const yMax = Math.max(...yValues);
|
|
284
|
+
|
|
285
|
+
// Custom label component that places labels to the top-right
|
|
286
|
+
const TopRightPointLabel = ({ x, y, offset = 0, children }) => {
|
|
287
|
+
return (
|
|
288
|
+
<ChartText
|
|
289
|
+
horizontalAlignment="left"
|
|
290
|
+
verticalAlignment="bottom"
|
|
291
|
+
x={x + offset}
|
|
292
|
+
y={y - offset}
|
|
293
|
+
font="label1"
|
|
294
|
+
>
|
|
295
|
+
{children}
|
|
296
|
+
</ChartText>
|
|
297
|
+
);
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
return (
|
|
301
|
+
<CartesianChart
|
|
302
|
+
height={300}
|
|
303
|
+
xAxis={{
|
|
304
|
+
domain: { min: xMin, max: xMax },
|
|
305
|
+
domainLimit: 'nice',
|
|
306
|
+
}}
|
|
307
|
+
yAxis={{
|
|
308
|
+
domain: { min: yMin, max: yMax },
|
|
309
|
+
domainLimit: 'nice',
|
|
310
|
+
}}
|
|
311
|
+
>
|
|
312
|
+
<XAxis showLine showTickMarks showGrid />
|
|
313
|
+
<YAxis position="left" showLine showTickMarks showGrid />
|
|
314
|
+
{dataPoints.map((point, index) => (
|
|
315
|
+
<Point
|
|
316
|
+
key={index}
|
|
317
|
+
dataX={point.x}
|
|
318
|
+
dataY={point.y}
|
|
319
|
+
label={point.label}
|
|
320
|
+
labelOffset={8}
|
|
321
|
+
fill={point.color}
|
|
322
|
+
radius={5}
|
|
323
|
+
LabelComponent={TopRightPointLabel}
|
|
324
|
+
/>
|
|
325
|
+
))}
|
|
326
|
+
</CartesianChart>
|
|
327
|
+
);
|
|
328
|
+
}
|
|
329
|
+
```
|
|
330
|
+
|
|
179
331
|
## Props
|
|
180
332
|
|
|
181
333
|
| Prop | Type | Required | Default | Description |
|
|
182
334
|
| --- | --- | --- | --- | --- |
|
|
183
335
|
| `dataX` | `number` | Yes | `-` | X coordinate in data space (not pixel coordinates). |
|
|
184
336
|
| `dataY` | `number` | Yes | `-` | Y coordinate in data space (not pixel coordinates). |
|
|
337
|
+
| `LabelComponent` | `ComponentClass<PointLabelProps, any> \| FunctionComponent<PointLabelProps>` | No | `DefaultPointLabel` | Custom component to render the label. |
|
|
185
338
|
| `accentHeight` | `string \| number` | No | `-` | - |
|
|
186
339
|
| `accessibilityLabel` | `string` | No | `-` | Accessibility label for screen readers to describe the point. If not provided, a default label will be generated using the data coordinates. |
|
|
187
340
|
| `accumulate` | `none \| sum` | No | `-` | - |
|
|
188
|
-
| `additive` | `
|
|
189
|
-
| `alignmentBaseline` | `
|
|
190
|
-
| `allowReorder` | `
|
|
341
|
+
| `additive` | `replace \| sum` | No | `-` | - |
|
|
342
|
+
| `alignmentBaseline` | `inherit \| auto \| baseline \| middle \| after-edge \| alphabetic \| before-edge \| central \| hanging \| ideographic \| mathematical \| text-after-edge \| text-before-edge` | No | `-` | - |
|
|
343
|
+
| `allowReorder` | `yes \| no` | No | `-` | - |
|
|
191
344
|
| `alphabetic` | `string \| number` | No | `-` | - |
|
|
192
345
|
| `amplitude` | `string \| number` | No | `-` | - |
|
|
193
|
-
| `animate` | `boolean` | No | `-` |
|
|
346
|
+
| `animate` | `boolean` | No | `-` | When set, overrides the charts animation setting for this specific point. |
|
|
194
347
|
| `arabicForm` | `initial \| medial \| terminal \| isolated` | No | `-` | - |
|
|
195
348
|
| `ascent` | `string \| number` | No | `-` | - |
|
|
196
349
|
| `attributeName` | `string` | No | `-` | - |
|
|
@@ -207,22 +360,20 @@ Points support extensive customization through various properties including colo
|
|
|
207
360
|
| `calcMode` | `string \| number` | No | `-` | - |
|
|
208
361
|
| `capHeight` | `string \| number` | No | `-` | - |
|
|
209
362
|
| `className` | `string` | No | `-` | Custom class name for the point. |
|
|
210
|
-
| `classNames` | `{
|
|
363
|
+
| `classNames` | `{ root?: string; point?: string \| undefined; } \| undefined` | No | `-` | Custom class names for the component. |
|
|
211
364
|
| `clip` | `string \| number` | No | `-` | - |
|
|
212
365
|
| `clipPath` | `string` | No | `-` | - |
|
|
213
366
|
| `clipPathUnits` | `string \| number` | No | `-` | - |
|
|
214
367
|
| `clipRule` | `string \| number` | No | `-` | - |
|
|
215
368
|
| `color` | `string` | No | `-` | - |
|
|
216
369
|
| `colorInterpolation` | `string \| number` | No | `-` | - |
|
|
217
|
-
| `colorInterpolationFilters` | `inherit \| auto \|
|
|
370
|
+
| `colorInterpolationFilters` | `inherit \| auto \| linearRGB \| sRGB` | No | `-` | - |
|
|
218
371
|
| `colorProfile` | `string \| number` | No | `-` | - |
|
|
219
372
|
| `colorRendering` | `string \| number` | No | `-` | - |
|
|
220
373
|
| `contentScriptType` | `string \| number` | No | `-` | - |
|
|
221
374
|
| `contentStyleType` | `string \| number` | No | `-` | - |
|
|
222
375
|
| `crossOrigin` | ` \| anonymous \| use-credentials` | No | `-` | - |
|
|
223
376
|
| `cursor` | `string \| number` | No | `-` | - |
|
|
224
|
-
| `cx` | `string \| number` | No | `-` | - |
|
|
225
|
-
| `cy` | `string \| number` | No | `-` | - |
|
|
226
377
|
| `d` | `string` | No | `-` | - |
|
|
227
378
|
| `decelerate` | `string \| number` | No | `-` | - |
|
|
228
379
|
| `descent` | `string \| number` | No | `-` | - |
|
|
@@ -240,9 +391,9 @@ Points support extensive customization through various properties including colo
|
|
|
240
391
|
| `end` | `string \| number` | No | `-` | - |
|
|
241
392
|
| `exponent` | `string \| number` | No | `-` | - |
|
|
242
393
|
| `externalResourcesRequired` | `false \| true \| true \| false` | No | `-` | - |
|
|
243
|
-
| `fill` | `string` | No |
|
|
394
|
+
| `fill` | `string` | No | `'var(--color-fgPrimary)'` | The fill color of the point. |
|
|
244
395
|
| `fillOpacity` | `string \| number` | No | `-` | - |
|
|
245
|
-
| `fillRule` | `inherit \|
|
|
396
|
+
| `fillRule` | `inherit \| evenodd \| nonzero` | No | `-` | - |
|
|
246
397
|
| `filter` | `string` | No | `-` | - |
|
|
247
398
|
| `filterRes` | `string \| number` | No | `-` | - |
|
|
248
399
|
| `filterUnits` | `string \| number` | No | `-` | - |
|
|
@@ -292,8 +443,10 @@ Points support extensive customization through various properties including colo
|
|
|
292
443
|
| `keyPoints` | `string \| number` | No | `-` | - |
|
|
293
444
|
| `keySplines` | `string \| number` | No | `-` | - |
|
|
294
445
|
| `keyTimes` | `string \| number` | No | `-` | - |
|
|
295
|
-
| `label` | `
|
|
296
|
-
| `
|
|
446
|
+
| `label` | `string \| SkParagraph \| { value: string \| SkParagraph; }` | No | `-` | Simple text label to display at the point position. If provided, a label component will be automatically rendered. |
|
|
447
|
+
| `labelFont` | `ResponsiveProp<FontFamily \| inherit>` | No | `-` | Font style for the label text. |
|
|
448
|
+
| `labelOffset` | `number` | No | `2 * radius` | Distance in pixels to offset the label from the point. |
|
|
449
|
+
| `labelPosition` | `top \| bottom \| left \| right \| center` | No | `'center'` | Position of the label relative to the point. |
|
|
297
450
|
| `lang` | `string` | No | `-` | - |
|
|
298
451
|
| `lengthAdjust` | `string \| number` | No | `-` | - |
|
|
299
452
|
| `letterSpacing` | `string \| number` | No | `-` | - |
|
|
@@ -320,7 +473,6 @@ Points support extensive customization through various properties including colo
|
|
|
320
473
|
| `offset` | `string \| number` | No | `-` | - |
|
|
321
474
|
| `onChange` | `FormEventHandler<SVGCircleElement>` | No | `-` | - |
|
|
322
475
|
| `onClick` | `((event: MouseEvent<Element, MouseEvent>, point: { x: number; y: number; dataX: number; dataY: number; }) => void)` | No | `-` | Handler for when the point is clicked. |
|
|
323
|
-
| `onScrubberEnter` | `((point: { x: number; y: number; }) => void)` | No | `-` | Handler for when the scrubber enters this point. |
|
|
324
476
|
| `opacity` | `number` | No | `-` | Opacity of the point. |
|
|
325
477
|
| `operator` | `string \| number` | No | `-` | - |
|
|
326
478
|
| `order` | `string \| number` | No | `-` | - |
|
|
@@ -337,7 +489,6 @@ Points support extensive customization through various properties including colo
|
|
|
337
489
|
| `patternContentUnits` | `string` | No | `-` | - |
|
|
338
490
|
| `patternTransform` | `string \| number` | No | `-` | - |
|
|
339
491
|
| `patternUnits` | `string` | No | `-` | - |
|
|
340
|
-
| `pixelCoordinates` | `{ x: number; y: number; }` | No | `-` | Coordinates in SVG pixel space. Overrides dataX and dataY for pixel coordinate calculation. |
|
|
341
492
|
| `pointerEvents` | `string \| number` | No | `-` | - |
|
|
342
493
|
| `points` | `string` | No | `-` | - |
|
|
343
494
|
| `pointsAtX` | `string \| number` | No | `-` | - |
|
|
@@ -346,8 +497,7 @@ Points support extensive customization through various properties including colo
|
|
|
346
497
|
| `preserveAlpha` | `false \| true \| true \| false` | No | `-` | - |
|
|
347
498
|
| `preserveAspectRatio` | `string` | No | `-` | - |
|
|
348
499
|
| `primitiveUnits` | `string \| number` | No | `-` | - |
|
|
349
|
-
| `
|
|
350
|
-
| `radius` | `number` | No | `4` | Radius of the point. |
|
|
500
|
+
| `radius` | `number` | No | `5` | Radius of the point. |
|
|
351
501
|
| `ref` | `null \| string \| (instance: SVGCircleElement \| null) => void \| RefObject<SVGCircleElement>` | No | `-` | Allows getting a ref to the component instance. Once the component unmounts, React will set ref.current to null (or call the ref with null if you passed a callback ref). |
|
|
352
502
|
| `refX` | `string \| number` | No | `-` | - |
|
|
353
503
|
| `refY` | `string \| number` | No | `-` | - |
|
|
@@ -358,7 +508,6 @@ Points support extensive customization through various properties including colo
|
|
|
358
508
|
| `requiredFeatures` | `string \| number` | No | `-` | - |
|
|
359
509
|
| `restart` | `string \| number` | No | `-` | - |
|
|
360
510
|
| `result` | `string` | No | `-` | - |
|
|
361
|
-
| `role` | `grid \| article \| button \| dialog \| figure \| form \| img \| link \| main \| menu \| menuitem \| option \| search \| table \| switch \| string & {} \| none \| row \| alert \| alertdialog \| application \| banner \| cell \| checkbox \| columnheader \| combobox \| complementary \| contentinfo \| definition \| directory \| document \| feed \| gridcell \| group \| heading \| list \| listbox \| listitem \| log \| marquee \| math \| menubar \| menuitemcheckbox \| menuitemradio \| navigation \| note \| presentation \| progressbar \| radio \| radiogroup \| region \| rowgroup \| rowheader \| scrollbar \| searchbox \| separator \| slider \| spinbutton \| status \| tab \| tablist \| tabpanel \| term \| textbox \| timer \| toolbar \| tooltip \| tree \| treegrid \| treeitem` | No | `-` | - |
|
|
362
511
|
| `rotate` | `string \| number` | No | `-` | - |
|
|
363
512
|
| `rx` | `string \| number` | No | `-` | - |
|
|
364
513
|
| `ry` | `string \| number` | No | `-` | - |
|
|
@@ -384,17 +533,16 @@ Points support extensive customization through various properties including colo
|
|
|
384
533
|
| `stroke` | `string` | No | `'var(--color-bg)'` | Color of the outer stroke around the point. |
|
|
385
534
|
| `strokeDasharray` | `string \| number` | No | `-` | - |
|
|
386
535
|
| `strokeDashoffset` | `string \| number` | No | `-` | - |
|
|
387
|
-
| `strokeLinecap` | `inherit \|
|
|
388
|
-
| `strokeLinejoin` | `inherit \| round \|
|
|
536
|
+
| `strokeLinecap` | `inherit \| round \| butt \| square` | No | `-` | - |
|
|
537
|
+
| `strokeLinejoin` | `inherit \| round \| bevel \| miter` | No | `-` | - |
|
|
389
538
|
| `strokeMiterlimit` | `string \| number` | No | `-` | - |
|
|
390
539
|
| `strokeOpacity` | `string \| number` | No | `-` | - |
|
|
391
540
|
| `strokeWidth` | `number` | No | `2` | Outer stroke width of the point. Set to 0 to remove the stroke. |
|
|
392
541
|
| `style` | `CSSProperties` | No | `-` | Custom styles for the point. |
|
|
393
|
-
| `styles` | `{
|
|
542
|
+
| `styles` | `{ root?: CSSProperties; point?: CSSProperties \| undefined; } \| undefined` | No | `-` | Custom styles for the component. |
|
|
394
543
|
| `suppressHydrationWarning` | `boolean` | No | `-` | - |
|
|
395
544
|
| `surfaceScale` | `string \| number` | No | `-` | - |
|
|
396
545
|
| `systemLanguage` | `string \| number` | No | `-` | - |
|
|
397
|
-
| `tabIndex` | `number` | No | `-` | - |
|
|
398
546
|
| `tableValues` | `string \| number` | No | `-` | - |
|
|
399
547
|
| `target` | `string` | No | `-` | - |
|
|
400
548
|
| `targetX` | `string \| number` | No | `-` | - |
|
|
@@ -406,6 +554,7 @@ Points support extensive customization through various properties including colo
|
|
|
406
554
|
| `textRendering` | `string \| number` | No | `-` | - |
|
|
407
555
|
| `to` | `string \| number` | No | `-` | - |
|
|
408
556
|
| `transform` | `string` | No | `-` | - |
|
|
557
|
+
| `transition` | `Orchestration & Repeat & Tween \| Orchestration & Repeat & Spring \| Orchestration & Repeat & Keyframes \| Orchestration & Repeat & Inertia \| Orchestration & Repeat & Just \| Orchestration & Repeat & None \| Orchestration & Repeat & PermissiveTransitionDefinition \| Orchestration & Repeat & Tween & { [key: string]: TransitionDefinition; } \| Orchestration & Repeat & Spring & { [key: string]: TransitionDefinition; } \| Orchestration & Repeat & Keyframes & { [key: string]: TransitionDefinition; } \| Orchestration & Repeat & Inertia & { [key: string]: TransitionDefinition; } \| Orchestration & Repeat & Just & { [key: string]: TransitionDefinition; } \| Orchestration & Repeat & None & { [key: string]: TransitionDefinition; } \| Orchestration & Repeat & PermissiveTransitionDefinition & { [key: string]: TransitionDefinition; }` | No | `defaultTransition` | Transition configuration for animation. |
|
|
409
558
|
| `type` | `string` | No | `-` | - |
|
|
410
559
|
| `u1` | `string \| number` | No | `-` | - |
|
|
411
560
|
| `u2` | `string \| number` | No | `-` | - |
|
|
@@ -452,7 +601,7 @@ Points support extensive customization through various properties including colo
|
|
|
452
601
|
| `y` | `string \| number` | No | `-` | - |
|
|
453
602
|
| `y1` | `string \| number` | No | `-` | - |
|
|
454
603
|
| `y2` | `string \| number` | No | `-` | - |
|
|
455
|
-
| `yAxisId` | `string` | No |
|
|
604
|
+
| `yAxisId` | `string` | No | `first y-axis defined in chart props.` | Optional Y-axis id to specify which axis to plot along. |
|
|
456
605
|
| `yChannelSelector` | `string` | No | `-` | - |
|
|
457
606
|
| `z` | `string \| number` | No | `-` | - |
|
|
458
607
|
| `zoomAndPan` | `string` | No | `-` | - |
|
|
@@ -87,8 +87,8 @@ On web, all [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Acces
|
|
|
87
87
|
| `alignContent` | `ResponsiveProp<center \| normal \| start \| end \| flex-start \| flex-end \| stretch \| baseline \| first baseline \| last baseline \| space-between \| space-around \| space-evenly>` | No | `-` | - |
|
|
88
88
|
| `alignItems` | `ResponsiveProp<center \| normal \| start \| end \| flex-start \| flex-end \| self-start \| self-end \| stretch \| baseline \| first baseline \| last baseline>` | No | `-` | - |
|
|
89
89
|
| `alignSelf` | `ResponsiveProp<center \| normal \| auto \| start \| end \| flex-start \| flex-end \| self-start \| self-end \| stretch \| baseline \| first baseline \| last baseline>` | No | `-` | - |
|
|
90
|
-
| `as` | `symbol \| object \| style \|
|
|
91
|
-
| `aspectRatio` |
|
|
90
|
+
| `as` | `symbol \| object \| style \| div \| a \| abbr \| address \| area \| article \| aside \| audio \| b \| base \| bdi \| bdo \| big \| blockquote \| body \| br \| button \| canvas \| caption \| center \| cite \| code \| col \| colgroup \| data \| datalist \| dd \| del \| details \| dfn \| dialog \| dl \| dt \| em \| embed \| fieldset \| figcaption \| figure \| footer \| form \| h1 \| h2 \| h3 \| h4 \| h5 \| h6 \| head \| header \| hgroup \| hr \| html \| i \| iframe \| img \| input \| ins \| kbd \| keygen \| label \| legend \| li \| link \| main \| map \| mark \| menu \| menuitem \| meta \| meter \| nav \| noindex \| noscript \| ol \| optgroup \| option \| output \| p \| param \| picture \| pre \| progress \| q \| rp \| rt \| ruby \| s \| samp \| search \| slot \| script \| section \| select \| small \| source \| span \| strong \| sub \| summary \| sup \| table \| template \| tbody \| td \| textarea \| tfoot \| th \| thead \| time \| title \| tr \| track \| u \| ul \| var \| video \| wbr \| webview \| svg \| animate \| animateMotion \| animateTransform \| circle \| clipPath \| defs \| desc \| ellipse \| feBlend \| feColorMatrix \| feComponentTransfer \| feComposite \| feConvolveMatrix \| feDiffuseLighting \| feDisplacementMap \| feDistantLight \| feDropShadow \| feFlood \| feFuncA \| feFuncB \| feFuncG \| feFuncR \| feGaussianBlur \| feImage \| feMerge \| feMergeNode \| feMorphology \| feOffset \| fePointLight \| feSpecularLighting \| feSpotLight \| feTile \| feTurbulence \| filter \| foreignObject \| g \| image \| line \| linearGradient \| marker \| mask \| metadata \| mpath \| path \| pattern \| polygon \| polyline \| radialGradient \| rect \| set \| stop \| switch \| text \| textPath \| tspan \| use \| view \| ComponentClass<any, any> \| FunctionComponent<any>` | No | `-` | - |
|
|
91
|
+
| `aspectRatio` | `inherit \| auto \| revert \| -moz-initial \| initial \| revert-layer \| unset` | No | `-` | - |
|
|
92
92
|
| `background` | `currentColor \| fg \| fgMuted \| fgInverse \| fgPrimary \| fgWarning \| fgPositive \| fgNegative \| bg \| bgAlternate \| bgInverse \| bgOverlay \| bgElevation1 \| bgElevation2 \| bgPrimary \| bgPrimaryWash \| bgSecondary \| bgTertiary \| bgSecondaryWash \| bgNegative \| bgNegativeWash \| bgPositive \| bgPositiveWash \| bgWarning \| bgWarningWash \| bgLine \| bgLineHeavy \| bgLineInverse \| bgLinePrimary \| bgLinePrimarySubtle \| accentSubtleRed \| accentBoldRed \| accentSubtleGreen \| accentBoldGreen \| accentSubtleBlue \| accentBoldBlue \| accentSubtlePurple \| accentBoldPurple \| accentSubtleYellow \| accentBoldYellow \| accentSubtleGray \| accentBoldGray \| transparent` | No | `-` | Background color of the overlay (element being interacted with). |
|
|
93
93
|
| `blendStyles` | `InteractableBlendStyles` | No | `-` | - |
|
|
94
94
|
| `block` | `boolean` | No | `-` | Set element to block and expand to 100% width. |
|
|
@@ -113,35 +113,35 @@ On web, all [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Acces
|
|
|
113
113
|
| `bottom` | `ResponsiveProp<Bottom<string \| number>>` | No | `-` | - |
|
|
114
114
|
| `className` | `string` | No | `-` | Apply class names to the outer container. |
|
|
115
115
|
| `color` | `currentColor \| fg \| fgMuted \| fgInverse \| fgPrimary \| fgWarning \| fgPositive \| fgNegative \| bg \| bgAlternate \| bgInverse \| bgOverlay \| bgElevation1 \| bgElevation2 \| bgPrimary \| bgPrimaryWash \| bgSecondary \| bgTertiary \| bgSecondaryWash \| bgNegative \| bgNegativeWash \| bgPositive \| bgPositiveWash \| bgWarning \| bgWarningWash \| bgLine \| bgLineHeavy \| bgLineInverse \| bgLinePrimary \| bgLinePrimarySubtle \| accentSubtleRed \| accentBoldRed \| accentSubtleGreen \| accentBoldGreen \| accentSubtleBlue \| accentBoldBlue \| accentSubtlePurple \| accentBoldPurple \| accentSubtleYellow \| accentBoldYellow \| accentSubtleGray \| accentBoldGray \| transparent` | No | `-` | - |
|
|
116
|
-
| `columnGap` | `0 \|
|
|
116
|
+
| `columnGap` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
|
|
117
117
|
| `dangerouslySetBackground` | `string` | No | `-` | - |
|
|
118
118
|
| `disabled` | `boolean` | No | `-` | Is the element currently disabled. |
|
|
119
119
|
| `display` | `ResponsiveProp<grid \| revert \| none \| block \| inline \| inline-block \| flex \| inline-flex \| inline-grid \| contents \| flow-root \| list-item>` | No | `-` | - |
|
|
120
120
|
| `elevation` | `0 \| 1 \| 2` | No | `-` | - |
|
|
121
121
|
| `flexBasis` | `ResponsiveProp<FlexBasis<string \| number>>` | No | `-` | - |
|
|
122
122
|
| `flexDirection` | `ResponsiveProp<column \| row \| row-reverse \| column-reverse>` | No | `-` | - |
|
|
123
|
-
| `flexGrow` |
|
|
124
|
-
| `flexShrink` |
|
|
123
|
+
| `flexGrow` | `inherit \| revert \| -moz-initial \| initial \| revert-layer \| unset` | No | `-` | - |
|
|
124
|
+
| `flexShrink` | `inherit \| revert \| -moz-initial \| initial \| revert-layer \| unset` | No | `-` | - |
|
|
125
125
|
| `flexWrap` | `ResponsiveProp<nowrap \| wrap \| wrap-reverse>` | No | `-` | - |
|
|
126
126
|
| `focusable` | `boolean` | No | `-` | - |
|
|
127
127
|
| `font` | `ResponsiveProp<FontFamily \| inherit>` | No | `-` | - |
|
|
128
128
|
| `fontFamily` | `ResponsiveProp<FontFamily \| inherit>` | No | `-` | - |
|
|
129
129
|
| `fontSize` | `ResponsiveProp<FontSize \| inherit>` | No | `-` | - |
|
|
130
130
|
| `fontWeight` | `ResponsiveProp<FontWeight \| inherit>` | No | `-` | - |
|
|
131
|
-
| `gap` | `0 \|
|
|
132
|
-
| `grid` |
|
|
133
|
-
| `gridArea` |
|
|
131
|
+
| `gap` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
|
|
132
|
+
| `grid` | `inherit \| none \| revert \| -moz-initial \| initial \| revert-layer \| unset` | No | `-` | - |
|
|
133
|
+
| `gridArea` | `inherit \| auto \| revert \| -moz-initial \| initial \| revert-layer \| unset` | No | `-` | - |
|
|
134
134
|
| `gridAutoColumns` | `ResponsiveProp<GridAutoColumns<string \| number>>` | No | `-` | - |
|
|
135
|
-
| `gridAutoFlow` |
|
|
135
|
+
| `gridAutoFlow` | `inherit \| revert \| row \| column \| -moz-initial \| initial \| revert-layer \| unset \| dense` | No | `-` | - |
|
|
136
136
|
| `gridAutoRows` | `ResponsiveProp<GridAutoRows<string \| number>>` | No | `-` | - |
|
|
137
|
-
| `gridColumn` |
|
|
138
|
-
| `gridColumnEnd` |
|
|
139
|
-
| `gridColumnStart` |
|
|
140
|
-
| `gridRow` |
|
|
141
|
-
| `gridRowEnd` |
|
|
142
|
-
| `gridRowStart` |
|
|
143
|
-
| `gridTemplate` |
|
|
144
|
-
| `gridTemplateAreas` |
|
|
137
|
+
| `gridColumn` | `inherit \| auto \| revert \| -moz-initial \| initial \| revert-layer \| unset` | No | `-` | - |
|
|
138
|
+
| `gridColumnEnd` | `inherit \| auto \| revert \| -moz-initial \| initial \| revert-layer \| unset` | No | `-` | - |
|
|
139
|
+
| `gridColumnStart` | `inherit \| auto \| revert \| -moz-initial \| initial \| revert-layer \| unset` | No | `-` | - |
|
|
140
|
+
| `gridRow` | `inherit \| auto \| revert \| -moz-initial \| initial \| revert-layer \| unset` | No | `-` | - |
|
|
141
|
+
| `gridRowEnd` | `inherit \| auto \| revert \| -moz-initial \| initial \| revert-layer \| unset` | No | `-` | - |
|
|
142
|
+
| `gridRowStart` | `inherit \| auto \| revert \| -moz-initial \| initial \| revert-layer \| unset` | No | `-` | - |
|
|
143
|
+
| `gridTemplate` | `inherit \| none \| revert \| -moz-initial \| initial \| revert-layer \| unset` | No | `-` | - |
|
|
144
|
+
| `gridTemplateAreas` | `inherit \| none \| revert \| -moz-initial \| initial \| revert-layer \| unset` | No | `-` | - |
|
|
145
145
|
| `gridTemplateColumns` | `ResponsiveProp<GridTemplateColumns<string \| number>>` | No | `-` | - |
|
|
146
146
|
| `gridTemplateRows` | `ResponsiveProp<GridTemplateRows<string \| number>>` | No | `-` | - |
|
|
147
147
|
| `height` | `ResponsiveProp<Height<string \| number>>` | No | `-` | - |
|
|
@@ -161,33 +161,33 @@ On web, all [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Acces
|
|
|
161
161
|
| `minHeight` | `ResponsiveProp<MinHeight<string \| number>>` | No | `-` | - |
|
|
162
162
|
| `minWidth` | `ResponsiveProp<MinWidth<string \| number>>` | No | `-` | - |
|
|
163
163
|
| `noScaleOnPress` | `boolean` | No | `-` | Dont scale element on press. |
|
|
164
|
-
| `opacity` |
|
|
164
|
+
| `opacity` | `inherit \| revert \| -moz-initial \| initial \| revert-layer \| unset` | No | `-` | - |
|
|
165
165
|
| `overflow` | `ResponsiveProp<hidden \| auto \| visible \| clip \| scroll>` | No | `-` | - |
|
|
166
|
-
| `padding` | `0 \|
|
|
167
|
-
| `paddingBottom` | `0 \|
|
|
168
|
-
| `paddingEnd` | `0 \|
|
|
169
|
-
| `paddingStart` | `0 \|
|
|
170
|
-
| `paddingTop` | `0 \|
|
|
171
|
-
| `paddingX` | `0 \|
|
|
172
|
-
| `paddingY` | `0 \|
|
|
166
|
+
| `padding` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `0` | - |
|
|
167
|
+
| `paddingBottom` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
|
|
168
|
+
| `paddingEnd` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
|
|
169
|
+
| `paddingStart` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
|
|
170
|
+
| `paddingTop` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
|
|
171
|
+
| `paddingX` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
|
|
172
|
+
| `paddingY` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
|
|
173
173
|
| `pin` | `top \| bottom \| left \| right \| all` | No | `-` | Direction in which to absolutely pin the box. |
|
|
174
174
|
| `position` | `ResponsiveProp<fixed \| static \| relative \| absolute \| sticky>` | No | `-` | - |
|
|
175
175
|
| `pressed` | `boolean` | No | `-` | Is the element being pressed. Primarily a mobile feature, but can be used on the web. |
|
|
176
176
|
| `ref` | `any` | No | `-` | - |
|
|
177
177
|
| `right` | `ResponsiveProp<Right<string \| number>>` | No | `-` | - |
|
|
178
|
-
| `rowGap` | `0 \|
|
|
178
|
+
| `rowGap` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
|
|
179
179
|
| `style` | `CSSProperties` | No | `-` | - |
|
|
180
180
|
| `testID` | `string` | No | `-` | Used to locate this element in unit and end-to-end tests. Under the hood, testID translates to data-testid on Web. On Mobile, testID stays the same - testID |
|
|
181
181
|
| `textAlign` | `ResponsiveProp<center \| start \| end \| justify>` | No | `-` | - |
|
|
182
182
|
| `textDecoration` | `ResponsiveProp<none \| underline \| overline \| line-through \| underline overline \| underline double>` | No | `-` | - |
|
|
183
183
|
| `textTransform` | `ResponsiveProp<capitalize \| lowercase \| none \| uppercase>` | No | `-` | - |
|
|
184
184
|
| `top` | `ResponsiveProp<Top<string \| number>>` | No | `-` | - |
|
|
185
|
-
| `transform` |
|
|
185
|
+
| `transform` | `inherit \| none \| revert \| -moz-initial \| initial \| revert-layer \| unset` | No | `-` | - |
|
|
186
186
|
| `transparentWhileInactive` | `boolean` | No | `-` | Mark the background and border as transparent until the element is interacted with (hovered, pressed, etc). Must be used in conjunction with the pressed prop |
|
|
187
187
|
| `transparentWhilePressed` | `boolean` | No | `-` | Mark the background and border as transparent even while element is interacted with (elevation underlay issue). Must be used in conjunction with the pressed prop |
|
|
188
188
|
| `userSelect` | `ResponsiveProp<text \| none \| auto \| all>` | No | `-` | - |
|
|
189
189
|
| `visibility` | `ResponsiveProp<hidden \| visible>` | No | `-` | - |
|
|
190
190
|
| `width` | `ResponsiveProp<Width<string \| number>>` | No | `-` | - |
|
|
191
|
-
| `zIndex` |
|
|
191
|
+
| `zIndex` | `inherit \| auto \| revert \| -moz-initial \| initial \| revert-layer \| unset` | No | `-` | - |
|
|
192
192
|
|
|
193
193
|
|