Previews

No matching results.

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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<!-- With caption -->
<div>
<strong>NOTE: </strong>The
<pre style="display: inline">FormControl </pre>
component cannot automatically connect
the label to the provided input. Please take care to pass the
<pre style="display: inline">for:</pre>
attribute
to
<pre style="display: inline">FormControl</pre>
, eg:
<pre style="display: inline">Primer::Alpha::FormControl.new(label_arguments: { for: "field-name-or-id" })</pre>
.
- Your friendly neighborhood accessibility team.
</div>
<br>
<form action="/foo" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="UPO3NMZjHL_kjsyY9Yt0N_YPixkZmnE5bqRtmqW4ml30D0m3oJuw-h5hD7K9sl_ern6wzLnh5Shm83AKYKM6EA" autocomplete="off" />
<div data-view-component="true" class="FormControl">
<label for="bar-7c362b6028dc50efd1b05b6801d72dda" data-view-component="true" class="FormControl-label">
Best character
</label> <input id="bar-7c362b6028dc50efd1b05b6801d72dda" aria-describedby="caption-form-control-c62c2679-8503-42e7-a3da-434772e329cc" type="text" name="bar" />
<span class="FormControl-caption" id="caption-form-control-c62c2679-8503-42e7-a3da-434772e329cc">
May the force be with you
</span>
</div>
</form>
<!-- With validation message -->
<div>
<strong>NOTE: </strong>The
<pre style="display: inline">FormControl </pre>
component cannot automatically connect
the label to the provided input. Please take care to pass the
<pre style="display: inline">for:</pre>
attribute
to
<pre style="display: inline">FormControl</pre>
, eg:
<pre style="display: inline">Primer::Alpha::FormControl.new(label_arguments: { for: "field-name-or-id" })</pre>
.
- Your friendly neighborhood accessibility team.
</div>
<br>
<form action="/foo" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="8KErN1DwypSs-OyUXkp7jPVlaT0cUmjxYXvm6VLaY3VUXdW0Nghm0VYXL74Wc1BlrRRS6Lwp_OBpLPt5l8HDOA" autocomplete="off" />
<div data-view-component="true" class="FormControl">
<label for="bar-8ae5792a6d5add6a77e46e72681818f2" data-view-component="true" class="FormControl-label">
Best character
</label> <input id="bar-8ae5792a6d5add6a77e46e72681818f2" aria-describedby="validation-form-control-91690860-3a0c-406a-aaf2-c99f244efbd6" type="text" name="bar" />
<div id="validation-form-control-91690860-3a0c-406a-aaf2-c99f244efbd6" data-view-component="true" class="FormControl-inlineValidation">
<span class="FormControl-inlineValidation--visual"><svg aria-hidden="true" data-component="Octicon" 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>
</div>
</form>
<!-- Required -->
<div>
<strong>NOTE: </strong>The
<pre style="display: inline">FormControl </pre>
component cannot automatically connect
the label to the provided input. Please take care to pass the
<pre style="display: inline">for:</pre>
attribute
to
<pre style="display: inline">FormControl</pre>
, eg:
<pre style="display: inline">Primer::Alpha::FormControl.new(label_arguments: { for: "field-name-or-id" })</pre>
.
- Your friendly neighborhood accessibility team.
</div>
<br>
<form action="/foo" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="MpG_SGxItGow5DbvISKjDSqUxALRD2HaFQvHxyrCyx-WbUHLCrAYL8oL9cVpG4jkcuX_13F09csdXNpX79lrUg" autocomplete="off" />
<div data-view-component="true" class="FormControl">
<label for="bar-48a5fa7af759f3a45537ea1e094cff28" data-view-component="true" class="FormControl-label">
Best character
<span aria-hidden="true">*</span>
</label> <input id="bar-48a5fa7af759f3a45537ea1e094cff28" aria-required="true" type="text" name="bar" />
</div>
</form>
<!-- With visually hidden label -->
<div>
<strong>NOTE: </strong>The
<pre style="display: inline">FormControl </pre>
component cannot automatically connect
the label to the provided input. Please take care to pass the
<pre style="display: inline">for:</pre>
attribute
to
<pre style="display: inline">FormControl</pre>
, eg:
<pre style="display: inline">Primer::Alpha::FormControl.new(label_arguments: { for: "field-name-or-id" })</pre>
.
- Your friendly neighborhood accessibility team.
</div>
<br>
<form action="/foo" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="2m4Y6ypP_IiAA01YE2fB9QAswBQS5Gcnhfogp-GR9oJ-kuZoTLdQzXrsjnJbXuocWF37wbKf8zaNrT03JIpWzw" autocomplete="off" />
<div data-view-component="true" class="FormControl">
<label for="bar-74613892c934ccc8f2c8f4d4d8a5fcd0" data-view-component="true" class="FormControl-label sr-only">
Best character
</label> <input id="bar-74613892c934ccc8f2c8f4d4d8a5fcd0" type="text" name="bar" />
</div>
</form>
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<%# With caption %>
<div>
<strong>NOTE: </strong>The <pre style="display: inline">FormControl </pre>component cannot automatically connect
the label to the provided input. Please take care to pass the <pre style="display: inline">for:</pre> attribute
to <pre style="display: inline">FormControl</pre>, eg:
<pre style="display: inline">Primer::Alpha::FormControl.new(label_arguments: { for: "field-name-or-id" })</pre>.
- Your friendly neighborhood accessibility team.
</div>
<br>
<% field_id = "bar-#{SecureRandom.hex}" %>
<%= form_with(url: "/foo") do |f| %>
<%= render(Primer::Alpha::FormControl.new(**system_arguments, label_arguments: { for: field_id })) do |component| %>
<% component.with_input do |input_arguments| %>
<%= f.text_field(:bar, id: field_id, **input_arguments) %>
<% end %>
<% end %>
<% end %>
<%# With validation message %>
<div>
<strong>NOTE: </strong>The <pre style="display: inline">FormControl </pre>component cannot automatically connect
the label to the provided input. Please take care to pass the <pre style="display: inline">for:</pre> attribute
to <pre style="display: inline">FormControl</pre>, eg:
<pre style="display: inline">Primer::Alpha::FormControl.new(label_arguments: { for: "field-name-or-id" })</pre>.
- Your friendly neighborhood accessibility team.
</div>
<br>
<% field_id = "bar-#{SecureRandom.hex}" %>
<%= form_with(url: "/foo") do |f| %>
<%= render(Primer::Alpha::FormControl.new(**system_arguments, label_arguments: { for: field_id })) do |component| %>
<% component.with_input do |input_arguments| %>
<%= f.text_field(:bar, id: field_id, **input_arguments) %>
<% end %>
<% end %>
<% end %>
<%# Required %>
<div>
<strong>NOTE: </strong>The <pre style="display: inline">FormControl </pre>component cannot automatically connect
the label to the provided input. Please take care to pass the <pre style="display: inline">for:</pre> attribute
to <pre style="display: inline">FormControl</pre>, eg:
<pre style="display: inline">Primer::Alpha::FormControl.new(label_arguments: { for: "field-name-or-id" })</pre>.
- Your friendly neighborhood accessibility team.
</div>
<br>
<% field_id = "bar-#{SecureRandom.hex}" %>
<%= form_with(url: "/foo") do |f| %>
<%= render(Primer::Alpha::FormControl.new(**system_arguments, label_arguments: { for: field_id })) do |component| %>
<% component.with_input do |input_arguments| %>
<%= f.text_field(:bar, id: field_id, **input_arguments) %>
<% end %>
<% end %>
<% end %>
<%# With visually hidden label %>
<div>
<strong>NOTE: </strong>The <pre style="display: inline">FormControl </pre>component cannot automatically connect
the label to the provided input. Please take care to pass the <pre style="display: inline">for:</pre> attribute
to <pre style="display: inline">FormControl</pre>, eg:
<pre style="display: inline">Primer::Alpha::FormControl.new(label_arguments: { for: "field-name-or-id" })</pre>.
- Your friendly neighborhood accessibility team.
</div>
<br>
<% field_id = "bar-#{SecureRandom.hex}" %>
<%= form_with(url: "/foo") do |f| %>
<%= render(Primer::Alpha::FormControl.new(**system_arguments, label_arguments: { for: field_id })) do |component| %>
<% component.with_input do |input_arguments| %>
<%= f.text_field(:bar, id: field_id, **input_arguments) %>
<% end %>
<% end %>
<% end %>

No assets to display.