Field

So many ways to input a string
Includes a Ruby component and corresponding Rails helper
Ruby

Example

Sign in
Let's see those credentials, buddy
Probably something like "password"
At least for a little bit
or sign up
<%= nk_form_for :session do |f| %>
  <%= f.fieldset do |fs| %>
    <%= fs.legend "Sign in" %>
    <%= fs.description "Let's see those credentials, buddy" %>

    <%= fs.group do %>
      <%= f.field :email, as: :email, label: "E-mail address" %>
      <%= f.field :password, as: :password %>
      <%= f.field :remember_me, as: :checkbox,
        description: "At least for a little bit" %>
      <%= f.submit "Sign in" %>
    <% end %>
  <% end %>
<% end %>

Usage

nk_field(**attrs)
PropertyDefaultDescription
**attrsHTML attributes for <input> element
nk_fieldset(legend: nil, description: nil, **attrs) { |fieldset| ... }
PropertyDefaultDescription
legendnilPlain text content
descriptionnilPlain text content
**attrsHTML attributes for <fieldset> element
fieldset.legend(text = nil, **attrs) { ... }
PropertyDefaultDescription
textnilPlain text content
**attrsHTML attributes for <legend> element
fieldset.description(text = nil, **attrs) { ... }
PropertyDefaultDescription
textnilPlain text content
**attrsHTML attributes for <div> element
fieldset.group(**attrs) { |group| ... }
PropertyDefaultDescription
**attrsArguments for NitroKit::FieldGroup.new()
nk_field_group(**attrs)
PropertyDefaultDescription
**attrsHTML attributes for <div> element