class Primer::Alpha::UnderlinePanels
Use ‘UnderlinePanels` to style tabs with an associated panel and an underlined selected state.
def body
def body Primer::BaseComponent.new(**@body_arguments) end
def initialize(label:, align: ALIGN_DEFAULT, body_arguments: {}, wrapper_arguments: {}, **system_arguments)
-
system_arguments
(Hash
) -- <%= link_to_system_arguments_docs %> -
wrapper_arguments
(Hash
) -- <%= link_to_system_arguments_docs %> for the `TabContainer` wrapper. -
body_arguments
(Hash
) -- <%= link_to_system_arguments_docs %> for the body wrapper. -
align
(Symbol
) -- <%= one_of(Primer::UnderlineNavHelper::ALIGN_OPTIONS) %> - Defaults to <%= Primer::UnderlineNavHelper::ALIGN_DEFAULT %> -
label
(String
) -- Sets an `aria-label` that helps assistive technology users understand the purpose of the tabs.
def initialize(label:, align: ALIGN_DEFAULT, body_arguments: {}, wrapper_arguments: {}, **system_arguments) @align = fetch_or_fallback(ALIGN_OPTIONS, align, ALIGN_DEFAULT) @wrapper_arguments = wrapper_arguments @system_arguments = deny_tag_argument(**system_arguments) @system_arguments[:tag] = :div @system_arguments[:classes] = underline_nav_classes(@system_arguments[:classes], @align) @body_arguments = deny_tag_argument(**body_arguments) @body_arguments[:tag] = :ul @body_arguments[:classes] = underline_nav_body_classes(@body_arguments[:classes]) @body_arguments[:role] = :tablist @body_arguments[:"aria-label"] = label end