forked from primer/view_components
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patharguments.json
More file actions
6753 lines (6753 loc) · 244 KB
/
Copy patharguments.json
File metadata and controls
6753 lines (6753 loc) · 244 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
[
{
"component": "ActionBar",
"status": "alpha",
"a11y_reviewed": false,
"short_name": "ActionBar",
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_bar.rb",
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_bar/default/",
"parameters": [
{
"name": "size",
"type": "Symbol",
"default": "`:medium`",
"description": "One of `:large`, `:medium`, or `:small`."
},
{
"name": "overflow_menu",
"type": "Boolean",
"default": "`true`",
"description": "Whether to render the overflow menu."
},
{
"name": "system_arguments",
"type": "Hash",
"default": "N/A",
"description": "[System arguments](/system-arguments)"
}
]
},
{
"component": "ActionBar::Divider",
"status": "alpha",
"a11y_reviewed": false,
"short_name": "ActionBarDivider",
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_bar/divider.rb",
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_bar/divider/default/",
"parameters": []
},
{
"component": "ActionBar::Item",
"status": "alpha",
"a11y_reviewed": false,
"short_name": "ActionBarItem",
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_bar/item.rb",
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_bar/item/default/",
"parameters": [
{
"name": "item_content",
"type": "String",
"default": "N/A",
"description": "The content to render inside the item."
},
{
"name": "item_arguments",
"type": "Hash",
"default": "N/A",
"description": "[System arguments](/system-arguments)"
}
]
},
{
"component": "ActionList",
"status": "alpha",
"a11y_reviewed": true,
"short_name": "ActionList",
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_list.rb",
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_list/default/",
"parameters": [
{
"name": "id",
"type": "String",
"default": "`self.class.generate_id`",
"description": "HTML ID value."
},
{
"name": "role",
"type": "Boolean",
"default": "`nil`",
"description": "ARIA role describing the function of the list. listbox and menu are a common values."
},
{
"name": "item_classes",
"type": "String",
"default": "`nil`",
"description": "Additional CSS classes to attach to items."
},
{
"name": "scheme",
"type": "Symbol",
"default": "`:full`",
"description": "One of `:full` or `:inset`. `inset` children are offset (vertically and horizontally) from list edges. `full` (default) children are flush (vertically and horizontally) with list edges."
},
{
"name": "show_dividers",
"type": "Boolean",
"default": "`false`",
"description": "Display a divider above each item in the list when it does not follow a header or divider."
},
{
"name": "select_variant",
"type": "Symbol",
"default": "`:none`",
"description": "How items may be selected in the list. One of `:multiple`, `:multiple_checkbox`, `:none`, or `:single`."
},
{
"name": "aria_selection_variant",
"type": "Symbol",
"default": "`:checked`",
"description": "Specifies which aria selection to use. One of `:checked` or `:selected`."
},
{
"name": "form_arguments",
"type": "Hash",
"default": "`{}`",
"description": "Allows an `ActionList` to act as a select list in multi- and single-select modes. Pass the `builder:` and `name:` options to this hash. `builder:` should be an instance of `ActionView::Helpers::FormBuilder`, which are created by the standard Rails `#form_with` and `#form_for` helpers. The `name:` option is the desired name of the field that will be included in the params sent to the server on form submission. *NOTE*: Consider using an [ActionMenu](/components/alpha/actionmenu) instead of using this feature directly."
},
{
"name": "system_arguments",
"type": "Hash",
"default": "N/A",
"description": "[System arguments](/system-arguments)"
}
]
},
{
"component": "ActionList::Divider",
"status": "alpha",
"a11y_reviewed": false,
"short_name": "ActionListDivider",
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_list/divider.rb",
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_list/divider/default/",
"parameters": [
{
"name": "scheme",
"type": "Symbol",
"default": "`:subtle`",
"description": "Display a background color if scheme is `filled`."
},
{
"name": "system_arguments",
"type": "Hash",
"default": "N/A",
"description": "[System arguments](/system-arguments)"
}
]
},
{
"component": "ActionList::FormWrapper",
"status": "alpha",
"a11y_reviewed": false,
"short_name": "ActionListFormWrapper",
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_list/form_wrapper.rb",
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_list/form_wrapper/default/",
"parameters": []
},
{
"component": "ActionList::Heading",
"status": "alpha",
"a11y_reviewed": false,
"short_name": "ActionListHeading",
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_list/heading.rb",
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_list/heading/default/",
"parameters": [
{
"name": "title",
"type": "String",
"default": "N/A",
"description": "Sub list title."
},
{
"name": "heading_level",
"type": "Integer",
"default": "`3`",
"description": "Heading level. Level 2 results in an `<h2>` tag, level 3 an `<h3>` tag, etc."
},
{
"name": "subtitle",
"type": "String",
"default": "`nil`",
"description": "Optional sub list description."
},
{
"name": "scheme",
"type": "Symbol",
"default": "`:subtle`",
"description": "Display a background color if scheme is `filled`."
},
{
"name": "system_arguments",
"type": "Hash",
"default": "N/A",
"description": "[System arguments](/system-arguments)"
}
]
},
{
"component": "ActionList::Item",
"status": "alpha",
"a11y_reviewed": false,
"short_name": "ActionListItem",
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_list/item.rb",
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_list/item/default/",
"parameters": [
{
"name": "list",
"type": "Primer::Alpha::ActionList",
"default": "N/A",
"description": "The list that contains this item. Used internally."
},
{
"name": "parent",
"type": "Primer::Alpha::ActionList::Item",
"default": "`nil`",
"description": "This item's parent item. `nil` if this item is at the root. Used internally."
},
{
"name": "label",
"type": "String",
"default": "`nil`",
"description": "Item label. If no label is provided, content is used."
},
{
"name": "item_id",
"type": "String",
"default": "`nil`",
"description": "An ID that will be attached to the item's `<li>` element as `data-item-id` for distinguishing between items, perhaps in JavaScript."
},
{
"name": "label_classes",
"type": "String",
"default": "`nil`",
"description": "CSS classes that will be added to the label."
},
{
"name": "label_arguments",
"type": "Hash",
"default": "`{}`",
"description": "[System arguments](/system-arguments) used to construct the label."
},
{
"name": "content_arguments",
"type": "Hash",
"default": "`{}`",
"description": "[System arguments](/system-arguments) used to construct the item's anchor or button tag."
},
{
"name": "form_arguments",
"type": "Hash",
"default": "`{}`",
"description": "Allows the item to submit a form on click. The URL passed in the `href:` option will be used as the form action. Pass the `method:` option to this hash to control what kind of request is made, One of `:delete`, `:get`, `:head`, `:patch`, `:post`, or `:put`. The `name:` option is required and specifies the desired name of the field that will be included in the params sent to the server on form submission. Specify the `value:` option to send a custom value to the server; otherwise the value of `name:` is sent."
},
{
"name": "truncate_label",
"type": "Boolean | Symbol",
"default": "`:none`",
"description": "How the label should be truncated when the text does not fit inside the bounds of the list item. One of `false`, `:none`, `:show_tooltip`, `:truncate`, or `true`. Pass `false` or `:none` to wrap label text. Pass `true` or `:truncate` to truncate labels with ellipses. Pass `:show_tooltip` to show the entire label contents in a tooltip when the item is hovered."
},
{
"name": "href",
"type": "String",
"default": "`nil`",
"description": "Link URL."
},
{
"name": "role",
"type": "String",
"default": "`nil`",
"description": "ARIA role describing the function of the item."
},
{
"name": "size",
"type": "Symbol",
"default": "`:medium`",
"description": "Controls block sizing of the item."
},
{
"name": "scheme",
"type": "Symbol",
"default": "`:default`",
"description": "Controls color/style based on behavior."
},
{
"name": "disabled",
"type": "Boolean",
"default": "`false`",
"description": "Disabled items are not clickable and visually dim."
},
{
"name": "description_scheme",
"type": "Symbol",
"default": "`:block`",
"description": "Display description inline with label, or block on the next line. One of `:block` or `:inline`."
},
{
"name": "active",
"type": "Boolean",
"default": "`false`",
"description": "If the parent list's `select_variant` is set to `:single` or `:multiple`, causes this item to render checked."
},
{
"name": "on_click",
"type": "String",
"default": "`nil`",
"description": "JavaScript to execute when the item is clicked."
},
{
"name": "id",
"type": "String",
"default": "`self.class.generate_id`",
"description": "Used internally."
},
{
"name": "system_arguments",
"type": "Hash",
"default": "N/A",
"description": "[System arguments](/system-arguments)"
}
]
},
{
"component": "ActionMenu",
"status": "alpha",
"a11y_reviewed": false,
"short_name": "ActionMenu",
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu.rb",
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/default/",
"parameters": [
{
"name": "system_arguments",
"type": "Hash",
"default": "N/A",
"description": "The arguments accepted by [ActionMenu::PrimaryMenu](/components/alpha/actionmenuprimarymenu)."
}
]
},
{
"component": "ActionMenu::Group",
"status": "alpha",
"a11y_reviewed": true,
"short_name": "ActionMenuGroup",
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/group.rb",
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/group/default/",
"parameters": [
{
"name": "id",
"type": "String",
"default": "`self.class.generate_id`",
"description": "HTML ID value."
},
{
"name": "role",
"type": "Boolean",
"default": "`nil`",
"description": "ARIA role describing the function of the list. listbox and menu are a common values."
},
{
"name": "item_classes",
"type": "String",
"default": "`nil`",
"description": "Additional CSS classes to attach to items."
},
{
"name": "scheme",
"type": "Symbol",
"default": "`:full`",
"description": "One of `:full` or `:inset`. `inset` children are offset (vertically and horizontally) from list edges. `full` (default) children are flush (vertically and horizontally) with list edges."
},
{
"name": "show_dividers",
"type": "Boolean",
"default": "`false`",
"description": "Display a divider above each item in the list when it does not follow a header or divider."
},
{
"name": "select_variant",
"type": "Symbol",
"default": "`:none`",
"description": "How items may be selected in the list. One of `:multiple`, `:multiple_checkbox`, `:none`, or `:single`."
},
{
"name": "aria_selection_variant",
"type": "Symbol",
"default": "`:checked`",
"description": "Specifies which aria selection to use. One of `:checked` or `:selected`."
},
{
"name": "form_arguments",
"type": "Hash",
"default": "`{}`",
"description": "Allows an `ActionList` to act as a select list in multi- and single-select modes. Pass the `builder:` and `name:` options to this hash. `builder:` should be an instance of `ActionView::Helpers::FormBuilder`, which are created by the standard Rails `#form_with` and `#form_for` helpers. The `name:` option is the desired name of the field that will be included in the params sent to the server on form submission. *NOTE*: Consider using an [ActionMenu](/components/alpha/actionmenu) instead of using this feature directly."
},
{
"name": "system_arguments",
"type": "Hash",
"default": "N/A",
"description": "[System arguments](/system-arguments)"
}
]
},
{
"component": "ActionMenu::Heading",
"status": "alpha",
"a11y_reviewed": false,
"short_name": "ActionMenuHeading",
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/heading.rb",
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/heading/default/",
"parameters": []
},
{
"component": "ActionMenu::List",
"status": "alpha",
"a11y_reviewed": false,
"short_name": "ActionMenuList",
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/list.rb",
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/list/default/",
"parameters": [
{
"name": "system_arguments",
"type": "Hash",
"default": "N/A",
"description": "The arguments accepted by [ActionMenu::ListWrapper](/components/alpha/actionmenulistwrapper)"
}
]
},
{
"component": "ActionMenu::ListWrapper",
"status": "alpha",
"a11y_reviewed": true,
"short_name": "ActionMenuListWrapper",
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/list_wrapper.rb",
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/list_wrapper/default/",
"parameters": [
{
"name": "menu_id",
"type": "String",
"default": "N/A",
"description": "ID of the parent menu."
},
{
"name": "system_arguments",
"type": "Hash",
"default": "N/A",
"description": "The arguments accepted by [ActionList](/components/alpha/actionlist)"
}
]
},
{
"component": "ActionMenu::Menu",
"status": "alpha",
"a11y_reviewed": false,
"short_name": "ActionMenuMenu",
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/menu.rb",
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/menu/default/",
"parameters": [
{
"name": "anchor_align",
"type": "Symbol",
"default": "N/A",
"description": "One of `:center`, `:end`, or `:start`."
},
{
"name": "anchor_side",
"type": "Symbol",
"default": "N/A",
"description": "One of `:inside_bottom`, `:inside_center`, `:inside_left`, `:inside_right`, `:inside_top`, `:outside_bottom`, `:outside_left`, `:outside_right`, or `:outside_top`."
},
{
"name": "anchor_when_narrow",
"type": "Symbol",
"default": "N/A",
"description": "One of `:bottom`, `:fullscreen`, `:inherit`, `:left`, or `:right`."
},
{
"name": "menu_id",
"type": "String",
"default": "`self.class.generate_id`",
"description": "Id of the menu."
},
{
"name": "size",
"type": "Symbol",
"default": "`:auto`",
"description": "One of `:auto`, `:large`, `:medium`, `:medium_portrait`, `:small`, or `:xlarge`."
},
{
"name": "src",
"type": "String",
"default": "`nil`",
"description": "Used with an `include-fragment` element to load menu content from the given source URL."
},
{
"name": "preload",
"type": "Boolean",
"default": "`false`",
"description": "When true, and src is present, loads the `include-fragment` on trigger hover."
},
{
"name": "select_variant",
"type": "Symbol",
"default": "`:none`",
"description": "One of `:multiple`, `:none`, or `:single`."
},
{
"name": "form_arguments",
"type": "Hash",
"default": "`{}`",
"description": "Allows an `ActionMenu` to act as a select list in multi- and single-select modes. Pass the `builder:` and `name:` options to this hash. `builder:` should be an instance of `ActionView::Helpers::FormBuilder`, which are created by the standard Rails `#form_with` and `#form_for` helpers. The `name:` option is the desired name of the field that will be included in the params sent to the server on form submission."
},
{
"name": "overlay_arguments",
"type": "Hash",
"default": "`{}`",
"description": "Arguments to pass to the underlying [Overlay](/components/alpha/overlay)"
},
{
"name": "list_arguments",
"type": "Hash",
"default": "`{}`",
"description": "Arguments to pass to the underlying [ActionMenu::List](/components/alpha/actionmenulist)"
},
{
"name": "system_arguments",
"type": "Hash",
"default": "N/A",
"description": "[System arguments](/system-arguments)."
}
]
},
{
"component": "ActionMenu::PrimaryMenu",
"status": "alpha",
"a11y_reviewed": false,
"short_name": "ActionMenuPrimaryMenu",
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/primary_menu.rb",
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/primary_menu/default/",
"parameters": [
{
"name": "anchor_align",
"type": "Symbol",
"default": "`:start`",
"description": "One of `:center`, `:end`, or `:start`."
},
{
"name": "anchor_side",
"type": "Symbol",
"default": "`:outside_bottom`",
"description": "One of `:inside_bottom`, `:inside_center`, `:inside_left`, `:inside_right`, `:inside_top`, `:outside_bottom`, `:outside_left`, `:outside_right`, or `:outside_top`."
},
{
"name": "anchor_when_narrow",
"type": "Symbol",
"default": "`:inherit`",
"description": "One of `:bottom`, `:fullscreen`, `:inherit`, `:left`, or `:right`.."
},
{
"name": "dynamic_label",
"type": "Boolean",
"default": "`false`",
"description": "Whether or not to display the text of the currently selected item in the show button."
},
{
"name": "dynamic_label_prefix",
"type": "String",
"default": "`nil`",
"description": "If provided, the prefix is prepended to the dynamic label and displayed in the show button."
},
{
"name": "system_arguments",
"type": "Hash",
"default": "N/A",
"description": "[System arguments](/system-arguments)."
}
]
},
{
"component": "ActionMenu::SubMenu",
"status": "alpha",
"a11y_reviewed": false,
"short_name": "ActionMenuSubMenu",
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/sub_menu.rb",
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/sub_menu/default/",
"parameters": [
{
"name": "menu_id",
"type": "String",
"default": "`self.class.generate_id`",
"description": "Id of the menu."
},
{
"name": "anchor_align",
"type": "Symbol",
"default": "`:start`",
"description": "One of `:center`, `:end`, or `:start`."
},
{
"name": "anchor_side",
"type": "Symbol",
"default": "`:outside_right`",
"description": "One of `:inside_bottom`, `:inside_center`, `:inside_left`, `:inside_right`, `:inside_top`, `:outside_bottom`, `:outside_left`, `:outside_right`, or `:outside_top`."
},
{
"name": "anchor_when_narrow",
"type": "Symbol",
"default": "`:inherit`",
"description": "One of `:bottom`, `:fullscreen`, `:inherit`, `:left`, or `:right`.."
},
{
"name": "overlay_arguments",
"type": "Hash",
"default": "`{}`",
"description": "Arguments to pass to the underlying [Overlay](/components/alpha/overlay)"
},
{
"name": "system_arguments",
"type": "Hash",
"default": "N/A",
"description": "[System arguments](/system-arguments)."
}
]
},
{
"component": "ActionMenu::SubMenuItem",
"status": "alpha",
"a11y_reviewed": false,
"short_name": "ActionMenuSubMenuItem",
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/sub_menu_item.rb",
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/sub_menu_item/default/",
"parameters": []
},
{
"component": "AutoComplete",
"status": "deprecated",
"a11y_reviewed": false,
"short_name": "AutoComplete",
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/auto_complete.rb",
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/auto_complete/default/",
"parameters": [
{
"name": "label_text",
"type": "String",
"default": "N/A",
"description": "The label of the input."
},
{
"name": "src",
"type": "String",
"default": "N/A",
"description": "The route to query."
},
{
"name": "input_id",
"type": "String",
"default": "N/A",
"description": "Id of the input element."
},
{
"name": "input_name",
"type": "String",
"default": "`nil`",
"description": "Optional name of the input element, defaults to `input_id` when not set."
},
{
"name": "list_id",
"type": "String",
"default": "N/A",
"description": "Id of the list element."
},
{
"name": "with_icon",
"type": "Boolean",
"default": "`false`",
"description": "Controls if a search icon is visible, defaults to `false`."
},
{
"name": "is_label_visible",
"type": "Boolean",
"default": "`true`",
"description": "Controls if the label is visible. If `false`, screen reader only text will be added."
},
{
"name": "is_clearable",
"type": "Boolean",
"default": "`false`",
"description": "Adds optional clear button."
},
{
"name": "is_label_inline",
"type": "Boolean",
"default": "`false`",
"description": "Controls if the label is inline. On smaller screens, label will always become stacked."
},
{
"name": "system_arguments",
"type": "Hash",
"default": "N/A",
"description": "[System arguments](/system-arguments)"
}
]
},
{
"component": "AutoComplete::Item",
"status": "deprecated",
"a11y_reviewed": false,
"short_name": "AutoCompleteItem",
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/auto_complete/item.rb",
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/auto_complete/item/default/",
"parameters": [
{
"name": "value",
"type": "String",
"default": "N/A",
"description": "Value of the item."
},
{
"name": "selected",
"type": "Boolean",
"default": "`false`",
"description": "Whether the item is selected."
},
{
"name": "disabled",
"type": "Boolean",
"default": "`false`",
"description": "Whether the item is disabled."
},
{
"name": "system_arguments",
"type": "Hash",
"default": "N/A",
"description": "[System arguments](/system-arguments)"
}
]
},
{
"component": "Banner",
"status": "alpha",
"a11y_reviewed": false,
"short_name": "Banner",
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/banner.rb",
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/banner/default/",
"parameters": [
{
"name": "tag",
"type": "Symbol",
"default": "`:div`",
"description": "One of `:div` or `:section`."
},
{
"name": "full",
"type": "Boolean",
"default": "`false`",
"description": "Whether the component should take up the full width of the screen."
},
{
"name": "full_when_narrow",
"type": "Boolean",
"default": "`false`",
"description": "Whether the component should take up the full width of the screen when rendered inside smaller viewports."
},
{
"name": "dismiss_scheme",
"type": "Symbol",
"default": "`:none`",
"description": "Whether the component can be dismissed with an \"x\" button. One of `:hide`, `:none`, or `:remove`."
},
{
"name": "dismiss_label",
"type": "String",
"default": "`Dismiss`",
"description": "The aria-label text of the dismiss \"x\" button"
},
{
"name": "description",
"type": "String",
"default": "`nil`",
"description": "Description text rendered underneath the message."
},
{
"name": "icon",
"type": "Symbol",
"default": "`nil`",
"description": "The name of an [Octicon](https://primer.style/octicons/) icon to use. If no icon is provided, a default one will be chosen based on the scheme."
},
{
"name": "scheme",
"type": "Symbol",
"default": "`:default`",
"description": "One of `:danger`, `:default`, `:success`, `:upsell`, or `:warning`."
},
{
"name": "system_arguments",
"type": "Hash",
"default": "N/A",
"description": "[System arguments](/system-arguments)"
}
]
},
{
"component": "ButtonMarketing",
"status": "alpha",
"a11y_reviewed": false,
"short_name": "ButtonMarketing",
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/button_marketing.rb",
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/button_marketing/default/",
"parameters": [
{
"name": "scheme",
"type": "Symbol",
"default": "`:default`",
"description": "One of `:default`, `:outline`, `:primary`, or `:transparent`."
},
{
"name": "variant",
"type": "Symbol",
"default": "`:default`",
"description": "One of `:default` or `:large`."
},
{
"name": "tag",
"type": "Symbol",
"default": "`:button`",
"description": "One of `:a` or `:button`."
},
{
"name": "type",
"type": "Symbol",
"default": "`:button`",
"description": "One of `:button` or `:submit`."
},
{
"name": "disabled",
"type": "Boolean",
"default": "`false`",
"description": "Whether or not the button is disabled. If true, this option forces `tag:` to `:button`."
},
{
"name": "system_arguments",
"type": "Hash",
"default": "N/A",
"description": "[System arguments](/system-arguments)"
}
]
},
{
"component": "CheckBox",
"status": "alpha",
"a11y_reviewed": false,
"short_name": "CheckBox",
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/check_box.rb",
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/check_box/default/",
"parameters": [
{
"name": "name",
"type": "String",
"default": "N/A",
"description": "Value for the HTML name attribute."
},
{
"name": "id",
"type": "String",
"default": "N/A",
"description": "Value for the HTML id attribute."
},
{
"name": "class",
"type": "String",
"default": "N/A",
"description": "CSS classes to include in the input's HTML `class` attribute. Exists for compatibility with Rails form builders."
},
{
"name": "classes",
"type": "Array",
"default": "N/A",
"description": "CSS classes to include in the input's HTML `class` attribute. Combined with the `:class` argument. The list may contain strings, hashes, or `nil` values, and is automatically cleaned up by Primer's [`class_name` helper](https://github.com/primer/view_components/blob/c9cb95c98fee3e2e27f4a10683f555e22285e7f1/app/lib/primer/class_name_helper.rb) (`nils`, falsy entries, and blank strings are ignored)."
},
{
"name": "caption",
"type": "String",
"default": "N/A",
"description": "A string describing the field and what sorts of input it expects. Displayed below the input."
},
{
"name": "label",
"type": "String",
"default": "N/A",
"description": "Label text displayed above the input."
},
{
"name": "visually_hide_label",
"type": "Boolean",
"default": "N/A",
"description": "When set to `true`, hides the label. Although the label will be hidden visually, it will still be visible to screen readers."
},
{
"name": "disabled",
"type": "Boolean",
"default": "N/A",
"description": "When set to `true`, the input will not accept keyboard or mouse input."
},
{
"name": "hidden",
"type": "Boolean",
"default": "N/A",
"description": "When set to `true`, visually hides the field."
},
{
"name": "invalid",
"type": "Boolean",
"default": "N/A",
"description": "If set to `true`, the input will be rendered with a red border. Implied if `validation_message` is truthy. This option is set to `true` automatically if the model object associated with the form reports that the input is invalid via Rails validations. It is provided for cases where the form does not have an associated model. If the input is invalid as determined by Rails validations, setting `invalid` to `false` will have no effect."
},
{
"name": "validation_message",
"type": "String",
"default": "N/A",
"description": "A string displayed between the caption and the input indicating the input's contents are invalid. This option is, by default, set to the first Rails validation message for the input (assuming the form is associated with a model object). Use `validation_message` to override the default or to provide a validation message in case there is no associated model object."
},
{
"name": "label_arguments",
"type": "Hash",
"default": "N/A",
"description": "Attributes that will be passed to Rails' `builder.label` method. These can be HTML attributes or any of the other label options Rails supports. They will appear as HTML attributes on the `<label>` tag."
},
{
"name": "scope_name_to_model",
"type": "Boolean",
"default": "N/A",
"description": "Default `true`. When set to `false`, prevents the model name from prefixing the field name. For example, if the field name is `my_field`, Rails will normally emit an HTML name attribute of `model[my_field]`. Setting `scope_name_to_model` to `false` will cause Rails to emit `my_field` instead."
},
{
"name": "scope_id_to_model",
"type": "Boolean",
"default": "N/A",
"description": "Default `true`. When set to `false`, prevents the model name from prefixing the field ID. For example, if the field name is `my_field`, Rails will normally emit an HTML ID attribute of `model_my_field`. Setting `scope_id_to_model` to `false` will cause Rails to emit `my_field` instead."
},
{
"name": "required",
"type": "Boolean",
"default": "N/A",
"description": "Default `false`. When set to `true`, causes an asterisk (*) to appear next to the field's label indicating it is a required field. Note that this option explicitly does _not_ add a `required` HTML attribute. Doing so would enable native browser validations, which are inaccessible and inconsistent with the Primer design system."
},
{
"name": "aria",
"type": "Hash",
"default": "N/A",
"description": "Key/value pairs that represent Aria attributes and their values. Eg. `aria: { current: true }` becomes `aria-current=\"true\"`."
},
{
"name": "data",
"type": "Hash",
"default": "N/A",
"description": "Key/value pairs that represent data attributes and their values. Eg. `data: { foo: \"bar\" }` becomes `data-foo=\"bar\"`."
},
{
"name": "system_arguments",
"type": "Hash",
"default": "N/A",
"description": "A hash of attributes passed to the underlying Rails builder methods. These options may mean something special depending on the type of input, otherwise they are emitted as HTML attributes. See the [Rails documentation](https://guides.rubyonrails.org/form_helpers.html) for more information. In addition, the usual Primer utility arguments are accepted in system arguments. For example, passing `mt: 2` will add the `mt-2` class to the input. See the Primer system arguments docs for details."
},
{
"name": "name",
"type": "String",
"default": "N/A",
"description": "Value for the HTML name attribute."
},
{
"name": "value",
"type": "String",
"default": "N/A",
"description": "On form submission, this value will be sent to the server if the check box is checked. Defaults to \"1\"."
},
{
"name": "unchecked_value",
"type": "String",
"default": "N/A",
"description": "On form submission, this value will be sent to the server if the check box is _not_ checked. Defaults to \"0\"."
},
{
"name": "scheme",
"type": "Symbol",
"default": "N/A",
"description": "Controls how check box values are submitted to the server. One of `:array` or `:boolean`.."
}
]
},
{
"component": "CheckBoxGroup",
"status": "alpha",
"a11y_reviewed": false,
"short_name": "CheckBoxGroup",
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/check_box_group.rb",
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/check_box_group/default/",
"parameters": [
{
"name": "name",
"type": "String",
"default": "N/A",
"description": "Value for the HTML name attribute. When provided, the check box values will be submitted in to the server in `:array` mode. See the [CheckBox](/components/alpha/checkbox) for more information."
},
{