Label
What're you asking?
Includes a Ruby component and corresponding Rails helper
RubyForm 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, label: "E-mail address" %>
<% end %>
Usage
NB: Using through FormBuilder#field
is recommended. See Field docs.
| ||
---|---|---|
Property | Default | Description |
compat_object_name | nil | API compatibility Relevant object |
compat_method | nil | API compatibility Object attribute |
compat_options | {} | API compatibility Options for checkbox |
**attrs | HTML attributes for <label> element |