Switch
A control that allows the user to toggle between checked and not checked.
<div class="flex items-center gap-2">
<%= ui.switch :object, :field %>
<%= ui.label :object, :field, 'Enable Notifications' %>
</div>
Installation
rails g lycan_ui:add switch
Usage
Usage in forms
To use directly with Rails forms, please see Installing form helpers
<%= lycan_ui_form_with do |form| %>
<div class="flex items-center gap-2">
<%= form.switch :field, id: :field %>
<%= form.label :field, 'Enable Notifications', for: :field %>
</div>
<% end %>