Previews

No matching results.

x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<div data-view-component="true">
<tab-container aria-label="Test navigation" data-view-component="true" class="UnderlineNav UnderlineNav--right">
<div data-view-component="true" class="UnderlineNav-actions">Actions Content</div>
<button id="tab-1" type="button" role="tab" aria-controls="panel-tab-1" aria-selected="true" data-view-component="true" class="UnderlineNav-item">
<span data-view-component="true">Tab 1</span>
</button>
<button id="tab-2" type="button" role="tab" aria-controls="panel-tab-2" data-view-component="true" class="UnderlineNav-item">
<span data-view-component="true">Tab 2</span>
</button>
<button id="tab-3" type="button" role="tab" aria-controls="panel-tab-3" data-view-component="true" class="UnderlineNav-item">
<span data-view-component="true">Tab 3</span>
</button>
<div id="panel-tab-1" role="tabpanel" tabindex="0" aria-labelledby="tab-1" data-view-component="true">Panel 1</div>
<div id="panel-tab-2" role="tabpanel" tabindex="0" hidden="hidden" aria-labelledby="tab-2" data-view-component="true">Panel 2</div>
<div id="panel-tab-3" role="tabpanel" tabindex="0" hidden="hidden" aria-labelledby="tab-3" data-view-component="true">Panel 3</div>
</tab-container></div>
1
2
3
4
5
6
7
8
9
10
11
render(Primer::Alpha::UnderlinePanels.new(label: "Test navigation", align: align)) do |component|
Array.new(number_of_panels || 3) do |i|
component.with_tab(selected: i.zero?, id: "tab-#{i + 1}") do |tab|
tab.with_panel { "Panel #{i + 1}" }
tab.with_text { "Tab #{i + 1}" }
end
end
component.with_actions do
"Actions Content"
end
end
Param Description Input

app/components/primer/alpha/underline_panels.css

1
2
3
4
tab-container.UnderlineNav {
box-shadow: none;
flex-direction: column;
}