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
27
28
29
30
31
32
33
34
35
<div data-view-component="true" class="FormControl"> <label data-view-component="true" class="FormControl-label"> Best character </label> <segmented-control> <ul aria-label="Best character" aria-describedby="validation-form-control-36b3e3b0-3697-4289-83e3-a63773335932 caption-form-control-36b3e3b0-3697-4289-83e3-a63773335932" role="list" data-view-component="true" class="SegmentedControl--medium SegmentedControl"> <li class="SegmentedControl-item SegmentedControl-item--selected" role="listitem" data-targets="segmented-control.items"> <button data-action="click:segmented-control#select" aria-current="true" type="button" data-view-component="true" class="Button--invisible Button--medium Button Button--invisible-noVisuals"> <span class="Button-content"> <span class="Button-label">Han Solo</span> </span> </button> </li> <li class="SegmentedControl-item" role="listitem" data-targets="segmented-control.items"> <button data-action="click:segmented-control#select" aria-current="false" type="button" data-view-component="true" class="Button--invisible Button--medium Button Button--invisible-noVisuals"> <span class="Button-content"> <span class="Button-label">Luke Skywalker</span> </span> </button> </li> <li class="SegmentedControl-item" role="listitem" data-targets="segmented-control.items"> <button data-action="click:segmented-control#select" aria-current="false" type="button" data-view-component="true" class="Button--invisible Button--medium Button Button--invisible-noVisuals"> <span class="Button-content"> <span class="Button-label">Leia Organa</span> </span> </button> </li> </ul> </segmented-control> <div id="validation-form-control-36b3e3b0-3697-4289-83e3-a63773335932" data-view-component="true" class="FormControl-inlineValidation"> <span class="FormControl-inlineValidation--visual"><svg aria-hidden="true" height="12" viewBox="0 0 12 12" version="1.1" width="12" data-view-component="true" class="octicon octicon-alert-fill"> <path d="M4.855.708c.5-.896 1.79-.896 2.29 0l4.675 8.351a1.312 1.312 0 0 1-1.146 1.954H1.33A1.313 1.313 0 0 1 .183 9.058ZM7 7V3H5v4Zm-1 3a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"></path> </svg></span> <span>Something went wrong</span> </div> <span class="FormControl-caption" id="caption-form-control-36b3e3b0-3697-4289-83e3-a63773335932"> May the force be with you </span></div>
1
2
3
4
5
6
7
8
9
<%= render(Primer::Alpha::FormControl.new(**system_arguments)) do |component| %> <% component.with_input do |input_arguments| %> <%= render(Primer::Alpha::SegmentedControl.new("aria-label": "Best character", **input_arguments)) do |seg| %> <% seg.with_item(label: "Han Solo", selected: true) %> <% seg.with_item(label: "Luke Skywalker") %> <% seg.with_item(label: "Leia Organa") %> <% end %> <% end %><% end %>
No notes provided.
Param | Description | Input |
---|---|---|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
No assets to display.