checkbox.html 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. ---
  2. title: Checkbox
  3. subtitle: "The 2-state <strong>checkbox</strong> in its native format"
  4. layout: documentation
  5. doc-tab: form
  6. doc-subtab: checkbox
  7. breadcrumb:
  8. - home
  9. - documentation
  10. - form
  11. - form-checkbox
  12. meta:
  13. colors: false
  14. sizes: false
  15. variables: false
  16. ---
  17. {% capture checkbox_example %}
  18. <label class="checkbox">
  19. <input type="checkbox">
  20. Remember me
  21. </label>
  22. {% endcapture %}
  23. {% capture checkbox_link_example %}
  24. <label class="checkbox">
  25. <input type="checkbox">
  26. I agree to the <a href="#">terms and conditions</a>
  27. </label>
  28. {% endcapture %}
  29. {% capture checkbox_disabled_example %}
  30. <label class="checkbox" disabled>
  31. <input type="checkbox" disabled>
  32. Save my preferences
  33. </label>
  34. {% endcapture %}
  35. <div class="content">
  36. <p>
  37. The <code>checkbox</code> class is a simple wrapper around the <code>&lt;input type="checkbox"&gt;</code> HTML element. It is intentionally not styled, to preserve cross-browser compatibility and the user experience.
  38. </p>
  39. </div>
  40. <div class="columns">
  41. <div class="column is-half">
  42. {{checkbox_example}}
  43. </div>
  44. <div class="column is-half highlight-full">
  45. {% highlight html %}{{checkbox_example}}{% endhighlight %}
  46. </div>
  47. </div>
  48. <div class="content">
  49. <p>
  50. You can add <strong>links</strong> to your checkbox, or even <strong>disable</strong> it.
  51. </p>
  52. </div>
  53. <div class="columns">
  54. <div class="column is-half">
  55. {{checkbox_link_example}}
  56. </div>
  57. <div class="column is-half highlight-full">
  58. {% highlight html %}{{checkbox_link_example}}{% endhighlight %}
  59. </div>
  60. </div>
  61. <div class="columns">
  62. <div class="column is-half">
  63. {{checkbox_disabled_example}}
  64. </div>
  65. <div class="column is-half highlight-full">
  66. {% highlight html %}{{checkbox_disabled_example}}{% endhighlight %}
  67. </div>
  68. </div>