checkbox.html 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. ---
  2. title: Checkbox
  3. layout: documentation
  4. doc-tab: form
  5. doc-subtab: checkbox
  6. ---
  7. {% capture checkbox_example %}
  8. <label class="checkbox">
  9. <input type="checkbox">
  10. Remember me
  11. </label>
  12. {% endcapture %}
  13. {% capture checkbox_link_example %}
  14. <label class="checkbox">
  15. <input type="checkbox">
  16. I agree to the <a href="#">terms and conditions</a>
  17. </label>
  18. {% endcapture %}
  19. {% capture checkbox_disabled_example %}
  20. <label class="checkbox" disabled>
  21. <input type="checkbox" disabled>
  22. Save my preferences
  23. </label>
  24. {% endcapture %}
  25. {% include subnav-form.html %}
  26. <section class="section">
  27. <div class="container">
  28. <h1 class="title">Checkbox</h1>
  29. <h2 class="subtitle">
  30. The 2-state <strong>checkbox</strong> in its native format
  31. </h2>
  32. <hr>
  33. <div class="content">
  34. <p>
  35. 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.
  36. </p>
  37. </div>
  38. <div class="columns">
  39. <div class="column is-half">
  40. {{checkbox_example}}
  41. </div>
  42. <div class="column is-half highlight-full">
  43. {% highlight html %}{{checkbox_example}}{% endhighlight %}
  44. </div>
  45. </div>
  46. <div class="content">
  47. <p>
  48. You can add <strong>links</strong> to your checkbox, or even <strong>disable</strong> it.
  49. </p>
  50. </div>
  51. <div class="columns">
  52. <div class="column is-half">
  53. {{checkbox_link_example}}
  54. </div>
  55. <div class="column is-half highlight-full">
  56. {% highlight html %}{{checkbox_link_example}}{% endhighlight %}
  57. </div>
  58. </div>
  59. <div class="columns">
  60. <div class="column is-half">
  61. {{checkbox_disabled_example}}
  62. </div>
  63. <div class="column is-half highlight-full">
  64. {% highlight html %}{{checkbox_disabled_example}}{% endhighlight %}
  65. </div>
  66. </div>
  67. </div>
  68. </section>