3.5.0






Checkbox

Default


Close
<%= pb_rails("checkbox" , props: {
  text: "Checkbox Label",
  value: "checkbox-value",
  name: "checkbox-name"
}) %>
Load as checked


Close
<%= pb_rails("checkbox" , props: {
  text: "Checked Checkbox",
  value: "checkbox-value",
  checked: true,
  name: "checkbox-name"
}) %>
Dark


Close
<%= pb_rails("checkbox", props: {
  text: "Checkbox Label" ,
  dark: true
}) %>
Custom Checkbox


Close
<%= pb_rails("checkbox", props: {text: "Custom Checkbox"}) do%>
    <input type="checkbox" name="custom-name" value="custom-value"/>
<% end %>
Default w/ Error


Close
<%= pb_rails("checkbox" , props: {
  error: true,
  text: "Checkbox Label",
  value: "checkbox-value",
  name: "checkbox-name"
}) %>
Dark w/ Error


Close
<%= pb_rails("checkbox" , props: {
  dark: true,
  error: true,
  text: "Checkbox Label",
  value: "checkbox-value",
  name: "checkbox-name"
}) %>
Available Props
id
data
classname
aria
children
dark
error
checked
text
value
name