toggle_switch(
name,
label:,
checked: false,
value: "1",
**html
)
It is a real checkbox with role=switch, so it submits with forms. When the change is only saved with the form, prefer a plain checkbox.
<%= stack(gap: "12px") do %>
<%= toggle_switch "settings[auto_sync]", label: "Sincronizar automaticamente", checked: true %>
<%= toggle_switch "settings[notifications]", label: "Notificações" %>
<% end %>