x
1
2
3
4
5
6
<form class="usa-form" id="new_text_input_component_preview_article" action="#" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="KBisx58gRWe17ZgvGTfTHAa1CNRnfgacAu8ApsYQIRwV__zOZCpNY4DssnEJT4NO7-F9B2_mbrC5So6JtT5Sdg" autocomplete="off" /> <div class=''> <label class="usa-label" for="text_input_component_preview_article_title">Title</label> <input required="required" autofocus="autofocus" placeholder="Untitled" class="usa-input" type="text" name="text_input_component_preview_article[title]" id="text_input_component_preview_article_title" /> </div></form>
1
2
3
4
5
- article = UswdsComponents::TextInputComponentPreview::Article.new= form_for article, url: '#', html: { class: 'usa-form' } do |f| = render UswdsComponents::TextInputComponent.new(form: f, attribute: :title, input_options: { required: true, autofocus: true, placeholder: 'Untitled' })
Text Input Component
The Text Input Component can also take in input options that it will pass on directly to the text field.
No params configured.