x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<primer-text-field class="FormControl width-full FormControl--fullWidth"> <label for="my-text-field" class="FormControl-label"> My text field </label> <div class="FormControl-input-wrap FormControl-input-width--auto"> <input id="my-text-field" aria-describedby="validation-b7f4b423-1665-4545-b3a2-02baaa2ba17c caption-b7f4b423-1665-4545-b3a2-02baaa2ba17c" data-target="primer-text-field.inputElement " class="FormControl-input" type="text" name="my-text-field" /> </div> <div class="FormControl-inlineValidation" id="validation-b7f4b423-1665-4545-b3a2-02baaa2ba17c" hidden="hidden"> <span class="FormControl-inlineValidation--visual" data-target="primer-text-field.validationSuccessIcon" hidden><svg aria-hidden="true" height="12" viewBox="0 0 12 12" version="1.1" width="12" data-view-component="true" class="octicon octicon-check-circle-fill"> <path d="M6 0a6 6 0 1 1 0 12A6 6 0 0 1 6 0Zm-.705 8.737L9.63 4.403 8.392 3.166 5.295 6.263l-1.7-1.702L2.356 5.8l2.938 2.938Z"></path> </svg></span> <span class=" FormControl-inlineValidation--visual" data-target="primer-text-field.validationErrorIcon"><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></span> </div> <span class="FormControl-caption" id="caption-b7f4b423-1665-4545-b3a2-02baaa2ba17c">My text field</span></primer-text-field>
No notes provided.
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
system_arguments = { name: name, id: id, label: label, caption: caption, required: required, visually_hide_label: visually_hide_label, size: size, show_clear_button: show_clear_button, clear_button_id: clear_button_id, full_width: full_width, disabled: disabled, invalid: invalid, validation_message: validation_message, placeholder: placeholder, inset: inset, monospace: monospace, leading_spinner: leading_spinner, input_width: input_width}if leading_visual_icon system_arguments[:leading_visual] = { icon: leading_visual_icon, size: :small }end# You're required to specify a leading visual if a leading spinner is requestedif leading_spinner && !leading_visual_icon system_arguments[:leading_visual] = { icon: :search, size: :small }endrender(Primer::Alpha::TextField.new(**system_arguments))
Param | Description | Input |
---|---|---|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|