x
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
<tab-container data-view-component="true"> <div data-view-component="true" class="tabnav"> <ul role="tablist" aria-label="label" data-view-component="true" class="tabnav-tabs"> <li role="presentation" data-view-component="true" class="d-inline-flex"> <button id="tab-1" type="button" role="tab" aria-controls="panel-tab-1" aria-selected="true" data-view-component="true" class="tabnav-tab"> <span data-view-component="true">Tab 1</span> </button></li> <li role="presentation" data-view-component="true" class="d-inline-flex"> <button id="tab-2" type="button" role="tab" aria-controls="panel-tab-2" data-view-component="true" class="tabnav-tab"> <span data-view-component="true">Tab 2</span> </button></li> <li role="presentation" data-view-component="true" class="d-inline-flex"> <button id="tab-3" type="button" role="tab" aria-controls="panel-tab-3" data-view-component="true" class="tabnav-tab"> <span data-view-component="true">Tab 3</span> </button></li> </ul> <button type="button" data-view-component="true" class="Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Extra Button</span> </span> </button> </div> <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>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<%= render(Primer::Alpha::TabPanels.new(label: "label")) do |component| %> <% component.with_tab(selected: true, id: "tab-1") do |tab| %> <% tab.with_panel { "Panel 1" } %> <% tab.with_text { "Tab 1" } %> <% end %> <% component.with_tab(id: "tab-2") do |tab| %> <% tab.with_panel { "Panel 2" } %> <% tab.with_text { "Tab 2" } %> <% end %> <% component.with_tab(id: "tab-3") do |tab| %> <% tab.with_panel { "Panel 3" } %> <% tab.with_text { "Tab 3" } %> <% end %> <% component.with_extra(align: align) do %> <%= render(Primer::Beta::Button.new) { "Extra Button" } %> <% end %><% end %>
No notes provided.
Param | Description | Input |
---|---|---|
— |
|
No assets to display.