[ { "fully_qualified_name": "Primer::Alpha::ActionBar", "description": "Add a general description of component here\nAdd additional usage considerations or best practices that may aid the user to use the component correctly.", "accessibility_docs": null, "is_form_component": false, "is_published": true, "requires_js": false, "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": "{{link_to_system_arguments_docs}}" } ], "slots": [ { "name": "items", "description": null, "parameters": [ ] } ], "methods": [ ], "previews": [ { "preview_path": "primer/alpha/action_bar/default", "name": "default", "snapshot": "true", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } }, { "preview_path": "primer/alpha/action_bar/inline", "name": "inline", "snapshot": "false", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } }, { "preview_path": "primer/alpha/action_bar/playground", "name": "playground", "snapshot": "false", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } }, { "preview_path": "primer/alpha/action_bar/small", "name": "small", "snapshot": "false", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } }, { "preview_path": "primer/alpha/action_bar/medium", "name": "medium", "snapshot": "false", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } }, { "preview_path": "primer/alpha/action_bar/large", "name": "large", "snapshot": "false", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } } ], "subcomponents": [ { "fully_qualified_name": "Primer::Alpha::ActionBar::Item", "description": "ActionBar::Item is an internal component that wraps the items in a div with the `ActionBar-item` class.", "accessibility_docs": null, "is_form_component": false, "is_published": true, "requires_js": false, "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": "{{link_to_system_arguments_docs}}" } ], "slots": [ ], "methods": [ ], "previews": [ ], "subcomponents": [ ] }, { "fully_qualified_name": "Primer::Alpha::ActionBar::Divider", "description": "ActionBar::Item is an internal component that wraps the items in a div with the `ActionBar-item` class.", "accessibility_docs": null, "is_form_component": false, "is_published": true, "requires_js": false, "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": [ ], "slots": [ ], "methods": [ ], "previews": [ ], "subcomponents": [ ] } ] }, { "fully_qualified_name": "Primer::Alpha::ActionList", "description": "An ActionList is a styled list of links. It acts as the base component for many\nother menu-type components, including `ActionMenu` and `SelectPanel`, as well as\nthe navigational component `NavList`.\n\nEach item in an action list can be augmented by specifying corresponding leading\nand/or trailing visuals.", "accessibility_docs": null, "is_form_component": false, "is_published": true, "requires_js": true, "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 {{#link_to_component}}Primer::Alpha::ActionMenu{{/link_to_component}} instead of using this feature directly." }, { "name": "system_arguments", "type": "Hash", "default": "N/A", "description": "{{link_to_system_arguments_docs}}" } ], "slots": [ { "name": "heading", "description": "Heading text rendered above the list of items.", "parameters": [ { "name": "component_klass", "type": "Class", "default": "N/A", "description": "The class to use instead of the default {{#link_to_component}}Primer::Alpha::ActionList::Heading{{/link_to_component}}." }, { "name": "system_arguments", "type": "Hash", "default": "N/A", "description": "The arguments accepted by `component_klass`." } ] }, { "name": "items", "description": "Items. Items can be individual items, avatar items, or dividers. See the documentation for `#with_item`, `#with_divider`, and `#with_avatar_item` respectively for more information.", "parameters": [ ] } ], "methods": [ { "name": "with_item", "description": "Adds an item to the list.", "parameters": [ { "name": "component_klass", "type": "Class", "default": "N/A", "description": "The class to use instead of the default {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}" }, { "name": "system_arguments", "type": "Hash", "default": "N/A", "description": "These arguments are forwarded to {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}, or whatever class is passed as the `component_klass` argument." } ], "return_types": [ ] }, { "name": "with_divider", "description": "Adds a divider to the list. Dividers visually separate items.", "parameters": [ { "name": "system_arguments", "type": "Hash", "default": "N/A", "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Divider{{/link_to_component}}." } ], "return_types": [ ] }, { "name": "with_avatar_item", "description": "Adds an avatar item to the list. Avatar items are a convenient way to accessibly add an item with a leading avatar image.", "parameters": [ { "name": "src", "type": "String", "default": "N/A", "description": "The source url of the avatar image." }, { "name": "username", "type": "String", "default": "N/A", "description": "The username associated with the avatar." }, { "name": "full_name", "type": "String", "default": "`nil`", "description": "Optional. The user's full name." }, { "name": "full_name_scheme", "type": "Symbol", "default": "`:block`", "description": "Optional. How to display the user's full name. One of `:block` or `:inline`." }, { "name": "component_klass", "type": "Class", "default": "`ActionList::Item`", "description": "The class to use instead of the default {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}" }, { "name": "avatar_arguments", "type": "Hash", "default": "`{}`", "description": "Optional. The arguments accepted by {{#link_to_component}}Primer::Beta::Avatar{{/link_to_component}}" }, { "name": "system_arguments", "type": "Hash", "default": "N/A", "description": "These arguments are forwarded to {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}, or whatever class is passed as the `component_klass` argument." } ], "return_types": [ ] }, { "name": "id", "description": "Returns the value of attribute id.", "parameters": [ ], "return_types": [ ] }, { "name": "select_variant", "description": "Returns the value of attribute select_variant.", "parameters": [ ], "return_types": [ ] }, { "name": "role", "description": "Returns the value of attribute role.", "parameters": [ ], "return_types": [ ] }, { "name": "aria_selection_variant", "description": "Returns the value of attribute aria_selection_variant.", "parameters": [ ], "return_types": [ ] }, { "name": "build_item", "description": "Builds a new item but does not add it to the list. Use this method\ninstead of the `#with_item` slot if you need to render an item outside\nthe context of a list, eg. if rendering additional items to append to\nan existing list, perhaps via a separate HTTP request.", "parameters": [ { "name": "component_klass", "type": "Class", "default": "`ActionList::Item`", "description": "The class to use instead of the default {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}" }, { "name": "system_arguments", "type": "Hash", "default": "N/A", "description": "These arguments are forwarded to {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}, or whatever class is passed as the `component_klass` argument." } ], "return_types": [ ] }, { "name": "build_avatar_item", "description": "Builds a new avatar item but does not add it to the list. Avatar items\nare a convenient way to accessibly add an item with a leading avatar\nimage. Use this method instead of the `#with_avatar_item` slot if you\nneed to render an avatar item outside the context of a list, eg. if\nrendering additional items to append to an existing list, perhaps via\na separate HTTP request.", "parameters": [ { "name": "src", "type": "String", "default": "N/A", "description": "The source url of the avatar image." }, { "name": "username", "type": "String", "default": "N/A", "description": "The username associated with the avatar." }, { "name": "full_name", "type": "String", "default": "`nil`", "description": "Optional. The user's full name." }, { "name": "full_name_scheme", "type": "Symbol", "default": "`:block`", "description": "Optional. How to display the user's full name. One of `:block` or `:inline`." }, { "name": "component_klass", "type": "Class", "default": "`ActionList::Item`", "description": "The class to use instead of the default {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}" }, { "name": "avatar_arguments", "type": "Hash", "default": "`{}`", "description": "Optional. The arguments accepted by {{#link_to_component}}Primer::Beta::Avatar{{/link_to_component}}" }, { "name": "system_arguments", "type": "Hash", "default": "N/A", "description": "These arguments are forwarded to {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}, or whatever class is passed as the `component_klass` argument." } ], "return_types": [ ] }, { "name": "post_list_content_block", "description": "Returns the value of attribute post_list_content_block.", "parameters": [ ], "return_types": [ ] } ], "previews": [ { "preview_path": "primer/alpha/action_list/playground", "name": "playground", "snapshot": "false", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } }, { "preview_path": "primer/alpha/action_list/default", "name": "default", "snapshot": "true", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } }, { "preview_path": "primer/alpha/action_list/leading_visuals", "name": "leading_visuals", "snapshot": "false", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } }, { "preview_path": "primer/alpha/action_list/with_manual_dividers", "name": "with_manual_dividers", "snapshot": "false", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } }, { "preview_path": "primer/alpha/action_list/divider", "name": "divider", "snapshot": "false", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } }, { "preview_path": "primer/alpha/action_list/heading", "name": "heading", "snapshot": "true", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } }, { "preview_path": "primer/alpha/action_list/item", "name": "item", "snapshot": "false", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } }, { "preview_path": "primer/alpha/action_list/avatar_item", "name": "avatar_item", "snapshot": "false", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } }, { "preview_path": "primer/alpha/action_list/item_default", "name": "item_default", "snapshot": "true", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } }, { "preview_path": "primer/alpha/action_list/item_size_large", "name": "item_size_large", "snapshot": "false", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } }, { "preview_path": "primer/alpha/action_list/item_size_xlarge", "name": "item_size_xlarge", "snapshot": "false", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } }, { "preview_path": "primer/alpha/action_list/item_leading_visual", "name": "item_leading_visual", "snapshot": "false", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } }, { "preview_path": "primer/alpha/action_list/item_trailing_visual", "name": "item_trailing_visual", "snapshot": "false", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } }, { "preview_path": "primer/alpha/action_list/item_leading_trailing_visual", "name": "item_leading_trailing_visual", "snapshot": "true", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } }, { "preview_path": "primer/alpha/action_list/item_with_description", "name": "item_with_description", "snapshot": "true", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } }, { "preview_path": "primer/alpha/action_list/item_with_description_inline", "name": "item_with_description_inline", "snapshot": "true", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } }, { "preview_path": "primer/alpha/action_list/item_trailing_action", "name": "item_trailing_action", "snapshot": "true", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } }, { "preview_path": "primer/alpha/action_list/item_danger", "name": "item_danger", "snapshot": "true", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } }, { "preview_path": "primer/alpha/action_list/item_disabled", "name": "item_disabled", "snapshot": "true", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } }, { "preview_path": "primer/alpha/action_list/item_wrap_label", "name": "item_wrap_label", "snapshot": "false", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } }, { "preview_path": "primer/alpha/action_list/item_truncate_label", "name": "item_truncate_label", "snapshot": "false", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } }, { "preview_path": "primer/alpha/action_list/item_active", "name": "item_active", "snapshot": "true", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } }, { "preview_path": "primer/alpha/action_list/long_label_with_tooltip", "name": "long_label_with_tooltip", "snapshot": "true", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } }, { "preview_path": "primer/alpha/action_list/long_label_wrap", "name": "long_label_wrap", "snapshot": "false", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } }, { "preview_path": "primer/alpha/action_list/long_label_truncate_no_tooltip", "name": "long_label_truncate_no_tooltip", "snapshot": "false", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } }, { "preview_path": "primer/alpha/action_list/long_label_show_tooltip_with_truncate_label", "name": "long_label_show_tooltip_with_truncate_label", "snapshot": "false", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } }, { "preview_path": "primer/alpha/action_list/listbox", "name": "listbox", "snapshot": "false", "skip_rules": { "wont_fix": [ "region" ], "will_fix": [ "color-contrast" ] } } ], "subcomponents": [ { "fully_qualified_name": "Primer::Alpha::ActionList::Item", "description": "An individual `ActionList` item. Items can optionally include leading and/or trailing visuals,\nsuch as icons, avatars, and counters.", "accessibility_docs": null, "is_form_component": false, "is_published": true, "requires_js": false, "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 `