form-image-check.mdx 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. ---
  2. title: Image check
  3. ---
  4. Add an image check to your form and give users visually attractive options to choose from.
  5. ```html example centered columns="2" height="15rem"
  6. <div class="mb-3">
  7. <label class="form-label">Image Check</label>
  8. <div class="row g-2">
  9. <div class="col-3">
  10. <label class="form-imagecheck">
  11. <input name="form-imagecheck" type="checkbox" value="1" class="form-imagecheck-input" />
  12. <span class="form-imagecheck-figure">
  13. <img src="/samples/photos/everything-you-need-to-work-from-your-bed-2.jpg" alt="" class="form-imagecheck-image" />
  14. </span>
  15. </label>
  16. </div>
  17. <div class="col-3">
  18. <label class="form-imagecheck">
  19. <input name="form-imagecheck" type="checkbox" value="2" class="form-imagecheck-input" checked />
  20. <span class="form-imagecheck-figure">
  21. <img src="/samples/photos/color-palette-guide-sample-colors-catalog-.jpg" alt="" class="form-imagecheck-image" />
  22. </span>
  23. </label>
  24. </div>
  25. <div class="col-3">
  26. <label class="form-imagecheck">
  27. <input name="form-imagecheck" type="checkbox" value="3" class="form-imagecheck-input" />
  28. <span class="form-imagecheck-figure">
  29. <img src="/samples/photos/woman-read-book-and-drink-coffee-2.jpg" alt="" class="form-imagecheck-image" />
  30. </span>
  31. </label>
  32. </div>
  33. <div class="col-3">
  34. <label class="form-imagecheck">
  35. <input name="form-imagecheck" type="checkbox" value="4" class="form-imagecheck-input" checked />
  36. <span class="form-imagecheck-figure">
  37. <img src="/samples/photos/stylish-workspace-with-macbook-pro-2.jpg" alt="" class="form-imagecheck-image" />
  38. </span>
  39. </label>
  40. </div>
  41. </div>
  42. </div>
  43. ```
  44. ```html
  45. <label class="form-imagecheck">
  46. <input name="" type="checkbox" value="" class="form-imagecheck-input" checked />
  47. <span class="form-imagecheck-figure">
  48. <img src="..." alt="" class="form-imagecheck-image" />
  49. </span>
  50. </label>
  51. ```
  52. ```html example centered columns="2" height="15rem"
  53. <div class="mb-3">
  54. <label class="form-label">Image Check Radio</label>
  55. <div class="row g-2">
  56. <div class="col-3">
  57. <label class="form-imagecheck mb-2">
  58. <input name="form-imagecheck-radio" type="radio" value="1" class="form-imagecheck-input" />
  59. <span class="form-imagecheck-figure">
  60. <img src="/samples/photos/woman-drinking-hot-tea-in-her-home-office.jpg" alt="" class="form-imagecheck-image" />
  61. </span>
  62. </label>
  63. </div>
  64. <div class="col-3">
  65. <label class="form-imagecheck mb-2">
  66. <input name="form-imagecheck-radio" type="radio" value="2" class="form-imagecheck-input" checked />
  67. <span class="form-imagecheck-figure">
  68. <img src="/samples/photos/young-woman-sitting-on-the-sofa-and-working-on-her-laptop-3.jpg" alt="" class="form-imagecheck-image" />
  69. </span>
  70. </label>
  71. </div>
  72. <div class="col-3">
  73. <label class="form-imagecheck mb-2">
  74. <input name="form-imagecheck-radio" type="radio" value="3" class="form-imagecheck-input" />
  75. <span class="form-imagecheck-figure">
  76. <img src="/samples/photos/beautiful-blonde-woman-relaxing-with-a-can-of-coke-on-a-tree-stump-by-the-beach.jpg" alt="" class="form-imagecheck-image" />
  77. </span>
  78. </label>
  79. </div>
  80. <div class="col-3">
  81. <label class="form-imagecheck mb-2">
  82. <input name="form-imagecheck-radio" type="radio" value="4" class="form-imagecheck-input" checked />
  83. <span class="form-imagecheck-figure">
  84. <img src="/samples/photos/book-on-the-grass.jpg" alt="" class="form-imagecheck-image" />
  85. </span>
  86. </label>
  87. </div>
  88. </div>
  89. </div>
  90. ```
  91. ```html
  92. <label class="form-imagecheck">
  93. <input name="form-imagecheck-radio" type="radio" value="1" class="form-imagecheck-input" />
  94. <span class="form-imagecheck-figure">
  95. <img src="/samples/photos/woman-drinking-hot-tea-in-her-home-office.jpg" alt="" class="form-imagecheck-image" />
  96. </span>
  97. </label>
  98. ```
  99. ```html example centered columns="1" height="15rem"
  100. <div class="mb-3">
  101. <label class="form-label">Person Check</label>
  102. <div class="row g-2">
  103. <div class="col-auto">
  104. <label class="form-imagecheck mb-2">
  105. <input name="form-imagecheck" type="checkbox" value="1" class="form-imagecheck-input" />
  106. <span class="form-imagecheck-figure">
  107. <span class="form-imagecheck-image">
  108. <span class="avatar avatar-md" style="background-image: url(/samples/avatars/057f.jpg)"></span>
  109. </span>
  110. </span>
  111. </label>
  112. </div>
  113. <div class="col-auto">
  114. <label class="form-imagecheck mb-2">
  115. <input name="form-imagecheck" type="checkbox" value="2" class="form-imagecheck-input" checked />
  116. <span class="form-imagecheck-figure">
  117. <span class="form-imagecheck-image">
  118. <span class="avatar avatar-md">HS</span>
  119. </span>
  120. </span>
  121. </label>
  122. </div>
  123. <div class="col-auto">
  124. <label class="form-imagecheck mb-2">
  125. <input name="form-imagecheck" type="checkbox" value="3" class="form-imagecheck-input" />
  126. <span class="form-imagecheck-figure">
  127. <span class="form-imagecheck-image">
  128. <span class="avatar avatar-md" style="background-image: url(/samples/avatars/062m.jpg)"></span>
  129. </span>
  130. </span>
  131. </label>
  132. </div>
  133. <div class="col-auto">
  134. <label class="form-imagecheck mb-2">
  135. <input name="form-imagecheck" type="checkbox" value="4" class="form-imagecheck-input" checked />
  136. <span class="form-imagecheck-figure">
  137. <span class="form-imagecheck-image">
  138. <span class="avatar avatar-md" style="background-image: url(/samples/avatars/070m.jpg)"></span>
  139. </span>
  140. </span>
  141. </label>
  142. </div>
  143. </div>
  144. </div>
  145. ```
  146. ```html
  147. <label class="form-imagecheck">
  148. <input name="" type="checkbox" value="" class="form-imagecheck-input" />
  149. <span class="form-imagecheck-figure">
  150. <span class="form-imagecheck-image">
  151. <span class="avatar avatar-md" style="background-image: url(...)"></span>
  152. </span>
  153. </span>
  154. </label>
  155. ```