[ { "component": "ActionList", "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_list.rb", "parameters": [ { "name": "role", "type": "Boolean", "default": "`:list`", "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": "system_arguments", "type": "Hash", "default": "N/A", "description": "[System arguments](/system-arguments)" } ] }, { "component": "ActionList::Divider", "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_list/divider.rb", "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::Heading", "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_list/heading.rb", "parameters": [ { "name": "list_id", "type": "String", "default": "N/A", "description": "The unique identifier of the sub list the heading belongs to. Used internally." }, { "name": "title", "type": "String", "default": "N/A", "description": "Sub list title." }, { "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": "tag", "type": "Symbol", "default": "`:h3`", "description": "Semantic tag for the heading." }, { "name": "system_arguments", "type": "Hash", "default": "N/A", "description": "[System arguments](/system-arguments)" } ] }, { "component": "ActionList::Item", "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_list/item.rb", "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": "N/A", "description": "Item label." }, { "name": "label_classes", "type": "String", "default": "`nil`", "description": "CSS classes that will be added to the label." }, { "name": "content_arguments", "type": "Hash", "default": "`{}`", "description": "[System arguments](/system-arguments) used to construct the item's anchor or span tag." }, { "name": "truncate_label", "type": "Boolean", "default": "`false`", "description": "Truncate label with ellipsis." }, { "name": "href", "type": "String", "default": "`nil`", "description": "Link URL." }, { "name": "role", "type": "String", "default": "`:listitem`", "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." }, { "name": "active", "type": "Boolean", "default": "`false`", "description": "Sets an active state on navigational items." }, { "name": "on_click", "type": "String", "default": "`nil`", "description": "JavaScript to execute when the item is clicked." }, { "name": "id", "type": "String", "default": "`SecureRandom.hex`", "description": "Used internally." }, { "name": "system_arguments", "type": "Hash", "default": "N/A", "description": "[System arguments](/system-arguments)" } ] }, { "component": "ButtonMarketing", "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/button_marketing.rb", "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": "system_arguments", "type": "Hash", "default": "N/A", "description": "[System arguments](/system-arguments)" } ] }, { "component": "Dialog", "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/dialog.rb", "parameters": [ { "name": "id", "type": "String", "default": "`\"dialog-#{(36**3 + rand(36**4)).to_s(36)}\"`", "description": "The id of the dialog." }, { "name": "title", "type": "String", "default": "N/A", "description": "Describes the content of the dialog." }, { "name": "subtitle", "type": "String", "default": "`nil`", "description": "Provides additional context for the dialog, also setting the `aria-describedby` attribute." }, { "name": "size", "type": "Symbol", "default": "`:medium`", "description": "The size of the dialog. One of `:large`, `:medium`, `:medium_portrait`, `:small`, or `:xlarge`." }, { "name": "position", "type": "Symbol", "default": "`:center`", "description": "The position of the dialog. One of `:center`, `:left`, or `:right`." }, { "name": "position_narrow", "type": "Symbol", "default": "`:inherit`", "description": "The position of the dialog when narrow. One of `:bottom`, `:fullscreen`, `:inherit`, `:left`, or `:right`." }, { "name": "visually_hide_title", "type": "Boolean", "default": "`false`", "description": "If true will hide the heading title, while still making it available to Screen Readers." }, { "name": "system_arguments", "type": "Hash", "default": "N/A", "description": "[System arguments](/system-arguments)" } ] }, { "component": "HiddenTextExpander", "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/hidden_text_expander.rb", "parameters": [ { "name": "inline", "type": "Boolean", "default": "`false`", "description": "Whether or not the expander is inline." }, { "name": "button_arguments", "type": "Hash", "default": "`{}`", "description": "[System arguments](/system-arguments) for the button element." }, { "name": "system_arguments", "type": "Hash", "default": "N/A", "description": "[System arguments](/system-arguments)" } ] }, { "component": "Layout", "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/layout.rb", "parameters": [ { "name": "stacking_breakpoint", "type": "Symbol", "default": "`:md`", "description": "When the `Layout` should change from rows into columns. One of `:lg`, `:md`, or `:sm`." }, { "name": "first_in_source", "type": "Symbol", "default": "`:sidebar`", "description": "Which element to render first in the HTML. This will change the keyboard navigation order. One of `:main` or `:sidebar`." }, { "name": "gutter", "type": "Symbol", "default": "`:default`", "description": "The amount of space between the main section and the sidebar. One of `:condensed`, `:default`, `:none`, or `:spacious`." }, { "name": "system_arguments", "type": "Hash", "default": "N/A", "description": "[System arguments](/system-arguments)" } ] }, { "component": "NavList", "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list.rb", "parameters": [ { "name": "selected_item_id", "type": "Symbol", "default": "`nil`", "description": "The ID of the currently selected item. The default is `nil`, meaning no item is selected." }, { "name": "system_arguments", "type": "Hash", "default": "N/A", "description": "[System arguments](/system-arguments)" } ] }, { "component": "NavList::Item", "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/item.rb", "parameters": [ { "name": "selected_item_id", "type": "Symbol", "default": "`nil`", "description": "The ID of the currently selected list item. Used internally." }, { "name": "selected_by_ids", "type": "Array", "default": "`[]`", "description": "The list of IDs that select this item. In other words, if the `selected_item_id` attribute on the parent `NavList` is set to one of these IDs, the item will appear selected." }, { "name": "expanded", "type": "Boolean", "default": "`false`", "description": "Whether this item shows (expands) or hides (collapses) its list of sub items." }, { "name": "sub_item", "type": "Boolean", "default": "`false`", "description": "Whether or not this item is nested under a parent item. Used internally." }, { "name": "system_arguments", "type": "Hash", "default": "N/A", "description": "[System arguments](/system-arguments)" } ] }, { "component": "NavList::Section", "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/nav_list/section.rb", "parameters": [ { "name": "selected_item_id", "type": "Symbol", "default": "`nil`", "description": "The ID of the currently selected item. Used internally." }, { "name": "system_arguments", "type": "Hash", "default": "N/A", "description": "[System arguments](/system-arguments)" } ] }, { "component": "TabNav", "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/tab_nav.rb", "parameters": [ { "name": "tag", "type": "Symbol", "default": "`:nav`", "description": "One of `:div` or `:nav`." }, { "name": "label", "type": "String", "default": "N/A", "description": "Sets an `aria-label` that helps assistive technology users understand the purpose of the links, and distinguish it from similar elements." }, { "name": "body_arguments", "type": "Hash", "default": "`{}`", "description": "[System arguments](/system-arguments) for the body wrapper." }, { "name": "system_arguments", "type": "Hash", "default": "N/A", "description": "[System arguments](/system-arguments)" } ] }, { "component": "TabPanels", "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/tab_panels.rb", "parameters": [ { "name": "label", "type": "String", "default": "N/A", "description": "Sets an `aria-label` that helps assistive technology users understand the purpose of the tabs." }, { "name": "align", "type": "Symbol", "default": "N/A", "description": "One of `:left` or `:right`. - Defaults to left" }, { "name": "body_arguments", "type": "Hash", "default": "`{}`", "description": "[System arguments](/system-arguments) for the body wrapper." }, { "name": "wrapper_arguments", "type": "Hash", "default": "`{}`", "description": "[System arguments](/system-arguments) for the `TabContainer` wrapper." }, { "name": "system_arguments", "type": "Hash", "default": "N/A", "description": "[System arguments](/system-arguments)" } ] }, { "component": "TextField", "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/text_field.rb", "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": "A list of CSS classes to add to the input. Exists for compatibility with Rails form builders." }, { "name": "classes", "type": "String", "default": "N/A", "description": "A list of CSS classes to add to the input. Combined with the `:class` argument." }, { "name": "caption", "type": "String", "default": "N/A", "description": "Caption text to render 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": "Whether or not to visually hide the label. If `true` the label will be hidden visually but still available to screen readers." }, { "name": "size", "type": "Symbol", "default": "N/A", "description": "The size of the field. One of `:large`, `:medium`, or `:small`." }, { "name": "show_clear_button", "type": "Boolean", "default": "N/A", "description": "Whether or not to include a clear button inside the input that clears the input's contents when clicked." }, { "name": "clear_button_id", "type": "String", "default": "N/A", "description": "The HTML id attribute of the clear button." }, { "name": "full_width", "type": "Boolean", "default": "N/A", "description": "Controls whether or not the input takes the full width of its container." }, { "name": "disabled", "type": "Boolean", "default": "N/A", "description": "Whether or not the input should accept keyboard and mouse input." }, { "name": "invalid", "type": "Boolean", "default": "N/A", "description": "If `true`, renders the input in a visually invalid state." }, { "name": "placeholder", "type": "String", "default": "N/A", "description": "Placeholder text." }, { "name": "inset", "type": "Boolean", "default": "N/A", "description": "If `true`, renders the input in a visually inset state." }, { "name": "monospace", "type": "Boolean", "default": "N/A", "description": "If `true`, uses a monospace font for the input field." }, { "name": "leading_visual", "type": "Hash", "default": "N/A", "description": "Renders a leading visual icon before the text field's cursor. The hash will be passed to Primer's [Octicon component](https://primer.style/view-components/components/octicon)." }, { "name": "validation_message", "type": "String", "default": "N/A", "description": "A validation message to display beneath the input. Implicitly sets `invalid` to `true`." }, { "name": "label_arguments", "type": "Hash", "default": "N/A", "description": "System arugments passed to the Rails builder's `#label` method. These arguments will appear as HTML attributes on the `