<%= render_component_header title: "Checkbox", description: "A control that allows the user to toggle between checked and not checked." %> <%= content_for :preview, flush: true do %> <%= render_checkbox label: "Accept terms and conditions", name: "terms" %> <% end %> <% content_for :code, flush: true do %> <%= code_partial("checkbox/code/preview", :erb) %> <% end %> <%= render_preview %>

Installation

<%= code_sample(language: "sh") do %> rails generate shadcn-ui checkbox <% end %>

Usage

<%= code_partial("checkbox/code/usage", :erb) %> <%= render_usage("checkbox") %>