Input

I guess we *have* to accept input somehow
Includes a Ruby component and corresponding Rails helper
Ruby

Example

<%= nk_input %>

Install

Set up Nitro Kit then

bin/rails generate nitro_kit:add input

Form use

To use in forms, it's easiest to use the Form Builder.

<%= nk_form_with model: @user do |f| %>
  <%= f.field :name %>
  <%= f.field :email, as: :email %>
<% end %>

Usage

NB: Using through FormBuilder#field is recommended. See Field docs.

nk_input(**attrs)
PropertyDefaultDescription
**attrsHTML attributes for <input> element
nk_color_field(**attrs)
PropertyDefaultDescription
**attrsHTML attributes for <input> element
nk_date_field(**attrs)
PropertyDefaultDescription
**attrsHTML attributes for <input> element
nk_datetime_field(**attrs)
PropertyDefaultDescription
**attrsHTML attributes for <input> element
nk_datetime_local_field(**attrs)
PropertyDefaultDescription
**attrsHTML attributes for <input> element
nk_email_field(**attrs)
PropertyDefaultDescription
**attrsHTML attributes for <input> element
nk_file_field(**attrs)
PropertyDefaultDescription
**attrsHTML attributes for <input> element
nk_hidden_field(**attrs)
PropertyDefaultDescription
**attrsHTML attributes for <input> element
nk_month_field(**attrs)
PropertyDefaultDescription
**attrsHTML attributes for <input> element
nk_number_field(**attrs)
PropertyDefaultDescription
**attrsHTML attributes for <input> element
nk_password_field(**attrs)
PropertyDefaultDescription
**attrsHTML attributes for <input> element
nk_phone_field(**attrs)
PropertyDefaultDescription
**attrsHTML attributes for <input> element
nk_range_field(**attrs)
PropertyDefaultDescription
**attrsHTML attributes for <input> element
nk_search_field(**attrs)
PropertyDefaultDescription
**attrsHTML attributes for <input> element
nk_telephone_field(**attrs)
PropertyDefaultDescription
**attrsHTML attributes for <input> element
nk_text_field(**attrs)
PropertyDefaultDescription
**attrsHTML attributes for <input> element
nk_time_field(**attrs)
PropertyDefaultDescription
**attrsHTML attributes for <input> element
nk_url_field(**attrs)
PropertyDefaultDescription
**attrsHTML attributes for <input> element
nk_week_field(**attrs)
PropertyDefaultDescription
**attrsHTML attributes for <input> element