checkbox.html 1.9 KB

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