checkbox.html 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. {%
  33. include meta.html
  34. colors=false
  35. sizes=false
  36. variables=false
  37. %}
  38. <hr>
  39. <div class="content">
  40. <p>
  41. 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.
  42. </p>
  43. </div>
  44. <div class="columns">
  45. <div class="column is-half">
  46. {{checkbox_example}}
  47. </div>
  48. <div class="column is-half highlight-full">
  49. {% highlight html %}{{checkbox_example}}{% endhighlight %}
  50. </div>
  51. </div>
  52. <div class="content">
  53. <p>
  54. You can add <strong>links</strong> to your checkbox, or even <strong>disable</strong> it.
  55. </p>
  56. </div>
  57. <div class="columns">
  58. <div class="column is-half">
  59. {{checkbox_link_example}}
  60. </div>
  61. <div class="column is-half highlight-full">
  62. {% highlight html %}{{checkbox_link_example}}{% endhighlight %}
  63. </div>
  64. </div>
  65. <div class="columns">
  66. <div class="column is-half">
  67. {{checkbox_disabled_example}}
  68. </div>
  69. <div class="column is-half highlight-full">
  70. {% highlight html %}{{checkbox_disabled_example}}{% endhighlight %}
  71. </div>
  72. </div>
  73. </div>
  74. </section>