@czi-sds/mcp 0.5.2 → 0.5.4

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.
Files changed (42) hide show
  1. package/data/component-list.json +1 -0
  2. package/data/component-props/NavigationHeader.json +4 -0
  3. package/data/tailwind.json +25 -25
  4. package/data/zeroheight-cache.json +5065 -1
  5. package/data/zeroheight-exports/Accordion.md +79 -22
  6. package/data/zeroheight-exports/Banner.md +102 -10
  7. package/data/zeroheight-exports/Buttons.md +1010 -1461
  8. package/data/zeroheight-exports/Callout.md +164 -11
  9. package/data/zeroheight-exports/Colors.md +1164 -41
  10. package/data/zeroheight-exports/Content-Card.md +148 -0
  11. package/data/zeroheight-exports/Control-Inputs.md +769 -72
  12. package/data/zeroheight-exports/Corners.md +8 -15
  13. package/data/zeroheight-exports/Dialog.md +190 -14
  14. package/data/zeroheight-exports/Downloads.md +116 -0
  15. package/data/zeroheight-exports/Dropdown-Input.md +612 -16
  16. package/data/zeroheight-exports/Dropdown-Menus.md +935 -0
  17. package/data/zeroheight-exports/Field-Inputs.md +430 -9
  18. package/data/zeroheight-exports/Filters.md +232 -9
  19. package/data/zeroheight-exports/Getting-Started.md +7 -9
  20. package/data/zeroheight-exports/Hero.md +152 -0
  21. package/data/zeroheight-exports/Icons.md +1854 -218
  22. package/data/zeroheight-exports/Intent.md +40 -0
  23. package/data/zeroheight-exports/Link.md +52 -6
  24. package/data/zeroheight-exports/Lists.md +360 -6
  25. package/data/zeroheight-exports/Loading-Indicator.md +6 -2
  26. package/data/zeroheight-exports/Navigation.md +324 -8
  27. package/data/zeroheight-exports/Notification.md +166 -16
  28. package/data/zeroheight-exports/Panel.md +68 -16
  29. package/data/zeroheight-exports/README.md +17 -19
  30. package/data/zeroheight-exports/Responsive-Design.md +52 -0
  31. package/data/zeroheight-exports/Search-Input.md +40 -2
  32. package/data/zeroheight-exports/Search.md +232 -2
  33. package/data/zeroheight-exports/Segmented-Control.md +34 -9
  34. package/data/zeroheight-exports/Table.md +452 -51
  35. package/data/zeroheight-exports/Tabs.md +534 -11
  36. package/data/zeroheight-exports/Tags.md +504 -14
  37. package/data/zeroheight-exports/Text-Link.md +90 -6
  38. package/data/zeroheight-exports/Theming.md +36 -6
  39. package/data/zeroheight-exports/Tooltips.md +453 -18
  40. package/data/zeroheight-exports/Typography.md +64 -32
  41. package/package.json +3 -3
  42. package/data/zeroheight-exports/Dropdown-Menu.md +0 -3883
@@ -13,6 +13,18 @@ Buttons are one of the primary ways users interact with and provide input to the
13
13
 
14
14
  Use the links below to jump to information on a specific Button variant:
15
15
 
16
+ **Button**
17
+
18
+ ---
19
+
20
+ **Button**
21
+
22
+ ---
23
+
24
+ **ButtonIcon**
25
+
26
+ ---
27
+
16
28
  ---
17
29
 
18
30
  ## Square Button
@@ -29,6 +41,22 @@ Click on each state below to enter inspect view and get details on its code attr
29
41
  | **Default** | **Hover** | **Pressed** | **Disabled** |
30
42
  | ----------- | --------- | ----------- | ------------ |
31
43
 
44
+ **Button**
45
+
46
+ ---
47
+
48
+ **Button**
49
+
50
+ ---
51
+
52
+ **Button**
53
+
54
+ ---
55
+
56
+ **Button**
57
+
58
+ ---
59
+
32
60
  ### Small Primary Square Button
33
61
 
34
62
  Use for actions that are lower importance or don't require as much emphasis on the page such as actions taken in the page footer.
@@ -38,6 +66,22 @@ Click on each state below to enter inspect view and get details on its code attr
38
66
  | **Default** | **Hover** | **Pressed** | **Disabled** |
39
67
  | ----------- | --------- | ----------- | ------------ |
40
68
 
69
+ **Button**
70
+
71
+ ---
72
+
73
+ **Button**
74
+
75
+ ---
76
+
77
+ **Button**
78
+
79
+ ---
80
+
81
+ **Button**
82
+
83
+ ---
84
+
41
85
  ### Secondary Square Button
42
86
 
43
87
  Use for a secondary action, or deemphasized Button. Often paired with primary Button.
@@ -49,12 +93,32 @@ Click on each state below to enter inspect view and get details on its code attr
49
93
  | **Default** | **Hover** | **Pressed** | **Disabled** |
50
94
  | ----------- | --------- | ----------- | ------------ |
51
95
 
96
+ **Button**
97
+
98
+ ---
99
+
100
+ **Button**
101
+
102
+ ---
103
+
104
+ **Button**
105
+
106
+ ---
107
+
108
+ **Button**
109
+
110
+ ---
111
+
52
112
  ---
53
113
 
54
114
  ### Square Button Spacing
55
115
 
56
116
  These rules establish how much margin should exist between and around elements.
57
117
 
118
+ **Square Button spacing**
119
+
120
+ ---
121
+
58
122
  ---
59
123
 
60
124
  ## Copy Button
@@ -69,13 +133,31 @@ Click on each state below to enter inspect view and get details on its code attr
69
133
  | **Default** | **Hover** | **Pressed** | **Disabled** |
70
134
  | ----------- | --------- | ----------- | ------------ |
71
135
 
136
+ **Button**
137
+
138
+ ---
139
+
140
+ **Button**
141
+
142
+ ---
143
+
144
+ **Button**
145
+
146
+ ---
147
+
148
+ **Button**
149
+
150
+ ---
151
+
72
152
  ---
73
153
 
74
154
  ### Copy Button Spacing
75
155
 
76
156
  These rules establish how much margin should exist between and around elements.
77
157
 
158
+ **Copy Button spacing**
78
159
 
160
+ ---
79
161
 
80
162
  ---
81
163
 
@@ -95,6 +177,18 @@ Click on each state below to enter inspect view and get details on its code attr
95
177
  | **Default** | **Hover** | **Pressed** |
96
178
  | ----------- | --------- | ----------- |
97
179
 
180
+ **ButtonIcon**
181
+
182
+ ---
183
+
184
+ **ButtonIcon**
185
+
186
+ ---
187
+
188
+ **ButtonIcon**
189
+
190
+ ---
191
+
98
192
  ### Medium Icon Button
99
193
 
100
194
  The Icon Button should be used for lowest level actions that are not a part of the user's main workflow, such as closing a Dialog or expanding an Accordion (documentation coming soon).
@@ -106,6 +200,18 @@ Click on each state below to enter inspect view and get details on its code attr
106
200
  | **Default** | **Hover** | **Pressed** |
107
201
  | ----------- | --------- | ----------- |
108
202
 
203
+ **ButtonIcon**
204
+
205
+ ---
206
+
207
+ **ButtonIcon**
208
+
209
+ ---
210
+
211
+ **ButtonIcon**
212
+
213
+ ---
214
+
109
215
  ### Small Icon Button
110
216
 
111
217
  The Icon Button should be used for lowest level actions that are not a part of the user's main workflow, such as closing a Dialog or expanding an Accordion (documentation coming soon).
@@ -117,13 +223,27 @@ Click on each state below to enter inspect view and get details on its code attr
117
223
  | **Default** | **Hover** | **Pressed** |
118
224
  | ----------- | --------- | ----------- |
119
225
 
226
+ **ButtonIcon**
227
+
228
+ ---
229
+
230
+ **ButtonIcon**
231
+
232
+ ---
233
+
234
+ **ButtonIcon**
235
+
236
+ ---
237
+
120
238
  ---
121
239
 
122
240
  ### Icon Button Spacing
123
241
 
124
242
  These rules establish how much margin should exist between and around elements.
125
243
 
244
+ **Icon Button spacing**
126
245
 
246
+ ---
127
247
 
128
248
  ## Code
129
249
 
@@ -161,6 +281,30 @@ Buttons are one of the primary ways users interact with and provide input to the
161
281
 
162
282
  Use the links below to jump to information on a specific Button variant:
163
283
 
284
+ **Button**
285
+
286
+ ---
287
+
288
+ **Button**
289
+
290
+ ---
291
+
292
+ **Button**
293
+
294
+ ---
295
+
296
+ **ButtonIcon**
297
+
298
+ ---
299
+
300
+ **ButtonDropdown**
301
+
302
+ ---
303
+
304
+ **ButtonDropdown**
305
+
306
+ ---
307
+
164
308
  ---
165
309
 
166
310
  ## Rounded Button
@@ -179,12 +323,40 @@ Click on each state below to enter inspect view and get details on its code attr
179
323
  | **Default** | **Hover** | **Pressed** | **Disabled** |
180
324
  | ----------- | --------- | ----------- | ------------ |
181
325
 
326
+ **Button**
327
+
328
+ ---
329
+
330
+ **Button**
331
+
332
+ ---
333
+
334
+ **Button**
335
+
336
+ ---
337
+
338
+ **Button**
339
+
340
+ ---
341
+
182
342
  | **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
183
343
  | ------------------ | --------- | ----------- | ------------ |
184
344
 
345
+ **Button**
346
+
347
+ ---
348
+
349
+ **Button**
350
+
351
+ ---
185
352
 
353
+ **Button**
186
354
 
355
+ ---
356
+
357
+ **Button**
187
358
 
359
+ ---
188
360
 
189
361
  ### Secondary Rounded Button
190
362
 
@@ -197,41 +369,44 @@ Click on each state below to enter inspect view and get details on its code attr
197
369
  | **Default** | **Hover** | **Pressed** | **Disabled** |
198
370
  | ----------- | --------- | ----------- | ------------ |
199
371
 
200
- | **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
201
- | ------------------ | --------- | ----------- | ------------ |
372
+ **Button**
202
373
 
374
+ ---
203
375
 
376
+ **Button**
204
377
 
205
- ### Error Rounded Button
378
+ ---
206
379
 
207
- Use the error Button when the outcome of the user clicking the button will result in something being removed or deleted.
380
+ **Button**
208
381
 
209
- Include an icon when needing to provide additional context to users of what action the Button has.
382
+ ---
210
383
 
211
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
384
+ **Button**
212
385
 
213
- | **Default** | **Hover** | **Pressed** | **Disabled** |
214
- | ----------- | --------- | ----------- | ------------ |
386
+ ---
215
387
 
216
388
  | **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
217
389
  | ------------------ | --------- | ----------- | ------------ |
218
390
 
391
+ **Button**
392
+
219
393
  ---
220
394
 
221
- ### Rounded Button Spacing
395
+ **Button**
222
396
 
223
- These rules establish how much margin should exist between and around elements.
397
+ ---
398
+
399
+ **Button**
224
400
 
225
401
  ---
226
402
 
227
- ## Square Button
403
+ **Button**
228
404
 
229
- | | In Figma | | | Meets Accessibility | | | In CZ GEN EPI Codebase |
230
- | --- | -------- | --- | --- | ------------------- | --- | --- | ---------------------- |
405
+ ---
231
406
 
232
- ### Primary Square Button
407
+ ### Error Rounded Button
233
408
 
234
- Used to complete primary actions within Forms and Dropdown Menus; paired with Text Inputs.
409
+ Use the error Button when the outcome of the user clicking the button will result in something being removed or deleted.
235
410
 
236
411
  Include an icon when needing to provide additional context to users of what action the Button has.
237
412
 
@@ -240,55 +415,61 @@ Click on each state below to enter inspect view and get details on its code attr
240
415
  | **Default** | **Hover** | **Pressed** | **Disabled** |
241
416
  | ----------- | --------- | ----------- | ------------ |
242
417
 
243
- | **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
244
- | ------------------ | --------- | ----------- | ------------ |
418
+ **Button**
245
419
 
246
- ### Secondary Square Button
420
+ ---
247
421
 
248
- Used to complete secondary actions within Forms and Dropdown Menus; paired with Text Inputs.
422
+ **Button**
249
423
 
250
- Include an icon when needing to provide additional context to users of what action the Button has.
424
+ ---
251
425
 
252
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
426
+ **Button**
253
427
 
254
- | **Default** | **Hover** | **Pressed** | **Disabled** |
255
- | ----------- | --------- | ----------- | ------------ |
428
+ ---
429
+
430
+ **Button**
431
+
432
+ ---
256
433
 
257
434
  | **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
258
435
  | ------------------ | --------- | ----------- | ------------ |
259
436
 
260
- ### Error Square Button
437
+ **Button**
261
438
 
262
- Use the error Button when the outcome of the user clicking the button will result in something being removed or deleted.
439
+ ---
263
440
 
264
- Include an icon when needing to provide additional context to users of what action the Button has.
441
+ **Button**
265
442
 
266
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
443
+ ---
267
444
 
268
- | **Default** | **Hover** | **Pressed** | **Disabled** |
269
- | ----------- | --------- | ----------- | ------------ |
445
+ **Button**
270
446
 
271
- | **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
272
- | ------------------ | --------- | ----------- | ------------ |
447
+ ---
448
+
449
+ **Button**
273
450
 
274
451
  ---
275
452
 
276
- ### Square Button Spacing
453
+ ---
454
+
455
+ ### Rounded Button Spacing
277
456
 
278
457
  These rules establish how much margin should exist between and around elements.
279
458
 
459
+ **Rounded Button Spacing**
460
+
280
461
  ---
281
462
 
282
- ## Minimal Button
463
+ ---
464
+
465
+ ## Square Button
283
466
 
284
467
  | | In Figma | | | Meets Accessibility | | | In CZ GEN EPI Codebase |
285
468
  | --- | -------- | --- | --- | ------------------- | --- | --- | ---------------------- |
286
469
 
287
- ### Primary Minimal Button
288
-
289
- Text Buttons initiate actions that keep the user on the same page, such as opening or closing dialog windows or overlays. They should contain a maximum of 2-3 words.
470
+ ### Primary Square Button
290
471
 
291
- If a longer or inline call to action with a similar visual style is needed, a Text Link might be more appropriate. In addition to containing more words, Text Links navigate the user away from their current page to a new one, whereas Minimal Buttons keep users on the same page.
472
+ Used to complete primary actions within Forms and Dropdown Menus; paired with Text Inputs.
292
473
 
293
474
  Include an icon when needing to provide additional context to users of what action the Button has.
294
475
 
@@ -297,90 +478,377 @@ Click on each state below to enter inspect view and get details on its code attr
297
478
  | **Default** | **Hover** | **Pressed** | **Disabled** |
298
479
  | ----------- | --------- | ----------- | ------------ |
299
480
 
300
- | **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
301
- | ------------------ | --------- | ----------- | ------------ |
302
-
481
+ **Button**
303
482
 
483
+ ---
304
484
 
305
- ### Secondary Minimal Button
306
-
307
- Use for a deemphasized action or when paired with a Primary Minimal Button.
308
-
309
- Note: only Primary Minimal Buttons can be paired with icons.
485
+ **Button**
310
486
 
311
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
487
+ ---
312
488
 
313
- | **Default** | **Hover** | **Pressed** | **Disabled** |
314
- | ----------- | --------- | ----------- | ------------ |
489
+ **Button**
315
490
 
316
491
  ---
317
492
 
318
- ### Minimal Button Spacing
319
-
320
- These rules establish how much margin should exist between and around elements.
493
+ **Button**
321
494
 
322
495
  ---
323
496
 
324
- ## Icon Button
497
+ | **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
498
+ | ------------------ | --------- | ----------- | ------------ |
325
499
 
326
- | | In Figma | | | Meets Accessibility | | | In CZ GEN EPI Codebase |
327
- | --- | -------- | --- | --- | ------------------- | --- | --- | ---------------------- |
500
+ **Button**
328
501
 
329
- ### Large Primary Icon Button
502
+ ---
330
503
 
331
- Use in instances where a standard sized Button won't fit or doesn't seem necessary such as in charts, tables, navigation bars, etc.
504
+ **Button**
332
505
 
333
- The Primary Icon Button should be used in places that require the user's primary attention or to emphasize a primary action.
506
+ ---
334
507
 
335
- Icon Buttons can be coupled with a Dropdown Menu when there are multiple options available to the user upon triggering the Button.
508
+ **Button**
336
509
 
337
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
510
+ ---
338
511
 
339
- | **Default (Off)** | **Hover (Off)** | **Pressed** | **Default (On)** | **Hover (On)** | **Disabled** |
340
- | ----------------- | --------------- | ----------- | ---------------- | -------------- | ------------ |
512
+ **Button**
341
513
 
342
- ### Small Primary Icon Button
514
+ ---
343
515
 
344
- Use in instances where a standard sized Button won't fit or doesn't seem necessary such as in charts, tables, navigation bars, etc.
516
+ ### Secondary Square Button
345
517
 
346
- The Primary Icon Button should be used in places that require the user's primary attention or to emphasize a primary action.
518
+ Used to complete secondary actions within Forms and Dropdown Menus; paired with Text Inputs.
347
519
 
348
- Icon Buttons can be coupled with a Dropdown Menu when there are multiple options available to the user upon triggering the Button.
520
+ Include an icon when needing to provide additional context to users of what action the Button has.
349
521
 
350
522
  Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
351
523
 
352
524
  | **Default** | **Hover** | **Pressed** | **Disabled** |
353
525
  | ----------- | --------- | ----------- | ------------ |
354
526
 
355
- ### Large Secondary Icon Button
527
+ **Button**
356
528
 
357
- Use in instances where a standard sized Button won't fit or doesn't seem necessary such as in charts, tables, navigation bars, etc.
529
+ ---
358
530
 
359
- The Secondary Icon Button should be used for deemphasized or secondary actions; often paired with the Primary Icon Button.
531
+ **Button**
360
532
 
361
- Icon Buttons can be coupled with a Dropdown Menu when there are multiple options available to the user upon triggering the Button.
533
+ ---
362
534
 
363
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
535
+ **Button**
364
536
 
365
- | **Default (Off)** | **Hover (Off)** | **Default (On)** | **Hover (On)** | **Disabled** |
366
- | ----------------- | --------------- | ---------------- | -------------- | ------------ |
537
+ ---
367
538
 
368
- ### Small Secondary Icon Button
539
+ **Button**
369
540
 
370
- Use in instances where a standard sized Button won't fit or doesn't seem necessary such as in charts, tables, navigation bars, etc.
541
+ ---
371
542
 
372
- The Secondary Icon Button should be used for deemphasized or secondary actions; often paired with the Primary Icon Button.
543
+ | **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
544
+ | ------------------ | --------- | ----------- | ------------ |
373
545
 
374
- Icon Buttons can be coupled with a Dropdown Menu when there are multiple options available to the user upon triggering the Button.
546
+ **Button**
375
547
 
376
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
548
+ ---
377
549
 
378
- | **Default (Off)** | **Hover (Off)** | **Default (On)** | **Hover (On)** | **Disabled** |
379
- | ----------------- | --------------- | ---------------- | -------------- | ------------ |
550
+ **Button**
380
551
 
381
- ### Large Tertiary Icon Button
552
+ ---
382
553
 
383
- The Tertiary Icon Button should be used for lowest level actions that are not a part of the user's main workflow, such as closing a Dialog or expanding an Accordion (documentation coming soon). It is not usually paired with other Icon Buttons.
554
+ **Button**
555
+
556
+ ---
557
+
558
+ **Button**
559
+
560
+ ---
561
+
562
+ ### Error Square Button
563
+
564
+ Use the error Button when the outcome of the user clicking the button will result in something being removed or deleted.
565
+
566
+ Include an icon when needing to provide additional context to users of what action the Button has.
567
+
568
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
569
+
570
+ | **Default** | **Hover** | **Pressed** | **Disabled** |
571
+ | ----------- | --------- | ----------- | ------------ |
572
+
573
+ **Button**
574
+
575
+ ---
576
+
577
+ **Button**
578
+
579
+ ---
580
+
581
+ **Button**
582
+
583
+ ---
584
+
585
+ **Button**
586
+
587
+ ---
588
+
589
+ | **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
590
+ | ------------------ | --------- | ----------- | ------------ |
591
+
592
+ **Button**
593
+
594
+ ---
595
+
596
+ **Button**
597
+
598
+ ---
599
+
600
+ **Button**
601
+
602
+ ---
603
+
604
+ **Button**
605
+
606
+ ---
607
+
608
+ ---
609
+
610
+ ### Square Button Spacing
611
+
612
+ These rules establish how much margin should exist between and around elements.
613
+
614
+ **Square Button Spacing**
615
+
616
+ ---
617
+
618
+ ---
619
+
620
+ ## Minimal Button
621
+
622
+ | | In Figma | | | Meets Accessibility | | | In CZ GEN EPI Codebase |
623
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ---------------------- |
624
+
625
+ ### Primary Minimal Button
626
+
627
+ Text Buttons initiate actions that keep the user on the same page, such as opening or closing dialog windows or overlays. They should contain a maximum of 2-3 words.
628
+
629
+ If a longer or inline call to action with a similar visual style is needed, a Text Link might be more appropriate. In addition to containing more words, Text Links navigate the user away from their current page to a new one, whereas Minimal Buttons keep users on the same page.
630
+
631
+ Include an icon when needing to provide additional context to users of what action the Button has.
632
+
633
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
634
+
635
+ | **Default** | **Hover** | **Pressed** | **Disabled** |
636
+ | ----------- | --------- | ----------- | ------------ |
637
+
638
+ **Button**
639
+
640
+ ---
641
+
642
+ **Button**
643
+
644
+ ---
645
+
646
+ **Button**
647
+
648
+ ---
649
+
650
+ **Button**
651
+
652
+ ---
653
+
654
+ | **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
655
+ | ------------------ | --------- | ----------- | ------------ |
656
+
657
+ **Button**
658
+
659
+ ---
660
+
661
+ **Button**
662
+
663
+ ---
664
+
665
+ **Button**
666
+
667
+ ---
668
+
669
+ **Button**
670
+
671
+ ---
672
+
673
+ ### Secondary Minimal Button
674
+
675
+ Use for a deemphasized action or when paired with a Primary Minimal Button.
676
+
677
+ Note: only Primary Minimal Buttons can be paired with icons.
678
+
679
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
680
+
681
+ | **Default** | **Hover** | **Pressed** | **Disabled** |
682
+ | ----------- | --------- | ----------- | ------------ |
683
+
684
+ **Button**
685
+
686
+ ---
687
+
688
+ **Button**
689
+
690
+ ---
691
+
692
+ **Button**
693
+
694
+ ---
695
+
696
+ **Button**
697
+
698
+ ---
699
+
700
+ ---
701
+
702
+ ### Minimal Button Spacing
703
+
704
+ These rules establish how much margin should exist between and around elements.
705
+
706
+ **Text Button Spacing**
707
+
708
+ ---
709
+
710
+ ---
711
+
712
+ ## Icon Button
713
+
714
+ | | In Figma | | | Meets Accessibility | | | In CZ GEN EPI Codebase |
715
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ---------------------- |
716
+
717
+ ### Large Primary Icon Button
718
+
719
+ Use in instances where a standard sized Button won't fit or doesn't seem necessary such as in charts, tables, navigation bars, etc.
720
+
721
+ The Primary Icon Button should be used in places that require the user's primary attention or to emphasize a primary action.
722
+
723
+ Icon Buttons can be coupled with a Dropdown Menu when there are multiple options available to the user upon triggering the Button.
724
+
725
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
726
+
727
+ | **Default (Off)** | **Hover (Off)** | **Pressed** | **Default (On)** | **Hover (On)** | **Disabled** |
728
+ | ----------------- | --------------- | ----------- | ---------------- | -------------- | ------------ |
729
+
730
+ **ButtonIcon**
731
+
732
+ ---
733
+
734
+ **ButtonIcon**
735
+
736
+ ---
737
+
738
+ **ButtonIcon**
739
+
740
+ ---
741
+
742
+ **ButtonIcon**
743
+
744
+ ---
745
+
746
+ **ButtonIcon**
747
+
748
+ ---
749
+
750
+ **ButtonIcon**
751
+
752
+ ---
753
+
754
+ ### Small Primary Icon Button
755
+
756
+ Use in instances where a standard sized Button won't fit or doesn't seem necessary such as in charts, tables, navigation bars, etc.
757
+
758
+ The Primary Icon Button should be used in places that require the user's primary attention or to emphasize a primary action.
759
+
760
+ Icon Buttons can be coupled with a Dropdown Menu when there are multiple options available to the user upon triggering the Button.
761
+
762
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
763
+
764
+ | **Default** | **Hover** | **Pressed** | **Disabled** |
765
+ | ----------- | --------- | ----------- | ------------ |
766
+
767
+ **ButtonIcon**
768
+
769
+ ---
770
+
771
+ **ButtonIcon**
772
+
773
+ ---
774
+
775
+ **ButtonIcon**
776
+
777
+ ---
778
+
779
+ **ButtonIcon**
780
+
781
+ ---
782
+
783
+ ### Large Secondary Icon Button
784
+
785
+ Use in instances where a standard sized Button won't fit or doesn't seem necessary such as in charts, tables, navigation bars, etc.
786
+
787
+ The Secondary Icon Button should be used for deemphasized or secondary actions; often paired with the Primary Icon Button.
788
+
789
+ Icon Buttons can be coupled with a Dropdown Menu when there are multiple options available to the user upon triggering the Button.
790
+
791
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
792
+
793
+ | **Default (Off)** | **Hover (Off)** | **Default (On)** | **Hover (On)** | **Disabled** |
794
+ | ----------------- | --------------- | ---------------- | -------------- | ------------ |
795
+
796
+ **ButtonIcon**
797
+
798
+ ---
799
+
800
+ **ButtonIcon**
801
+
802
+ ---
803
+
804
+ **ButtonIcon**
805
+
806
+ ---
807
+
808
+ **ButtonIcon**
809
+
810
+ ---
811
+
812
+ **ButtonIcon**
813
+
814
+ ---
815
+
816
+ ### Small Secondary Icon Button
817
+
818
+ Use in instances where a standard sized Button won't fit or doesn't seem necessary such as in charts, tables, navigation bars, etc.
819
+
820
+ The Secondary Icon Button should be used for deemphasized or secondary actions; often paired with the Primary Icon Button.
821
+
822
+ Icon Buttons can be coupled with a Dropdown Menu when there are multiple options available to the user upon triggering the Button.
823
+
824
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
825
+
826
+ | **Default (Off)** | **Hover (Off)** | **Default (On)** | **Hover (On)** | **Disabled** |
827
+ | ----------------- | --------------- | ---------------- | -------------- | ------------ |
828
+
829
+ **ButtonIcon**
830
+
831
+ ---
832
+
833
+ **ButtonIcon**
834
+
835
+ ---
836
+
837
+ **ButtonIcon**
838
+
839
+ ---
840
+
841
+ **ButtonIcon**
842
+
843
+ ---
844
+
845
+ **ButtonIcon**
846
+
847
+ ---
848
+
849
+ ### Large Tertiary Icon Button
850
+
851
+ The Tertiary Icon Button should be used for lowest level actions that are not a part of the user's main workflow, such as closing a Dialog or expanding an Accordion (documentation coming soon). It is not usually paired with other Icon Buttons.
384
852
 
385
853
  Use the Tertiary Icon Button size that is most appropriate for the design it is being used in.
386
854
 
@@ -389,6 +857,18 @@ Click on each state below to enter inspect view and get details on its code attr
389
857
  | **Default** | **Hover** | **Pressed** |
390
858
  | ----------- | --------- | ----------- |
391
859
 
860
+ **ButtonIcon**
861
+
862
+ ---
863
+
864
+ **ButtonIcon**
865
+
866
+ ---
867
+
868
+ **ButtonIcon**
869
+
870
+ ---
871
+
392
872
  ### Medium Tertiary Icon Button
393
873
 
394
874
  The Tertiary Icon Button should be used for lowest level actions that are not a part of the user's main workflow, such as closing a Dialog or expanding an Accordion (documentation coming soon). It is not usually paired with other Icon Buttons.
@@ -400,6 +880,18 @@ Click on each state below to enter inspect view and get details on its code attr
400
880
  | **Default** | **Hover** | **Pressed** |
401
881
  | ----------- | --------- | ----------- |
402
882
 
883
+ **ButtonIcon**
884
+
885
+ ---
886
+
887
+ **ButtonIcon**
888
+
889
+ ---
890
+
891
+ **ButtonIcon**
892
+
893
+ ---
894
+
403
895
  ### Small Tertiary Icon Button
404
896
 
405
897
  The Tertiary Icon Button should be used for lowest level actions that are not a part of the user's main workflow, such as closing a Dialog or expanding an Accordion (documentation coming soon). It is not usually paired with other Icon Buttons.
@@ -411,12 +903,28 @@ Click on each state below to enter inspect view and get details on its code attr
411
903
  | **Default** | **Hover** | **Pressed** |
412
904
  | ----------- | --------- | ----------- |
413
905
 
906
+ **ButtonIcon**
907
+
908
+ ---
909
+
910
+ **ButtonIcon**
911
+
912
+ ---
913
+
914
+ **ButtonIcon**
915
+
916
+ ---
917
+
414
918
  ---
415
919
 
416
920
  ### Icon Button Spacing
417
921
 
418
922
  These rules establish how much margin should exist between and around elements.
419
923
 
924
+ **Icon Button Spacing**
925
+
926
+ ---
927
+
420
928
  ---
421
929
 
422
930
  ## Rounded Dropdown Button
@@ -437,7 +945,21 @@ Click on each state below to enter inspect view and get details on its code attr
437
945
  | **Default** | **Hover** | **Pressed** | **Disabled** |
438
946
  | ----------- | --------- | ----------- | ------------ |
439
947
 
948
+ **ButtonDropdown**
949
+
950
+ ---
951
+
952
+ **ButtonDropdown**
440
953
 
954
+ ---
955
+
956
+ **ButtonDropdown**
957
+
958
+ ---
959
+
960
+ **ButtonDropdown**
961
+
962
+ ---
441
963
 
442
964
  ### Secondary Rounded Dropdown Button
443
965
 
@@ -450,15 +972,33 @@ Click on each state below to enter inspect view and get details on its code attr
450
972
  | **Default** | **Hover** | **Pressed** | **Disabled** |
451
973
  | ----------- | --------- | ----------- | ------------ |
452
974
 
975
+ **ButtonDropdown**
976
+
977
+ ---
978
+
979
+ **ButtonDropdown**
980
+
981
+ ---
982
+
983
+ **ButtonDropdown**
984
+
985
+ ---
986
+
987
+ **ButtonDropdown**
988
+
989
+ ---
990
+
453
991
  ---
454
992
 
455
993
  ### Rounded Dropdown Button Spacing
456
994
 
457
995
  These rules establish how much margin should exist between and around elements.
458
996
 
459
- ---
997
+ **Rounded Dropdown Button Spacing**
460
998
 
999
+ ---
461
1000
 
1001
+ ---
462
1002
 
463
1003
  ## Square Dropdown Button
464
1004
 
@@ -478,6 +1018,22 @@ Click on each state below to enter inspect view and get details on its code attr
478
1018
  | **Default** | **Hover** | **Pressed** | **Disabled** |
479
1019
  | ----------- | --------- | ----------- | ------------ |
480
1020
 
1021
+ **ButtonDropdown**
1022
+
1023
+ ---
1024
+
1025
+ **ButtonDropdown**
1026
+
1027
+ ---
1028
+
1029
+ **ButtonDropdown**
1030
+
1031
+ ---
1032
+
1033
+ **ButtonDropdown**
1034
+
1035
+ ---
1036
+
481
1037
  ### Secondary Square Dropdown Button
482
1038
 
483
1039
  Use when there is a need to present the user with multiple options for actions that can be performed using a Button (generally in a similar context as icon Buttons).
@@ -491,12 +1047,32 @@ Click on each state below to enter inspect view and get details on its code attr
491
1047
  | **Default** | **Hover** | **Pressed** | **Disabled** |
492
1048
  | ----------- | --------- | ----------- | ------------ |
493
1049
 
1050
+ **ButtonDropdown**
1051
+
1052
+ ---
1053
+
1054
+ **ButtonDropdown**
1055
+
1056
+ ---
1057
+
1058
+ **ButtonDropdown**
1059
+
1060
+ ---
1061
+
1062
+ **ButtonDropdown**
1063
+
1064
+ ---
1065
+
494
1066
  ---
495
1067
 
496
1068
  ### Square Dropdown Button Spacing
497
1069
 
498
1070
  These rules establish how much margin should exist between and around elements.
499
1071
 
1072
+ **Square Dropdown Button Spacing**
1073
+
1074
+ ---
1075
+
500
1076
  ## Code
501
1077
 
502
1078
  ## Button Components
@@ -539,73 +1115,36 @@ Buttons are one of the primary ways users interact with and provide input to the
539
1115
 
540
1116
  Use the links below to jump to information on a specific Button variant:
541
1117
 
542
- ---
543
-
544
- ## Rounded Button
545
-
546
- | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
547
- | --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
548
-
549
- ### Primary Rounded Button
550
-
551
- General use for a primary or emphasized action.
552
-
553
- Include an icon when needing to provide additional context to users of what action the Button has.
554
-
555
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
556
-
557
- | **Default** | **Hover** | **Pressed** | **Disabled** |
558
- | ----------- | --------- | ----------- | ------------ |
559
-
560
- | **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
561
- | ------------------ | --------- | ----------- | ------------ |
562
-
563
-
564
-
565
- ### Secondary Rounded Button
566
-
567
- Use for a secondary action, or deemphasized Button. Often paired with primary Button.
568
-
569
- Include an icon when needing to provide additional context to users of what action the Button has.
570
-
571
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
572
-
573
- | **Default** | **Hover** | **Pressed** | **Disabled** |
574
- | ----------- | --------- | ----------- | ------------ |
575
-
576
- | **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
577
- | ------------------ | --------- | ----------- | ------------ |
1118
+ **Button**
578
1119
 
579
- ### Error Rounded Button
1120
+ ---
580
1121
 
581
- Use the error Button when the outcome of the user clicking the button will result in something being removed or deleted.
1122
+ **Button**
582
1123
 
583
- Include an icon when needing to provide additional context to users of what action the Button has.
1124
+ ---
584
1125
 
585
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
1126
+ **Button**
586
1127
 
587
- | **Default** | **Hover** | **Pressed** | **Disabled** |
588
- | ----------- | --------- | ----------- | ------------ |
1128
+ ---
589
1129
 
590
- | **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
591
- | ------------------ | --------- | ----------- | ------------ |
1130
+ **ButtonIcon**
592
1131
 
593
1132
  ---
594
1133
 
595
- ### Rounded Button Spacing
1134
+ **ButtonDropdown**
596
1135
 
597
- These rules establish how much margin should exist between and around elements.
1136
+ ---
598
1137
 
599
1138
  ---
600
1139
 
601
- ## Square Button
1140
+ ## Rounded Button
602
1141
 
603
1142
  | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
604
1143
  | --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
605
1144
 
606
- ### Primary Square Button
1145
+ ### Primary Rounded Button
607
1146
 
608
- Used to complete primary actions within Forms and Dropdown Menus; paired with Text Inputs.
1147
+ General use for a primary or emphasized action.
609
1148
 
610
1149
  Include an icon when needing to provide additional context to users of what action the Button has.
611
1150
 
@@ -614,55 +1153,44 @@ Click on each state below to enter inspect view and get details on its code attr
614
1153
  | **Default** | **Hover** | **Pressed** | **Disabled** |
615
1154
  | ----------- | --------- | ----------- | ------------ |
616
1155
 
617
- | **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
618
- | ------------------ | --------- | ----------- | ------------ |
619
-
620
- ### Secondary Square Button
621
-
622
- Used to complete secondary actions within Forms and Dropdown Menus; paired with Text Inputs.
623
-
624
- Include an icon when needing to provide additional context to users of what action the Button has.
625
-
626
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
1156
+ **Button**
627
1157
 
628
- | **Default** | **Hover** | **Pressed** | **Disabled** |
629
- | ----------- | --------- | ----------- | ------------ |
1158
+ ---
630
1159
 
631
- | **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
632
- | ------------------ | --------- | ----------- | ------------ |
1160
+ **Button**
633
1161
 
634
- ### Error Square Button
1162
+ ---
635
1163
 
636
- Use the error Button when the outcome of the user clicking the button will result in something being removed or deleted.
1164
+ **Button**
637
1165
 
638
- Include an icon when needing to provide additional context to users of what action the Button has.
1166
+ ---
639
1167
 
640
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
1168
+ **Button**
641
1169
 
642
- | **Default** | **Hover** | **Pressed** | **Disabled** |
643
- | ----------- | --------- | ----------- | ------------ |
1170
+ ---
644
1171
 
645
1172
  | **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
646
1173
  | ------------------ | --------- | ----------- | ------------ |
647
1174
 
648
- ---
1175
+ **Button**
649
1176
 
650
- ### Square Button Spacing
1177
+ ---
651
1178
 
652
- These rules establish how much margin should exist between and around elements.
1179
+ **Button**
653
1180
 
654
1181
  ---
655
1182
 
656
- ## Minimal Button
1183
+ **Button**
657
1184
 
658
- | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
659
- | --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
1185
+ ---
660
1186
 
661
- ### Primary Minimal Button
1187
+ **Button**
662
1188
 
663
- Text Buttons initiate actions that keep the user on the same page, such as opening or closing dialog windows or overlays. They should contain a maximum of 2-3 words.
1189
+ ---
664
1190
 
665
- If a longer or inline call to action with a similar visual style is needed, a Text Link might be more appropriate. In addition to containing more words, Text Links navigate the user away from their current page to a new one, whereas Minimal Buttons keep users on the same page.
1191
+ ### Secondary Rounded Button
1192
+
1193
+ Use for a secondary action, or deemphasized Button. Often paired with primary Button.
666
1194
 
667
1195
  Include an icon when needing to provide additional context to users of what action the Button has.
668
1196
 
@@ -671,1635 +1199,656 @@ Click on each state below to enter inspect view and get details on its code attr
671
1199
  | **Default** | **Hover** | **Pressed** | **Disabled** |
672
1200
  | ----------- | --------- | ----------- | ------------ |
673
1201
 
674
- | **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
675
- | ------------------ | --------- | ----------- | ------------ |
676
-
677
-
678
-
679
- ### Secondary Minimal Button
680
-
681
- Use for a deemphasized action or when paired with a Primary Minimal Button
682
-
683
- Note: only Primary Minimal Buttons can be paired with icons.
684
-
685
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
686
-
687
- | **Default** | **Hover** | **Pressed** | **Disabled** |
688
- | ----------- | --------- | ----------- | ------------ |
1202
+ **Button**
689
1203
 
1204
+ ---
690
1205
 
1206
+ **Button**
691
1207
 
692
1208
  ---
693
1209
 
694
- ### Minimal Button Spacing
695
-
696
- These rules establish how much margin should exist between and around elements.
1210
+ **Button**
697
1211
 
698
1212
  ---
699
1213
 
700
- ## Icon Button
1214
+ **Button**
701
1215
 
702
- | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
703
- | --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
1216
+ ---
704
1217
 
705
- ### Large Primary Icon Button
1218
+ | **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
1219
+ | ------------------ | --------- | ----------- | ------------ |
706
1220
 
707
- Use in instances where a standard sized Button won't fit or doesn't seem necessary such as in charts, tables, navigation bars, etc.
1221
+ **Button**
708
1222
 
709
- The Primary Icon Button should be used in places that require the user's primary attention or to emphasize a primary action.
1223
+ ---
710
1224
 
711
- Icon Buttons can be coupled with a Dropdown Menu when there are multiple options available to the user upon triggering the Button.
1225
+ **Button**
712
1226
 
713
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
1227
+ ---
714
1228
 
715
- | **Default (Off)** | **Hover (Off)** | **Pressed** | **Default (On)** | **Hover (On)** | **Disabled** |
716
- | ----------------- | --------------- | ----------- | ---------------- | -------------- | ------------ |
1229
+ **Button**
717
1230
 
1231
+ ---
718
1232
 
1233
+ **Button**
719
1234
 
720
- ### Small Primary Icon Button
1235
+ ---
721
1236
 
722
- Use in instances where a standard sized Button won't fit or doesn't seem necessary such as in charts, tables, navigation bars, etc.
1237
+ ### Error Rounded Button
723
1238
 
724
- The Primary Icon Button should be used in places that require the user's primary attention or to emphasize a primary action.
1239
+ Use the error Button when the outcome of the user clicking the button will result in something being removed or deleted.
725
1240
 
726
- Icon Buttons can be coupled with a Dropdown Menu when there are multiple options available to the user upon triggering the Button.
1241
+ Include an icon when needing to provide additional context to users of what action the Button has.
727
1242
 
728
1243
  Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
729
1244
 
730
1245
  | **Default** | **Hover** | **Pressed** | **Disabled** |
731
1246
  | ----------- | --------- | ----------- | ------------ |
732
1247
 
733
- ### Large Secondary Icon Button
734
-
735
- Use in instances where a standard sized Button won't fit or doesn't seem necessary such as in charts, tables, navigation bars, etc.
736
-
737
- The Secondary Icon Button should be used for deemphasized or secondary actions; often paired with the Primary Icon Button.
738
-
739
- Icon Buttons can be coupled with a Dropdown Menu when there are multiple options available to the user upon triggering the Button.
740
-
741
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
742
-
743
- | **Default (Off)** | **Hover (Off)** | **Default (On)** | **Hover (On)** | **Disabled** |
744
- | ----------------- | --------------- | ---------------- | -------------- | ------------ |
745
-
746
- ### Small Secondary Icon Button
747
-
748
- Use in instances where a standard sized Button won't fit or doesn't seem necessary such as in charts, tables, navigation bars, etc.
749
-
750
- The Secondary Icon Button should be used for deemphasized or secondary actions; often paired with the Primary Icon Button.
751
-
752
- Icon Buttons can be coupled with a Dropdown Menu when there are multiple options available to the user upon triggering the Button.
753
-
754
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
1248
+ **Button**
755
1249
 
756
- | **Default (Off)** | **Hover (Off)** | **Default (On)** | **Hover (On)** | **Disabled** |
757
- | ----------------- | --------------- | ---------------- | -------------- | ------------ |
1250
+ ---
758
1251
 
759
- ### Large Tertiary Icon Button
1252
+ **Button**
760
1253
 
761
- The Tertiary Icon Button should be used for lowest level actions that are not a part of the user's main workflow, such as closing a Dialog or expanding an Accordion (documentation coming soon). It is not usually paired with other Icon Buttons.
1254
+ ---
762
1255
 
763
- Use the Tertiary Icon Button size that is most appropriate for the design it is being used in.
1256
+ **Button**
764
1257
 
765
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
1258
+ ---
766
1259
 
767
- | **Default** | **Hover** | **Pressed** |
768
- | ----------- | --------- | ----------- |
1260
+ **Button**
769
1261
 
770
- ### Medium Tertiary Icon Button
1262
+ ---
771
1263
 
772
- The Tertiary Icon Button should be used for lowest level actions that are not a part of the user's main workflow, such as closing a Dialog or expanding an Accordion (documentation coming soon). It is not usually paired with other Icon Buttons.
1264
+ | **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
1265
+ | ------------------ | --------- | ----------- | ------------ |
773
1266
 
774
- Use the Tertiary Icon Button size that is most appropriate for the design it is being used in.
1267
+ **Button**
775
1268
 
776
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
1269
+ ---
777
1270
 
778
- | **Default** | **Hover** | **Pressed** |
779
- | ----------- | --------- | ----------- |
1271
+ **Button**
780
1272
 
781
- ### Small Tertiary Icon Button
1273
+ ---
782
1274
 
783
- The Tertiary Icon Button should be used for lowest level actions that are not a part of the user's main workflow, such as closing a Dialog or expanding an Accordion (documentation coming soon). It is not usually paired with other Icon Buttons.
1275
+ **Button**
784
1276
 
785
- Use the Tertiary Icon Button size that is most appropriate for the design it is being used in.
1277
+ ---
786
1278
 
787
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
1279
+ **Button**
788
1280
 
789
- | **Default** | **Hover** | **Pressed** |
790
- | ----------- | --------- | ----------- |
1281
+ ---
791
1282
 
792
1283
  ---
793
1284
 
794
- ### Icon Button Spacing
1285
+ ### Rounded Button Spacing
795
1286
 
796
1287
  These rules establish how much margin should exist between and around elements.
797
1288
 
1289
+ **Rounded Button Spacing**
1290
+
798
1291
  ---
799
1292
 
800
- ## Rounded Dropdown Button
1293
+ ---
1294
+
1295
+ ## Square Button
801
1296
 
802
1297
  | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
803
1298
  | --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
804
1299
 
805
- ### Primary Rounded Dropdown Button
806
-
807
- Use when there is a need to present the user with multiple options for actions that can be performed using a Button (generally in a similar context as Icon Buttons).
1300
+ ### Primary Square Button
808
1301
 
809
- The Primary Rounded Dropdown Button should be used in places that require the user's primary attention or to emphasize a primary action.
1302
+ Used to complete primary actions within Forms and Dropdown Menus; paired with Text Inputs.
810
1303
 
811
- The options are presented in a dropdown menu; use in conjunction with Dropdown Menu component.
1304
+ Include an icon when needing to provide additional context to users of what action the Button has.
812
1305
 
813
1306
  Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
814
1307
 
815
1308
  | **Default** | **Hover** | **Pressed** | **Disabled** |
816
1309
  | ----------- | --------- | ----------- | ------------ |
817
1310
 
1311
+ **Button**
818
1312
 
1313
+ ---
819
1314
 
820
- ### Secondary Rounded Dropdown Button
1315
+ **Button**
821
1316
 
822
- Use for Header-level Actions with multiple result options (generally in same context as Icon Buttons).
1317
+ ---
823
1318
 
824
- The options are presented in a dropdown menu; use in conjunction with Dropdown Menu component.
1319
+ **Button**
825
1320
 
826
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
1321
+ ---
827
1322
 
828
- | **Default** | **Hover** | **Pressed** | **Disabled** |
829
- | ----------- | --------- | ----------- | ------------ |
1323
+ **Button**
830
1324
 
831
1325
  ---
832
1326
 
833
- ### Rounded Dropdown Button Spacing
834
-
835
- These rules establish how much margin should exist between and around elements.
1327
+ | **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
1328
+ | ------------------ | --------- | ----------- | ------------ |
836
1329
 
837
- ## Code
1330
+ **Button**
838
1331
 
839
- ## Button Components
1332
+ ---
840
1333
 
841
- | Below you will find interactive Storybook iframes for each component within the Button element group. Tabs within each iframe provide a different set of tools: The Controls tab allows you to see and adjust all available props. The Actions tab shows you data displayed by event handler arguments. | | **Jump to component:** Button ButtonIcon ButtonDropdown |
842
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------------------------------------------------------- |
1334
+ **Button**
843
1335
 
844
1336
  ---
845
1337
 
846
- ### Button
1338
+ **Button**
847
1339
 
848
- Storybook
1340
+ ---
1341
+
1342
+ **Button**
849
1343
 
850
1344
  ---
851
1345
 
852
- ### ButtonIcon
1346
+ ### Secondary Square Button
853
1347
 
854
- Storybook
1348
+ Used to complete secondary actions within Forms and Dropdown Menus; paired with Text Inputs.
855
1349
 
856
- ---
1350
+ Include an icon when needing to provide additional context to users of what action the Button has.
857
1351
 
858
- ### ButtonDropdown
1352
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
859
1353
 
860
- Storybook
1354
+ | **Default** | **Hover** | **Pressed** | **Disabled** |
1355
+ | ----------- | --------- | ----------- | ------------ |
1356
+
1357
+ **Button**
861
1358
 
862
1359
  ---
863
1360
 
864
- Buttons are one of the primary ways users interact with and provide input to the product's UI, serving as the main elements to solicit user action.
1361
+ **Button**
865
1362
 
866
- ## Guidelines
1363
+ ---
867
1364
 
868
- ## Button Components
1365
+ **Button**
869
1366
 
870
- | There are a range of Button types available to use depending on the amount of emphasis the Button needs to have, its location in the UI, and whether it is existing alone or alongside other Buttons. | | **Jump to variant:** Button Dropdown Button Toggle Button |
871
- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | --------------------------------------------------------- |
1367
+ ---
872
1368
 
873
- ### Visual Preview
1369
+ **Button**
874
1370
 
875
1371
  ---
876
1372
 
877
- ## Button
1373
+ | **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
1374
+ | ------------------ | --------- | ----------- | ------------ |
878
1375
 
879
- | | In Figma | | | Meets Accessibility | | | In Code |
880
- | --- | -------- | --- | --- | ------------------- | --- | --- | ------- |
1376
+ **Button**
881
1377
 
882
- ### Button Styles
1378
+ ---
883
1379
 
884
- All of the available Button styles are shown below, demonstrated here using the primary type.
1380
+ **Button**
885
1381
 
886
1382
  ---
887
1383
 
888
- ### Live Instance
1384
+ **Button**
889
1385
 
890
- Interact with the live instance below and adjust the available props to better conceptualize how it will appear in product:
1386
+ ---
891
1387
 
892
- Default
1388
+ **Button**
893
1389
 
894
1390
  ---
895
1391
 
896
- ### Button – Rounded
897
-
898
- Use Button – Rounded as part of top-level or primary application navigation.
1392
+ ### Error Square Button
899
1393
 
900
- #### Primary
1394
+ Use the error Button when the outcome of the user clicking the button will result in something being removed or deleted.
901
1395
 
902
- Use for primary or emphasized actions.
1396
+ Include an icon when needing to provide additional context to users of what action the Button has.
903
1397
 
904
- Include an icon when needing to provide additional context to users of what action the Button has. Label text is available in all caps or title case; title case used by default.
1398
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
905
1399
 
906
- _Title Case_
1400
+ | **Default** | **Hover** | **Pressed** | **Disabled** |
1401
+ | ----------- | --------- | ----------- | ------------ |
907
1402
 
908
- | Default | Hover | Pressed | Disabled |
909
- | ------- | ----- | ------- | -------- |
1403
+ **Button**
910
1404
 
911
- _All Caps_
1405
+ ---
912
1406
 
913
- | Default | Hover | Pressed | Disabled |
914
- | ------- | ----- | ------- | -------- |
1407
+ **Button**
915
1408
 
916
- #### Secondary
1409
+ ---
917
1410
 
918
- Use for a secondary or deemphasized action; often paired with a primary Button.
1411
+ **Button**
919
1412
 
920
- Include an icon when needing to provide additional context to users of what action the Button has. Label text is available in all caps or title case; title case used by default.
1413
+ ---
921
1414
 
922
- _Title Case_
1415
+ **Button**
923
1416
 
924
- | Default | Hover | Pressed | Disabled |
925
- | ------- | ----- | ------- | -------- |
1417
+ ---
926
1418
 
927
- _All Caps_
1419
+ | **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
1420
+ | ------------------ | --------- | ----------- | ------------ |
928
1421
 
929
- | Default | Hover | Pressed | Disabled |
930
- | ------- | ----- | ------- | -------- |
1422
+ **Button**
931
1423
 
932
- #### Destructive
1424
+ ---
933
1425
 
934
- Use the destructive Button when the outcome of the user clicking the button will result in something being removed or deleted.
1426
+ **Button**
935
1427
 
936
- Include an icon when needing to provide additional context to users of what action the Button has. Label text is available in all caps or title case; title case used by default.
1428
+ ---
937
1429
 
938
- _Title Case_
1430
+ **Button**
939
1431
 
940
- | Default | Hover | Pressed | Disabled |
941
- | ------- | ----- | ------- | -------- |
1432
+ ---
942
1433
 
943
- _All Caps_
1434
+ **Button**
944
1435
 
945
- | Default | Hover | Pressed | Disabled |
946
- | ------- | ----- | ------- | -------- |
1436
+ ---
947
1437
 
948
1438
  ---
949
1439
 
950
- ### Button – Square
1440
+ ### Square Button Spacing
951
1441
 
952
- Use Button – Square in the body or main content area of applications.
1442
+ These rules establish how much margin should exist between and around elements.
953
1443
 
954
- #### **Primary**
1444
+ **Square Button Spacing**
955
1445
 
956
- Alternate Button style for primary or emphasized actions.
1446
+ ---
957
1447
 
958
- Include an icon when needing to provide additional context to users of what action the Button has. Label text is available in all caps or title case; title case used by default.
1448
+ ---
959
1449
 
960
- _Title Case_
1450
+ ## Minimal Button
961
1451
 
962
- | Default | Hover | Pressed | Disabled |
963
- | ------- | ----- | ------- | -------- |
1452
+ | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
1453
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
964
1454
 
965
- _All Caps_
1455
+ ### Primary Minimal Button
966
1456
 
967
- | Default | Hover | Pressed | Disabled |
968
- | ------- | ----- | ------- | -------- |
1457
+ Text Buttons initiate actions that keep the user on the same page, such as opening or closing dialog windows or overlays. They should contain a maximum of 2-3 words.
969
1458
 
970
- #### **Secondary**
1459
+ If a longer or inline call to action with a similar visual style is needed, a Text Link might be more appropriate. In addition to containing more words, Text Links navigate the user away from their current page to a new one, whereas Minimal Buttons keep users on the same page.
971
1460
 
972
- Use for a secondary or deemphasized action; often paired with a primary Button.
1461
+ Include an icon when needing to provide additional context to users of what action the Button has.
973
1462
 
974
- Include an icon when needing to provide additional context to users of what action the Button has. Label text is available in all caps or title case; title case used by default.
1463
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
975
1464
 
976
- _Title Case_
1465
+ | **Default** | **Hover** | **Pressed** | **Disabled** |
1466
+ | ----------- | --------- | ----------- | ------------ |
977
1467
 
978
- | Default | Hover | Pressed | Disabled |
979
- | ------- | ----- | ------- | -------- |
1468
+ **Button**
980
1469
 
981
- _All Caps_
1470
+ ---
982
1471
 
983
- | Default | Hover | Pressed | Disabled |
984
- | ------- | ----- | ------- | -------- |
1472
+ **Button**
985
1473
 
986
- #### Destructive
1474
+ ---
987
1475
 
988
- Use the destructive Button when the outcome of the user clicking the button will result in something being removed or deleted.
1476
+ **Button**
989
1477
 
990
- Include an icon when needing to provide additional context to users of what action the Button has. Label text is available in all caps or title case; title case used by default.
1478
+ ---
991
1479
 
992
- _Title Case_
1480
+ **Button**
993
1481
 
994
- | Default | Hover | Pressed | Disabled |
995
- | ------- | ----- | ------- | -------- |
1482
+ ---
996
1483
 
997
- _All Caps_
1484
+ | **Default + Icon** | **Hover** | **Pressed** | **Disabled** |
1485
+ | ------------------ | --------- | ----------- | ------------ |
998
1486
 
999
- | Default | Hover | Pressed | Disabled |
1000
- | ------- | ----- | ------- | -------- |
1487
+ **Button**
1001
1488
 
1002
1489
  ---
1003
1490
 
1004
- ### Button – Minimal
1491
+ **Button**
1005
1492
 
1006
- Minimal Buttons initiate actions that keep the user on the same page, such as opening or closing Dialogs. They should contain a maximum of 2-3 words.
1007
-
1008
- If a longer or inline call to action with a similar visual style is needed, a Link might be more appropriate. In addition to containing more words, Text Links navigate the user away from their current page to a new one, whereas Minimal Buttons keep users on the same page.
1493
+ ---
1009
1494
 
1010
- #### Primary
1495
+ **Button**
1011
1496
 
1012
- Use for primary or emphasized actions.
1497
+ ---
1013
1498
 
1014
- Include an icon when needing to provide additional context to users of what action the Button has. Label text is available in all caps or title case; all caps is used by default.
1499
+ **Button**
1015
1500
 
1016
- _Title Case_
1501
+ ---
1017
1502
 
1018
- | Default | Hover | Pressed | Disabled |
1019
- | ------- | ----- | ------- | -------- |
1503
+ ### Secondary Minimal Button
1020
1504
 
1021
- _All Caps_
1505
+ Use for a deemphasized action or when paired with a Primary Minimal Button
1022
1506
 
1023
- | Default | Hover | Pressed | Disabled |
1024
- | ------- | ----- | ------- | -------- |
1507
+ Note: only Primary Minimal Buttons can be paired with icons.
1025
1508
 
1026
- #### Secondary
1509
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
1027
1510
 
1028
- Use for a secondary or deemphasized action; often paired with a primary Button.
1511
+ | **Default** | **Hover** | **Pressed** | **Disabled** |
1512
+ | ----------- | --------- | ----------- | ------------ |
1029
1513
 
1030
- Label text is available in all caps or title case; all caps is used by default.
1514
+ **Button**
1031
1515
 
1032
- _Title Case_
1516
+ ---
1033
1517
 
1034
- | Default | Hover | Pressed | Disabled |
1035
- | ------- | ----- | ------- | -------- |
1518
+ **Button**
1036
1519
 
1037
- _All Caps_
1520
+ ---
1038
1521
 
1039
- | Default | Hover | Pressed | Disabled |
1040
- | ------- | ----- | ------- | -------- |
1522
+ **Button**
1041
1523
 
1042
1524
  ---
1043
1525
 
1044
- ### Button – Icon
1526
+ **Button**
1045
1527
 
1046
- Use when a standard Button doesn't seem necessary or won't fit such as when used as part of complex components like Tables. Button – Icon should generally be coupled with a Tooltip that is displayed on hover to provide a label indicating the Button's functionality.
1528
+ ---
1047
1529
 
1048
- Optionally, pair Button – Icon with a Tooltip to use as a label to communicate the button's functionality.
1530
+ ---
1049
1531
 
1050
- #### Primary
1532
+ ### Minimal Button Spacing
1051
1533
 
1052
- Primary Button – Icon should be used in places that require the user's primary attention or to emphasize a primary action. Can be paired with other Button components.
1534
+ These rules establish how much margin should exist between and around elements.
1053
1535
 
1054
- _Large_
1536
+ **Minimal Button Spacing**
1055
1537
 
1056
- | Default | Hover | Pressed | Disabled |
1057
- | ------- | ----- | ------- | -------- |
1538
+ ---
1058
1539
 
1059
- _Medium_
1540
+ ---
1060
1541
 
1061
- | Default | Hover | Pressed | Disabled |
1062
- | ------- | ----- | ------- | -------- |
1542
+ ## Icon Button
1063
1543
 
1064
- _Small_
1544
+ | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
1545
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
1065
1546
 
1066
- | Default | Hover | Pressed | Disabled |
1067
- | ------- | ----- | ------- | -------- |
1547
+ ### Large Primary Icon Button
1068
1548
 
1069
- #### Secondary
1549
+ Use in instances where a standard sized Button won't fit or doesn't seem necessary such as in charts, tables, navigation bars, etc.
1070
1550
 
1071
- Secondary Button – Icon should be used for deemphasized or secondary actions. Can be paired with other Button components.
1551
+ The Primary Icon Button should be used in places that require the user's primary attention or to emphasize a primary action.
1072
1552
 
1073
- _Large_
1553
+ Icon Buttons can be coupled with a Dropdown Menu when there are multiple options available to the user upon triggering the Button.
1074
1554
 
1075
- | Default | Hover | Pressed | Disabled |
1076
- | ------- | ----- | ------- | -------- |
1555
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
1077
1556
 
1078
- _Medium_
1557
+ | **Default (Off)** | **Hover (Off)** | **Pressed** | **Default (On)** | **Hover (On)** | **Disabled** |
1558
+ | ----------------- | --------------- | ----------- | ---------------- | -------------- | ------------ |
1079
1559
 
1080
- | Default | Hover | Pressed | Disabled |
1081
- | ------- | ----- | ------- | -------- |
1560
+ **ButtonIcon**
1082
1561
 
1083
- _Small_
1562
+ ---
1084
1563
 
1085
- | Default | Hover | Pressed | Disabled |
1086
- | ------- | ----- | ------- | -------- |
1564
+ **ButtonIcon**
1087
1565
 
1088
- #### Tertiary
1566
+ ---
1089
1567
 
1090
- The tertiary Icon Button should be used for lowest level actions that are not a part of the user's main workflow, such as closing a Dialog or expanding an Accordion. It is not usually used in combination with other Buttons or Tooltips.
1568
+ **ButtonIcon**
1091
1569
 
1092
- _Large_
1570
+ ---
1093
1571
 
1094
- | Default | Hover | Pressed | Disabled |
1095
- | ------- | ----- | ------- | -------- |
1572
+ **ButtonIcon**
1096
1573
 
1097
- _Medium_
1574
+ ---
1098
1575
 
1099
- | Default | Hover | Pressed | Disabled |
1100
- | ------- | ----- | ------- | -------- |
1576
+ **ButtonIcon**
1101
1577
 
1102
- _Small_
1578
+ ---
1103
1579
 
1104
- | Default | Hover | Pressed | Disabled |
1105
- | ------- | ----- | ------- | -------- |
1580
+ **ButtonIcon**
1106
1581
 
1107
1582
  ---
1108
1583
 
1109
- ### Button Spacing
1584
+ ### Small Primary Icon Button
1110
1585
 
1111
- These rules establish how much margin should exist between and around elements.
1586
+ Use in instances where a standard sized Button won't fit or doesn't seem necessary such as in charts, tables, navigation bars, etc.
1112
1587
 
1113
- ---
1588
+ The Primary Icon Button should be used in places that require the user's primary attention or to emphasize a primary action.
1114
1589
 
1115
- ## Dropdown Button
1590
+ Icon Buttons can be coupled with a Dropdown Menu when there are multiple options available to the user upon triggering the Button.
1116
1591
 
1117
- | | In Figma | | | Meets Accessibility | | | In Code |
1118
- | --- | -------- | --- | --- | ------------------- | --- | --- | ------- |
1592
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
1119
1593
 
1120
- ### Dropdown Button Styles
1594
+ | **Default** | **Hover** | **Pressed** | **Disabled** |
1595
+ | ----------- | --------- | ----------- | ------------ |
1121
1596
 
1122
- All of the available Dropdown Button styles are shown below, demonstrated here using the primary type.
1597
+ **ButtonIcon**
1123
1598
 
1124
1599
  ---
1125
1600
 
1126
- ### Live Instance
1601
+ **ButtonIcon**
1127
1602
 
1128
- Interact with the live instance below and adjust the available props to better conceptualize how it will appear in product:
1603
+ ---
1129
1604
 
1130
- Default
1605
+ **ButtonIcon**
1131
1606
 
1132
1607
  ---
1133
1608
 
1134
- ### Dropdown Button – Rounded
1609
+ **ButtonIcon**
1135
1610
 
1136
- Use when there is a need to present the user with multiple options for actions that can be performed using a Button; the options are presented in a Dropdown Menu.
1611
+ ---
1612
+
1613
+ ### Large Secondary Icon Button
1137
1614
 
1138
- #### Primary
1615
+ Use in instances where a standard sized Button won't fit or doesn't seem necessary such as in charts, tables, navigation bars, etc.
1139
1616
 
1140
- The Primary variant should be used in places that require the user's primary attention or to emphasize a primary action.
1617
+ The Secondary Icon Button should be used for deemphasized or secondary actions; often paired with the Primary Icon Button.
1141
1618
 
1142
- | Default | Hover | Pressed | Disabled |
1143
- | ------- | ----- | ------- | -------- |
1619
+ Icon Buttons can be coupled with a Dropdown Menu when there are multiple options available to the user upon triggering the Button.
1144
1620
 
1145
- #### Secondary
1621
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
1146
1622
 
1147
- The Secondary Rounded Dropdown Button should be used for deemphasized or secondary actions.
1623
+ | **Default (Off)** | **Hover (Off)** | **Default (On)** | **Hover (On)** | **Disabled** |
1624
+ | ----------------- | --------------- | ---------------- | -------------- | ------------ |
1148
1625
 
1149
- | Default | Hover | Pressed | Disabled |
1150
- | ------- | ----- | ------- | -------- |
1626
+ **ButtonIcon**
1151
1627
 
1152
1628
  ---
1153
1629
 
1154
- ### Dropdown Button – Square
1155
-
1156
- Alternate Dropdown Button style for use when there is a need to present the user with multiple options for actions that can be performed using a Button; the options are presented in a Dropdown Menu.
1630
+ **ButtonIcon**
1157
1631
 
1158
- #### Primary
1632
+ ---
1159
1633
 
1160
- The Primary variant should be used in places that require the user's primary attention or to emphasize a primary action.
1634
+ **ButtonIcon**
1161
1635
 
1162
- | Default | Hover | Pressed | Disabled |
1163
- | ------- | ----- | ------- | -------- |
1636
+ ---
1164
1637
 
1165
- #### Secondary
1638
+ **ButtonIcon**
1166
1639
 
1167
- The Secondary Rounded Dropdown Button should be used for deemphasized or secondary actions.
1640
+ ---
1168
1641
 
1169
- | Default | Hover | Pressed | Disabled |
1170
- | ------- | ----- | ------- | -------- |
1642
+ **ButtonIcon**
1171
1643
 
1172
1644
  ---
1173
1645
 
1174
- ### Dropdown Button – Icon
1646
+ ### Small Secondary Icon Button
1647
+
1648
+ Use in instances where a standard sized Button won't fit or doesn't seem necessary such as in charts, tables, navigation bars, etc.
1649
+
1650
+ The Secondary Icon Button should be used for deemphasized or secondary actions; often paired with the Primary Icon Button.
1651
+
1652
+ Icon Buttons can be coupled with a Dropdown Menu when there are multiple options available to the user upon triggering the Button.
1175
1653
 
1176
- Use when there is a need to present the user with multiple options for actions that can be performed and a standard Dropdown Button doesn't seem necessary or won't fit such as when used as part of complex components like Tables; the options are presented in a Dropdown Menu. Dropdown Buttons should generally be coupled with a Tooltip that is displayed on hover to provide a label indicating the Button's functionality.
1654
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
1177
1655
 
1178
- Optionally, pair Dropdown Button – Icon with a Tooltip to use as a label to communicate the button's functionality.
1656
+ | **Default (Off)** | **Hover (Off)** | **Default (On)** | **Hover (On)** | **Disabled** |
1657
+ | ----------------- | --------------- | ---------------- | -------------- | ------------ |
1179
1658
 
1180
- #### Primary
1659
+ **ButtonIcon**
1181
1660
 
1182
- Primary Dropdown Button – Icon should be used in places that require the user's primary attention or to emphasize a primary action. Can be paired with other Button components.
1661
+ ---
1183
1662
 
1184
- _Large_
1663
+ **ButtonIcon**
1185
1664
 
1186
- | Default | Hover | Pressed | Disabled |
1187
- | ------- | ----- | ------- | -------- |
1665
+ ---
1188
1666
 
1189
- _Medium_
1667
+ **ButtonIcon**
1190
1668
 
1191
- | Default | Hover | Pressed | Disabled |
1192
- | ------- | ----- | ------- | -------- |
1669
+ ---
1193
1670
 
1194
- _Small_
1671
+ **ButtonIcon**
1195
1672
 
1196
- | Default | Hover | Pressed | Disabled |
1197
- | ------- | ----- | ------- | -------- |
1673
+ ---
1198
1674
 
1199
- #### Secondary
1675
+ **ButtonIcon**
1200
1676
 
1201
- Secondary Dropdown Button – Icon should be used for deemphasized or secondary actions. Can be paired with other Button components.
1677
+ ---
1202
1678
 
1203
- _Large_
1679
+ ### Large Tertiary Icon Button
1204
1680
 
1205
- | Default | Hover | Pressed | Disabled |
1206
- | ------- | ----- | ------- | -------- |
1681
+ The Tertiary Icon Button should be used for lowest level actions that are not a part of the user's main workflow, such as closing a Dialog or expanding an Accordion (documentation coming soon). It is not usually paired with other Icon Buttons.
1207
1682
 
1208
- _Medium_
1683
+ Use the Tertiary Icon Button size that is most appropriate for the design it is being used in.
1209
1684
 
1210
- | Default | Hover | Pressed | Disabled |
1211
- | ------- | ----- | ------- | -------- |
1685
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
1212
1686
 
1213
- _Small_
1687
+ | **Default** | **Hover** | **Pressed** |
1688
+ | ----------- | --------- | ----------- |
1214
1689
 
1215
- | Default | Hover | Pressed | Disabled |
1216
- | ------- | ----- | ------- | -------- |
1690
+ **ButtonIcon**
1217
1691
 
1218
1692
  ---
1219
1693
 
1220
- ### Dropdown Button Spacing
1694
+ **ButtonIcon**
1221
1695
 
1222
- These rules establish how much margin should exist between and around elements.
1696
+ ---
1697
+
1698
+ **ButtonIcon**
1223
1699
 
1224
1700
  ---
1225
1701
 
1226
- ## Toggle Button
1702
+ ### Medium Tertiary Icon Button
1703
+
1704
+ The Tertiary Icon Button should be used for lowest level actions that are not a part of the user's main workflow, such as closing a Dialog or expanding an Accordion (documentation coming soon). It is not usually paired with other Icon Buttons.
1227
1705
 
1228
- | | In Figma | | | Meets Accessibility | | | In Code |
1229
- | --- | -------- | --- | --- | ------------------- | --- | --- | ------- |
1706
+ Use the Tertiary Icon Button size that is most appropriate for the design it is being used in.
1230
1707
 
1231
- ### Live Instance
1708
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
1232
1709
 
1233
- Interact with the live instance below and adjust the available props to better conceptualize how it will appear in product:
1710
+ | **Default** | **Hover** | **Pressed** |
1711
+ | ----------- | --------- | ----------- |
1234
1712
 
1235
- Default
1713
+ **ButtonIcon**
1236
1714
 
1237
1715
  ---
1238
1716
 
1239
- ### Overview
1717
+ **ButtonIcon**
1240
1718
 
1241
- Use Toggle Button when there is a need to enable or disable an element in the UI (such as toggling visibility of a Panel). If users need to indicate true or false as part of a form or flip a setting or option from off to on (and vise versa), use Toggle Input.
1719
+ ---
1242
1720
 
1243
- Optionally, pair Toggle Button with a Tooltip to use as a label to communicate the button's functionality.
1721
+ **ButtonIcon**
1244
1722
 
1245
- #### Primary
1723
+ ---
1246
1724
 
1247
- Toggle Button – Primary should be used in places that require the user's primary attention or to emphasize a primary action. Can be paired with other Button components.
1725
+ ### Small Tertiary Icon Button
1248
1726
 
1249
- _Large_
1727
+ The Tertiary Icon Button should be used for lowest level actions that are not a part of the user's main workflow, such as closing a Dialog or expanding an Accordion (documentation coming soon). It is not usually paired with other Icon Buttons.
1250
1728
 
1251
- | Default (Off) | Hover (Off) | Pressed (On) | Default (On) | Hover (On) | Pressed (Off) | Disabled |
1252
- | :-----------: | :---------: | :----------: | :----------: | :--------: | :-----------: | :------: |
1729
+ Use the Tertiary Icon Button size that is most appropriate for the design it is being used in.
1253
1730
 
1254
- _Medium_
1731
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
1255
1732
 
1256
- | Default (Off) | Hover (Off) | Pressed (On) | Default (On) | Hover (On) | Pressed (Off) | Disabled |
1257
- | :-----------: | :---------: | :----------: | :----------: | :--------: | :-----------: | :------: |
1733
+ | **Default** | **Hover** | **Pressed** |
1734
+ | ----------- | --------- | ----------- |
1258
1735
 
1259
- _Small_
1736
+ **ButtonIcon**
1260
1737
 
1261
- | Default (Off) | Hover (Off) | Pressed (On) | Default (On) | Hover (On) | Pressed (Off) | Disabled |
1262
- | :-----------: | :---------: | :----------: | :----------: | :--------: | :-----------: | :------: |
1738
+ ---
1263
1739
 
1264
- #### Secondary
1740
+ **ButtonIcon**
1265
1741
 
1266
- Toggle Button – Secondary should be used for deemphasized or secondary actions. Can be paired with other Button components.
1742
+ ---
1267
1743
 
1268
- _Large_
1744
+ **ButtonIcon**
1269
1745
 
1270
- | Default (Off) | Hover (Off) | Pressed (On) | Default (On) | Hover (On) | Pressed (Off) | Disabled |
1271
- | :-----------: | :---------: | :----------: | :----------: | :--------: | :-----------: | :------: |
1746
+ ---
1272
1747
 
1273
- _Medium_
1748
+ ---
1274
1749
 
1275
- | Default (Off) | Hover (Off) | Pressed (On) | Default (On) | Hover (On) | Pressed (Off) | Disabled |
1276
- | :-----------: | :---------: | :----------: | :----------: | :--------: | :-----------: | :------: |
1750
+ ### Icon Button Spacing
1277
1751
 
1278
- _Small_
1752
+ These rules establish how much margin should exist between and around elements.
1279
1753
 
1280
- | Default (Off) | Hover (Off) | Pressed (On) | Default (On) | Hover (On) | Pressed (Off) | Disabled |
1281
- | :-----------: | :---------: | :----------: | :----------: | :--------: | :-----------: | :------: |
1754
+ **Icon Button_Large Spacing**
1282
1755
 
1283
1756
  ---
1284
1757
 
1285
- ### Toggle Button Spacing
1758
+ ---
1286
1759
 
1287
- These rules establish how much margin should exist between and around elements.
1760
+ ## Rounded Dropdown Button
1288
1761
 
1289
- ## Code
1762
+ | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
1763
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
1290
1764
 
1291
- ## Button Components
1765
+ ### Primary Rounded Dropdown Button
1292
1766
 
1293
- | There are a range of Button types available to use depending on the amount of emphasis the button needs to have, its location in the UI, and whether it is existing alone or alongside other Buttons. | | **Jump to component:** Button ButtonDropdown ButtonToggle |
1294
- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | --------------------------------------------------------- |
1767
+ Use when there is a need to present the user with multiple options for actions that can be performed using a Button (generally in a similar context as Icon Buttons).
1295
1768
 
1296
- ### Visual Preview
1769
+ The Primary Rounded Dropdown Button should be used in places that require the user's primary attention or to emphasize a primary action.
1770
+
1771
+ The options are presented in a dropdown menu; use in conjunction with Dropdown Menu component.
1772
+
1773
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
1774
+
1775
+ | **Default** | **Hover** | **Pressed** | **Disabled** |
1776
+ | ----------- | --------- | ----------- | ------------ |
1297
1777
 
1298
- > **Note:** The code examples below must install dependencies before displaying and may take extra time to load
1778
+ **ButtonDropdown**
1299
1779
 
1300
1780
  ---
1301
1781
 
1302
- ## Button
1782
+ **ButtonDropdown**
1303
1783
 
1304
- ### SDS Source Code
1784
+ ---
1785
+
1786
+ **ButtonDropdown**
1305
1787
 
1306
- The component's source code in the SDS codebase can be found here.
1788
+ ---
1307
1789
 
1308
- ### SDS vs MUI
1790
+ **ButtonDropdown**
1309
1791
 
1310
- The following props are available to MUI's `Button` component, but produce no effect (or unexpected effects) for SDS's `Button` component, so **it is recommended to not use them**:
1792
+ ---
1311
1793
 
1312
- - **`variant`\*\***:\*\* This prop is intended to set the `Button` to either `text` only, `contained`, or `outlined`. With SDS's `Button`, they do not function as described in the MUI documentation; however, similar effects, specific to SDS's styles, can be achieved through a combination of the SDS-only props: `sdsStyle` and `sdsType` (see details below).
1313
- - **`color`\*\***:\*\* SDS'S`Button`does not support this colors or intents that would be expected through this prop. However, the `sdsType` prop can be used to set the button color as `primary` or `secondary`.
1314
- - **`size`\*\***:\*\* This prop is not supported for SDS's `Button`
1315
- - **`disableElevation`\*\***:\*\* The SDS `Button` component doesn't have a visual "elevation" or shadowed treatment by default (which this prop disables for MUI's `Button`). Setting `disableElevation={false}` will not render the MUI default elevation treatment.
1794
+ ### Secondary Rounded Dropdown Button
1316
1795
 
1317
- Icons can be used in both MUI and SDS `Button` component, but are called in slightly different ways:
1796
+ Use for Header-level Actions with multiple result options (generally in same context as Icon Buttons).
1318
1797
 
1319
- - **`startIcon`** and **`endIcon`\*\***:\*\* Both of these props are supported by both MUI and SDS's `Buttons`. However, MUI expects the prop to receive an individual icon as its own component (for example`startIcon={<DeleteIcon />}`), whereas SDS takes the `Icon` component which references which specific icon to call, as one of its props, as such:
1798
+ The options are presented in a dropdown menu; use in conjunction with Dropdown Menu component.
1320
1799
 
1321
- `startIcon={<Icon sdsIcon="download" sdsSize="s" sdsType="button" />}`
1800
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
1322
1801
 
1323
- SDS's `Button` has additional props to allow flexibility while maintaining the SDS styles:
1802
+ | **Default** | **Hover** | **Pressed** | **Disabled** |
1803
+ | ----------- | --------- | ----------- | ------------ |
1324
1804
 
1325
- - **`sdsStyle`\*\***:\*\* takes `minimal` (default), `rounded`, or `square` or `icon` as values
1326
- - **`sdsType`\*\***:\*\* takes `primary` (default, filled) or `secondary` (outlined) as values
1805
+ **ButtonDropdown**
1327
1806
 
1328
- ### MUI Documentation
1807
+ ---
1329
1808
 
1330
- Documentation for the underlying MUI `Button` component can be found here.
1809
+ **ButtonDropdown**
1331
1810
 
1332
- ### Props
1811
+ ---
1333
1812
 
1334
- Any custom SDS props and MUI props required for implementation are found on the tables below. See the MUI documentation for additional optional props.
1813
+ **ButtonDropdown**
1335
1814
 
1336
- If `sdsStyle` is set to either `rounded` or `squared`, the props are as follows:
1815
+ ---
1337
1816
 
1338
- | Name | Type | Default | Description |
1339
- | ----------- | ------------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ------------------- |
1340
- | `isAllCaps` | `bool` | `false` | When set to `true`, the button text will be displayed in all capital letters. Please note that the `isAllCaps` attribute only applies to buttons with the `sdsStyle` set to `minimal`. |
1341
- | `sdsStyle` | `"rounded" | "square"` | `-` | Style of the button. |
1342
- | `sdsType` | `"primary"` ` | "secondary"` ` | "destructive"` | `-` | Type of the button. |
1817
+ **ButtonDropdown**
1343
1818
 
1344
- If `sdsStyle` is set to `minimal`, the props are listed below:
1819
+ ---
1345
1820
 
1346
- | Name | Type | Default | Description |
1347
- | ----------- | ------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- |
1348
- | `isAllCaps` | `bool` | `false` | When set to `true`, the button text will be displayed in all capital letters. Please note that the `isAllCaps` attribute only applies to buttons with the `sdsStyle` set to `minimal`. |
1349
- | `sdsStyle` | `"minimal"` | `-` | Style of the button. |
1350
- | `sdsType` | `"primary"` ` | "secondary"` | `-` | Type of the button. |
1821
+ ---
1351
1822
 
1352
- And if the `sdsStyle` is set to `icon`, the props are listed below:
1823
+ ### Rounded Dropdown Button Spacing
1353
1824
 
1354
- | Name | Type | Default | Description |
1355
- | -------------- | -------------------- | ----------------------------------- | ------------------------------------------ | --------------- | --------------------------------------- |
1356
- | `sdsSize` | `"small"` ` | "medium"` ` | "large"` | `medium` | Determines the size of the button icon. |
1357
- | `sdsStyle` | `"icon"` | `-` | Style of the button. |
1358
- | `sdsType` | `"primary"` ` | "secondary"` ` | "tertiary"` | `-` | Type of the button icon. |
1359
- | `icon` | `SDSIcon | React.ReactElement<CustomSVGProps>` | `-` | The actual icon |
1360
- | `sdsIconProps` | `Partial<IconProps>` | `-` | Props for the icon if an sds icon is used. |
1825
+ These rules establish how much margin should exist between and around elements.
1361
1826
 
1362
- ### Code examples
1827
+ **Rounded Dropdown Button Spacing**
1363
1828
 
1364
- #### **Default Button**
1829
+ ---
1365
1830
 
1366
- This example has the minimum props needed for the `Button` component.
1831
+ ## Code
1367
1832
 
1368
- **/styles.css**
1833
+ ## Button Components
1369
1834
 
1370
- ```css
1371
- body {
1372
- font-size: 13px;
1373
- font-weight: 400;
1374
- letter-spacing: 0.08px;
1375
- line-height: 20px;
1376
- text-transform: none;
1377
- font-family: "Inter", sans-serif;
1378
- }
1835
+ | Below you will find interactive Storybook iframes for each component within the Button element group. Tabs within each iframe provide a different set of tools: The Controls tab allows you to see and adjust all available props. The Actions tab shows you data displayed by event handler arguments. | | **Jump to component:** Button ButtonIcon ButtonDropdown |
1836
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------------------------------------------------------- |
1379
1837
 
1380
- h1 {
1381
- font-size: 1.5rem;
1382
- }
1838
+ ---
1383
1839
 
1384
- .app {
1385
- padding: 20px;
1386
- }
1387
- ```
1840
+ ### Button
1388
1841
 
1389
- **tsconfig.json**
1842
+ Storybook
1390
1843
 
1391
- ```json
1392
- {
1393
- "include": ["./**/*"],
1394
- "compilerOptions": {
1395
- "strict": true,
1396
- "esModuleInterop": true,
1397
- "lib": ["dom", "es2015"],
1398
- "jsx": "react-jsx"
1399
- }
1400
- }
1401
- ```
1402
-
1403
- **/App.tsx**
1404
-
1405
- ```tsx
1406
- import { Button } from "@czi-sds/components";
1407
- import "./styles.css";
1408
-
1409
- function App() {
1410
- return (
1411
- <div className="app">
1412
- <Button sdsType="primary" sdsStyle="square">
1413
- Label
1414
- </Button>
1415
- </div>
1416
- );
1417
- }
1418
-
1419
- export default App;
1420
- ```
1421
-
1422
- **/index.tsx**
1423
-
1424
- ```tsx
1425
- import React from "react";
1426
- import { createRoot } from "react-dom/client";
1427
- import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
1428
- import { StyledEngineProvider, ThemeProvider } from "@mui/material/styles";
1429
- import { Theme } from "@czi-sds/components";
1430
- import CssBaseline from "@mui/material/CssBaseline";
1431
- import useMediaQuery from "@mui/material/useMediaQuery";
1432
-
1433
- import App from "./App";
1434
-
1435
- const container = document.getElementById("root");
1436
- const root = createRoot(container!);
1437
-
1438
- const RootApp = () => {
1439
- const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
1440
- const theme = prefersDarkMode ? Theme("dark") : Theme("light");
1441
-
1442
- return (
1443
- <StyledEngineProvider injectFirst>
1444
- <ThemeProvider theme={theme}>
1445
- <EmotionThemeProvider theme={theme}>
1446
- <CssBaseline />
1447
- <App />
1448
- </EmotionThemeProvider>
1449
- </ThemeProvider>
1450
- </StyledEngineProvider>
1451
- );
1452
- };
1453
-
1454
- root.render(
1455
- <React.StrictMode>
1456
- <RootApp />
1457
- </React.StrictMode>
1458
- );
1459
- ```
1460
-
1461
- **/public/index.html**
1462
-
1463
- ```html
1464
- <!doctype html>
1465
- <html lang="en">
1466
- <head>
1467
- <meta charset="UTF-8" />
1468
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
1469
- <title>Button</title>
1470
- <link rel="preconnect" href="https://fonts.googleapis.com" />
1471
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
1472
- <link
1473
- href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap"
1474
- rel="stylesheet"
1475
- />
1476
- <link
1477
- href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap"
1478
- rel="stylesheet"
1479
- />
1480
- </head>
1481
- <body>
1482
- <div id="root"></div>
1483
- </body>
1484
- </html>
1485
- ```
1486
-
1487
- **/package.json**
1488
-
1489
- ```json
1490
- {
1491
- "dependencies": {
1492
- "react": "^18.0.0",
1493
- "react-dom": "^18.0.0",
1494
- "react-scripts": "^4.0.0"
1495
- },
1496
- "devDependencies": {
1497
- "@types/react": "^18.0.0",
1498
- "@types/react-dom": "^18.0.0",
1499
- "typescript": "^4.0.0"
1500
- },
1501
- "main": "/index.tsx"
1502
- }
1503
- ```
1504
-
1505
- ---
1506
-
1507
- #### Button + Icon
1508
-
1509
- This example shows a `Secondary` button component with an icon.
1510
-
1511
- **/styles.css**
1512
-
1513
- ```css
1514
- body {
1515
- font-size: 13px;
1516
- font-weight: 400;
1517
- letter-spacing: 0.08px;
1518
- line-height: 20px;
1519
- text-transform: none;
1520
- font-family: "Inter", sans-serif;
1521
- }
1522
-
1523
- h1 {
1524
- font-size: 1.5rem;
1525
- }
1526
-
1527
- .app {
1528
- padding: 20px;
1529
- }
1530
- ```
1531
-
1532
- **tsconfig.json**
1533
-
1534
- ```json
1535
- {
1536
- "include": ["./**/*"],
1537
- "compilerOptions": {
1538
- "strict": true,
1539
- "esModuleInterop": true,
1540
- "lib": ["dom", "es2015"],
1541
- "jsx": "react-jsx"
1542
- }
1543
- }
1544
- ```
1545
-
1546
- **/App.tsx**
1547
-
1548
- ```tsx
1549
- import { Button, Icon } from "@czi-sds/components";
1550
- import "./styles.css";
1551
-
1552
- function App() {
1553
- return (
1554
- <div className="app">
1555
- <Button
1556
- sdsType="secondary"
1557
- sdsStyle="square"
1558
- startIcon={<Icon sdsIcon="Download" sdsSize="s" sdsType="button" />}
1559
- >
1560
- Download
1561
- </Button>
1562
- </div>
1563
- );
1564
- }
1565
-
1566
- export default App;
1567
- ```
1568
-
1569
- **/index.tsx**
1570
-
1571
- ```tsx
1572
- import React from "react";
1573
- import { createRoot } from "react-dom/client";
1574
- import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
1575
- import { StyledEngineProvider, ThemeProvider } from "@mui/material/styles";
1576
- import { Theme } from "@czi-sds/components";
1577
- import CssBaseline from "@mui/material/CssBaseline";
1578
- import useMediaQuery from "@mui/material/useMediaQuery";
1579
-
1580
- import App from "./App";
1581
-
1582
- const container = document.getElementById("root");
1583
- const root = createRoot(container!);
1584
-
1585
- const RootApp = () => {
1586
- const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
1587
- const theme = prefersDarkMode ? Theme("dark") : Theme("light");
1588
-
1589
- return (
1590
- <StyledEngineProvider injectFirst>
1591
- <ThemeProvider theme={theme}>
1592
- <EmotionThemeProvider theme={theme}>
1593
- <CssBaseline />
1594
- <App />
1595
- </EmotionThemeProvider>
1596
- </ThemeProvider>
1597
- </StyledEngineProvider>
1598
- );
1599
- };
1600
-
1601
- root.render(
1602
- <React.StrictMode>
1603
- <RootApp />
1604
- </React.StrictMode>
1605
- );
1606
- ```
1607
-
1608
- **/public/index.html**
1609
-
1610
- ```html
1611
- <!doctype html>
1612
- <html lang="en">
1613
- <head>
1614
- <meta charset="UTF-8" />
1615
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
1616
- <title>Button</title>
1617
- <link rel="preconnect" href="https://fonts.googleapis.com" />
1618
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
1619
- <link
1620
- href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap"
1621
- rel="stylesheet"
1622
- />
1623
- <link
1624
- href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap"
1625
- rel="stylesheet"
1626
- />
1627
- </head>
1628
- <body>
1629
- <div id="root"></div>
1630
- </body>
1631
- </html>
1632
- ```
1633
-
1634
- **/package.json**
1635
-
1636
- ```json
1637
- {
1638
- "dependencies": {
1639
- "react": "^18.0.0",
1640
- "react-dom": "^18.0.0",
1641
- "react-scripts": "^4.0.0"
1642
- },
1643
- "devDependencies": {
1644
- "@types/react": "^18.0.0",
1645
- "@types/react-dom": "^18.0.0",
1646
- "typescript": "^4.0.0"
1647
- },
1648
- "main": "/index.tsx"
1649
- }
1650
- ```
1651
-
1652
- ---
1653
-
1654
- #### Icon Button
1655
-
1656
- This example shows a `icon` style button component.
1657
-
1658
- **/styles.css**
1659
-
1660
- ```css
1661
- body {
1662
- font-size: 13px;
1663
- font-weight: 400;
1664
- letter-spacing: 0.08px;
1665
- line-height: 20px;
1666
- text-transform: none;
1667
- font-family: "Inter", sans-serif;
1668
- }
1669
-
1670
- h1 {
1671
- font-size: 1.5rem;
1672
- }
1673
-
1674
- .app {
1675
- padding: 20px;
1676
- }
1677
- ```
1678
-
1679
- **tsconfig.json**
1680
-
1681
- ```json
1682
- {
1683
- "include": ["./**/*"],
1684
- "compilerOptions": {
1685
- "strict": true,
1686
- "esModuleInterop": true,
1687
- "lib": ["dom", "es2015"],
1688
- "jsx": "react-jsx"
1689
- }
1690
- }
1691
- ```
1692
-
1693
- **/App.tsx**
1694
-
1695
- ```tsx
1696
- import { Button, Icon } from "@czi-sds/components";
1697
- import "./styles.css";
1698
-
1699
- function App() {
1700
- return (
1701
- <div className="app">
1702
- <Button sdsType="primary" sdsStyle="icon" icon="Download" />
1703
- </div>
1704
- );
1705
- }
1706
-
1707
- export default App;
1708
- ```
1709
-
1710
- **/index.tsx**
1711
-
1712
- ```tsx
1713
- import React from "react";
1714
- import { createRoot } from "react-dom/client";
1715
- import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
1716
- import { StyledEngineProvider, ThemeProvider } from "@mui/material/styles";
1717
- import { Theme } from "@czi-sds/components";
1718
- import CssBaseline from "@mui/material/CssBaseline";
1719
- import useMediaQuery from "@mui/material/useMediaQuery";
1720
-
1721
- import App from "./App";
1722
-
1723
- const container = document.getElementById("root");
1724
- const root = createRoot(container!);
1725
-
1726
- const RootApp = () => {
1727
- const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
1728
- const theme = prefersDarkMode ? Theme("dark") : Theme("light");
1729
-
1730
- return (
1731
- <StyledEngineProvider injectFirst>
1732
- <ThemeProvider theme={theme}>
1733
- <EmotionThemeProvider theme={theme}>
1734
- <CssBaseline />
1735
- <App />
1736
- </EmotionThemeProvider>
1737
- </ThemeProvider>
1738
- </StyledEngineProvider>
1739
- );
1740
- };
1741
-
1742
- root.render(
1743
- <React.StrictMode>
1744
- <RootApp />
1745
- </React.StrictMode>
1746
- );
1747
- ```
1844
+ ---
1748
1845
 
1749
- **/public/index.html**
1846
+ ### ButtonIcon
1750
1847
 
1751
- ```html
1752
- <!doctype html>
1753
- <html lang="en">
1754
- <head>
1755
- <meta charset="UTF-8" />
1756
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
1757
- <title>Button</title>
1758
- <link rel="preconnect" href="https://fonts.googleapis.com" />
1759
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
1760
- <link
1761
- href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap"
1762
- rel="stylesheet"
1763
- />
1764
- <link
1765
- href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap"
1766
- rel="stylesheet"
1767
- />
1768
- </head>
1769
- <body>
1770
- <div id="root"></div>
1771
- </body>
1772
- </html>
1773
- ```
1774
-
1775
- **/package.json**
1776
-
1777
- ```json
1778
- {
1779
- "dependencies": {
1780
- "react": "^18.0.0",
1781
- "react-dom": "^18.0.0",
1782
- "react-scripts": "^4.0.0"
1783
- },
1784
- "devDependencies": {
1785
- "@types/react": "^18.0.0",
1786
- "@types/react-dom": "^18.0.0",
1787
- "typescript": "^4.0.0"
1788
- },
1789
- "main": "/index.tsx"
1790
- }
1791
- ```
1792
-
1793
- ---
1794
-
1795
- ---
1796
-
1797
- ## ButtonDropdown
1798
-
1799
- ### SDS Source Code
1800
-
1801
- The component's source code in the SDS codebase can be found here.
1802
-
1803
- ### SDS vs MUI
1804
-
1805
- The SDS `ButtonDropdown` component is just the regular `Button` component, with the `chevronDown` icon added at the end of the button after the label text, via the MUI `endIcon` prop. Additionally, `ButtonDropdown` requires a `startIcon`. In SDS, both the `endIcon` and `startIcon` props take the `Icon` component, which references the specific icon to call as one of its props, like so:
1806
-
1807
- `startIcon={<Icon sdsIcon="download" sdsSize="s" sdsType="button" />}`
1808
-
1809
- whereas MUI expects the prop to receive an individual icon as its own component (for example`startIcon={<DeleteIcon />}`).
1810
-
1811
- Since `ButtonIcon` is very similar to SDS's `Button` component, similar caveats apply in terms of the MUI props. The following props are available to MUI's `Button` component, but produce no effect (or unexpected effects) for SDS's `ButtonIcon` component, so it is recommended to not use them:
1812
-
1813
- - **`variant`\*\***:\*\* This prop is intended to set the `Button` to either `text` only, `contained`, or `outlined`. With SDS's `ButtonIcon`, however, they do not function as described in the MUI documentation; however, similar effects, specific to SDS's styles, can be achieved through a combination of the SDS-only `sdsStyle` and `sdsType` props (see below).
1814
- - **`color`\*\***:\*\* This prop doesn't work as expected for SDS's `ButtonIcon`, which doesn't support colors or intents. The `sdsType` prop can be used to set the button as `primary` or `secondary`, though.
1815
- - **`size`\*\***:\*\* This prop is not supported for SDS's `ButtonIcon`
1816
- - **`disableElevation`\*\***:\*\* The SDS `ButtonIcon` component doesn't have a visual "elevation" or shadowed treatment by default (which this prop disables for MUI's `Button`). However, setting `disableElevation={false}` will not render the MUI default elevation treatment.
1817
-
1818
- SDS's `ButtonIcon` has additional props to allow flexibility while maintaining the SDS styles:
1819
-
1820
- - **`sdsStyle`\*\***:\*\* takes `minimal` (default), `rounded`, or `square` as values
1821
- - **`sdsType`\*\***:\*\* takes `primary` (default, filled) or `secondary` (outlined) as values
1822
-
1823
- ### MUI Documentation
1824
-
1825
- Documentation for the underlying MUI component can be found here.
1826
-
1827
- ### Props
1828
-
1829
- Any custom SDS props and MUI props required for implementation are found on the table below. See the MUI documentation for additional optional props.
1830
-
1831
- | Name | Type | Default | Description |
1832
- | -------------- | -------------------- | ----------------------------------- | ------------------------------------------ | --------------------------------------------- | -------------------- |
1833
- | `icon` | `SDSIcon | React.ReactElement<CustomSVGProps>` | `-` | An `icon` element placed before the children. |
1834
- | `sdsStyle` | `"icon"` ` | "rounded"` ` | "square"` | `-` | Style of the button. |
1835
- | `sdsType` | `"primary" | "secondary"` | `-` | Type of the button. |
1836
- | `sdsSize` | `"small" | "medium" | "large"` | `"medium"` | Size of the icon. |
1837
- | `sdsIconProps` | `Partial<IconProps>` | `-` | Props for the icon if an SDS icon is used. |
1838
-
1839
- ### Code examples
1840
-
1841
- #### **Default ButtonDropdown**
1842
-
1843
- This example has the minimum props needed for the `ButtonDropdown` component.
1844
-
1845
- **/styles.css**
1846
-
1847
- ```css
1848
- body {
1849
- font-size: 13px;
1850
- font-weight: 400;
1851
- letter-spacing: 0.08px;
1852
- line-height: 20px;
1853
- text-transform: none;
1854
- font-family: "Inter", sans-serif;
1855
- }
1856
-
1857
- h1 {
1858
- font-size: 1.5rem;
1859
- }
1860
-
1861
- .app {
1862
- padding: 20px;
1863
- }
1864
- ```
1865
-
1866
- **tsconfig.json**
1867
-
1868
- ```json
1869
- {
1870
- "include": ["./**/*"],
1871
- "compilerOptions": {
1872
- "strict": true,
1873
- "esModuleInterop": true,
1874
- "lib": ["dom", "es2015"],
1875
- "jsx": "react-jsx"
1876
- }
1877
- }
1878
- ```
1879
-
1880
- **/App.tsx**
1881
-
1882
- ```tsx
1883
- import { ButtonDropdown } from "@czi-sds/components";
1884
- import "./styles.css";
1885
-
1886
- function App() {
1887
- return (
1888
- <div className="app">
1889
- <ButtonDropdown sdsType="primary" sdsStyle="square">
1890
- Label
1891
- </ButtonDropdown>
1892
- </div>
1893
- );
1894
- }
1895
-
1896
- export default App;
1897
- ```
1898
-
1899
- **/index.tsx**
1900
-
1901
- ```tsx
1902
- import React from "react";
1903
- import { createRoot } from "react-dom/client";
1904
- import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
1905
- import { StyledEngineProvider, ThemeProvider } from "@mui/material/styles";
1906
- import { Theme } from "@czi-sds/components";
1907
- import CssBaseline from "@mui/material/CssBaseline";
1908
- import useMediaQuery from "@mui/material/useMediaQuery";
1909
-
1910
- import App from "./App";
1911
-
1912
- const container = document.getElementById("root");
1913
- const root = createRoot(container!);
1914
-
1915
- const RootApp = () => {
1916
- const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
1917
- const theme = prefersDarkMode ? Theme("dark") : Theme("light");
1918
-
1919
- return (
1920
- <StyledEngineProvider injectFirst>
1921
- <ThemeProvider theme={theme}>
1922
- <EmotionThemeProvider theme={theme}>
1923
- <CssBaseline />
1924
- <App />
1925
- </EmotionThemeProvider>
1926
- </ThemeProvider>
1927
- </StyledEngineProvider>
1928
- );
1929
- };
1930
-
1931
- root.render(
1932
- <React.StrictMode>
1933
- <RootApp />
1934
- </React.StrictMode>
1935
- );
1936
- ```
1937
-
1938
- **/public/index.html**
1939
-
1940
- ```html
1941
- <!doctype html>
1942
- <html lang="en">
1943
- <head>
1944
- <meta charset="UTF-8" />
1945
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
1946
- <title>Button</title>
1947
- <link rel="preconnect" href="https://fonts.googleapis.com" />
1948
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
1949
- <link
1950
- href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap"
1951
- rel="stylesheet"
1952
- />
1953
- <link
1954
- href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap"
1955
- rel="stylesheet"
1956
- />
1957
- </head>
1958
- <body>
1959
- <div id="root"></div>
1960
- </body>
1961
- </html>
1962
- ```
1963
-
1964
- **/package.json**
1965
-
1966
- ```json
1967
- {
1968
- "dependencies": {
1969
- "react": "^18.0.0",
1970
- "react-dom": "^18.0.0",
1971
- "react-scripts": "^4.0.0"
1972
- },
1973
- "devDependencies": {
1974
- "@types/react": "^18.0.0",
1975
- "@types/react-dom": "^18.0.0",
1976
- "typescript": "^4.0.0"
1977
- },
1978
- "main": "/index.tsx"
1979
- }
1980
- ```
1981
-
1982
- ---
1983
-
1984
- #### ButtonDropdown with a start icon
1985
-
1986
- This example shows how to incorporate a starting icon within a `ButtonDropdown` component.
1987
-
1988
- **/styles.css**
1989
-
1990
- ```css
1991
- body {
1992
- font-size: 13px;
1993
- font-weight: 400;
1994
- letter-spacing: 0.08px;
1995
- line-height: 20px;
1996
- text-transform: none;
1997
- font-family: "Inter", sans-serif;
1998
- }
1999
-
2000
- h1 {
2001
- font-size: 1.5rem;
2002
- }
2003
-
2004
- .app {
2005
- padding: 20px;
2006
- }
2007
- ```
2008
-
2009
- **tsconfig.json**
2010
-
2011
- ```json
2012
- {
2013
- "include": ["./**/*"],
2014
- "compilerOptions": {
2015
- "strict": true,
2016
- "esModuleInterop": true,
2017
- "lib": ["dom", "es2015"],
2018
- "jsx": "react-jsx"
2019
- }
2020
- }
2021
- ```
2022
-
2023
- **/App.tsx**
2024
-
2025
- ```tsx
2026
- import { ButtonDropdown, Icon } from "@czi-sds/components";
2027
- import "./styles.css";
2028
-
2029
- function App() {
2030
- return (
2031
- <div className="app">
2032
- <ButtonDropdown
2033
- icon={<Icon sdsIcon="Bacteria" sdsSize="s" sdsType="button" />}
2034
- sdsType="primary"
2035
- sdsStyle="square"
2036
- >
2037
- Bacteria Types
2038
- </ButtonDropdown>
2039
- </div>
2040
- );
2041
- }
2042
-
2043
- export default App;
2044
- ```
2045
-
2046
- **/index.tsx**
2047
-
2048
- ```tsx
2049
- import React from "react";
2050
- import { createRoot } from "react-dom/client";
2051
- import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
2052
- import { StyledEngineProvider, ThemeProvider } from "@mui/material/styles";
2053
- import { Theme } from "@czi-sds/components";
2054
- import CssBaseline from "@mui/material/CssBaseline";
2055
- import useMediaQuery from "@mui/material/useMediaQuery";
2056
-
2057
- import App from "./App";
2058
-
2059
- const container = document.getElementById("root");
2060
- const root = createRoot(container!);
2061
-
2062
- const RootApp = () => {
2063
- const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
2064
- const theme = prefersDarkMode ? Theme("dark") : Theme("light");
2065
-
2066
- return (
2067
- <StyledEngineProvider injectFirst>
2068
- <ThemeProvider theme={theme}>
2069
- <EmotionThemeProvider theme={theme}>
2070
- <CssBaseline />
2071
- <App />
2072
- </EmotionThemeProvider>
2073
- </ThemeProvider>
2074
- </StyledEngineProvider>
2075
- );
2076
- };
2077
-
2078
- root.render(
2079
- <React.StrictMode>
2080
- <RootApp />
2081
- </React.StrictMode>
2082
- );
2083
- ```
2084
-
2085
- **/public/index.html**
2086
-
2087
- ```html
2088
- <!doctype html>
2089
- <html lang="en">
2090
- <head>
2091
- <meta charset="UTF-8" />
2092
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
2093
- <title>Button</title>
2094
- <link rel="preconnect" href="https://fonts.googleapis.com" />
2095
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
2096
- <link
2097
- href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap"
2098
- rel="stylesheet"
2099
- />
2100
- <link
2101
- href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap"
2102
- rel="stylesheet"
2103
- />
2104
- </head>
2105
- <body>
2106
- <div id="root"></div>
2107
- </body>
2108
- </html>
2109
- ```
2110
-
2111
- **/package.json**
2112
-
2113
- ```json
2114
- {
2115
- "dependencies": {
2116
- "react": "^18.0.0",
2117
- "react-dom": "^18.0.0",
2118
- "react-scripts": "^4.0.0"
2119
- },
2120
- "devDependencies": {
2121
- "@types/react": "^18.0.0",
2122
- "@types/react-dom": "^18.0.0",
2123
- "typescript": "^4.0.0"
2124
- },
2125
- "main": "/index.tsx"
2126
- }
2127
- ```
2128
-
2129
- ---
2130
-
2131
- ---
2132
-
2133
- ## ButtonToggle
2134
-
2135
- ### SDS Source Code
2136
-
2137
- The component's source code in the SDS codebase can be found here.
2138
-
2139
- ### MUI Documentation
2140
-
2141
- Documentation for the underlying MUI component can be found here.
2142
-
2143
- ### Props
2144
-
2145
- Any custom SDS props and MUI props required for implementation are found on the table below. See the MUI documentation for additional optional props.
2146
-
2147
- | Name | Type | Default | Description |
2148
- | ---------- | ---------- | ----------------------------------- | ---------------------------------------------- | -------------------------------------------------- | ----------------- |
2149
- | `icon` | `SDSIcon | React.ReactElement<CustomSVGProps>` | `-` | The `icon` element displayed within the component. |
2150
- | `sdsStage` | `"on"` ` | "off"` | `off` | Controls the toggle stage. |
2151
- | `sdsType` | `"primary" | "secondary"` | `-` | Type of the button. |
2152
- | `sdsSize` | `"small" | "medium" | "large"` | `"medium"` | Size of the icon. |
2153
- | `disabled` | `bool` | `false` | Disables the toggle button when set to `true`. |
2154
-
2155
- ### Code examples
2156
-
2157
- #### **Default ButtonToggle**
2158
-
2159
- This example has the minimum props needed for the `ButtonToggle` component.
2160
-
2161
- **/styles.css**
2162
-
2163
- ```css
2164
- body {
2165
- font-size: 13px;
2166
- font-weight: 400;
2167
- letter-spacing: 0.08px;
2168
- line-height: 20px;
2169
- text-transform: none;
2170
- font-family: "Inter", sans-serif;
2171
- }
2172
-
2173
- h1 {
2174
- font-size: 1.5rem;
2175
- }
2176
-
2177
- .app {
2178
- padding: 20px;
2179
- }
2180
- ```
2181
-
2182
- **tsconfig.json**
2183
-
2184
- ```json
2185
- {
2186
- "include": ["./**/*"],
2187
- "compilerOptions": {
2188
- "strict": true,
2189
- "esModuleInterop": true,
2190
- "lib": ["dom", "es2015"],
2191
- "jsx": "react-jsx"
2192
- }
2193
- }
2194
- ```
2195
-
2196
- **/App.tsx**
2197
-
2198
- ```tsx
2199
- import * as React from "react";
2200
- import { ButtonToggle } from "@czi-sds/components";
2201
- import "./styles.css";
2202
-
2203
- function App() {
2204
- const [toggle, setToggle] = React.useState(0);
2205
-
2206
- return (
2207
- <div className="app">
2208
- <ButtonToggle
2209
- icon="InfoCircle"
2210
- sdsStage={toggle ? "on" : "off"}
2211
- onClick={() => setToggle((prev) => !prev)}
2212
- >
2213
- Label
2214
- </ButtonToggle>
2215
- </div>
2216
- );
2217
- }
2218
-
2219
- export default App;
2220
- ```
2221
-
2222
- **/index.tsx**
2223
-
2224
- ```tsx
2225
- import React from "react";
2226
- import { createRoot } from "react-dom/client";
2227
- import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
2228
- import { StyledEngineProvider, ThemeProvider } from "@mui/material/styles";
2229
- import { Theme } from "@czi-sds/components";
2230
- import CssBaseline from "@mui/material/CssBaseline";
2231
- import useMediaQuery from "@mui/material/useMediaQuery";
2232
-
2233
- import App from "./App";
2234
-
2235
- const container = document.getElementById("root");
2236
- const root = createRoot(container!);
2237
-
2238
- const RootApp = () => {
2239
- const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
2240
- const theme = prefersDarkMode ? Theme("dark") : Theme("light");
2241
-
2242
- return (
2243
- <StyledEngineProvider injectFirst>
2244
- <ThemeProvider theme={theme}>
2245
- <EmotionThemeProvider theme={theme}>
2246
- <CssBaseline />
2247
- <App />
2248
- </EmotionThemeProvider>
2249
- </ThemeProvider>
2250
- </StyledEngineProvider>
2251
- );
2252
- };
2253
-
2254
- root.render(
2255
- <React.StrictMode>
2256
- <RootApp />
2257
- </React.StrictMode>
2258
- );
2259
- ```
2260
-
2261
- **/public/index.html**
2262
-
2263
- ```html
2264
- <!doctype html>
2265
- <html lang="en">
2266
- <head>
2267
- <meta charset="UTF-8" />
2268
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
2269
- <title>Button</title>
2270
- <link rel="preconnect" href="https://fonts.googleapis.com" />
2271
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
2272
- <link
2273
- href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap"
2274
- rel="stylesheet"
2275
- />
2276
- <link
2277
- href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap"
2278
- rel="stylesheet"
2279
- />
2280
- </head>
2281
- <body>
2282
- <div id="root"></div>
2283
- </body>
2284
- </html>
2285
- ```
2286
-
2287
- **/package.json**
2288
-
2289
- ```json
2290
- {
2291
- "dependencies": {
2292
- "react": "^18.0.0",
2293
- "react-dom": "^18.0.0",
2294
- "react-scripts": "^4.0.0"
2295
- },
2296
- "devDependencies": {
2297
- "@types/react": "^18.0.0",
2298
- "@types/react-dom": "^18.0.0",
2299
- "typescript": "^4.0.0"
2300
- },
2301
- "main": "/index.tsx"
2302
- }
2303
- ```
1848
+ Storybook
2304
1849
 
2305
1850
  ---
1851
+
1852
+ ### ButtonDropdown
1853
+
1854
+ Storybook