kitchen-sink.html 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <title>@tailwindcss/forms Kitchen Sink</title>
  7. <link rel="stylesheet" href="/dist/tailwind.css" />
  8. </head>
  9. <body>
  10. <div class="antialiased text-gray-900 px-6">
  11. <div class="max-w-xl mx-auto py-12 md:max-w-4xl">
  12. <h2 class="text-2xl font-bold">Reset styles</h2>
  13. <p class="mt-2 text-lg text-gray-500">
  14. These are form elements this plugin styles by default.
  15. </p>
  16. <div class="mt-8 grid grid-cols-1 md:grid-cols-2 gap-6 items-start">
  17. <div class="grid grid-cols-1 gap-6">
  18. <label class="block">
  19. <span class="text-gray-700">Input (text)</span>
  20. <input
  21. type="text"
  22. class="form-input mt-1 block w-full"
  23. placeholder="john@example.com"
  24. />
  25. </label>
  26. <label class="block">
  27. <span class="text-gray-700">Input (email)</span>
  28. <input
  29. type="email"
  30. class="form-input mt-1 block w-full"
  31. placeholder="john@example.com"
  32. />
  33. </label>
  34. <label class="block">
  35. <span class="text-gray-700">Input (email, multiple)</span>
  36. <input
  37. type="email"
  38. multiple
  39. class="form-input mt-1 block w-full"
  40. placeholder="john@example.com"
  41. />
  42. </label>
  43. <label class="block">
  44. <span class="text-gray-700">Input (password)</span>
  45. <input
  46. type="password"
  47. class="form-input mt-1 block w-full"
  48. placeholder="john@example.com"
  49. />
  50. </label>
  51. <label class="block">
  52. <span class="text-gray-700">Input (date)</span>
  53. <input type="date" class="form-input mt-1 block w-full" />
  54. </label>
  55. <label class="block">
  56. <span class="text-gray-700">Input (datetime-local)</span>
  57. <input type="datetime-local" class="form-input mt-1 block w-full" />
  58. </label>
  59. <label class="block">
  60. <span class="text-gray-700">Input (month)</span>
  61. <input type="month" class="form-input mt-1 block w-full" />
  62. </label>
  63. <label class="block">
  64. <span class="text-gray-700">Input (number)</span>
  65. <input type="number" class="form-input mt-1 block w-full" />
  66. </label>
  67. <label class="block">
  68. <span class="text-gray-700">Input (search)</span>
  69. <input type="search" class="form-input mt-1 block w-full" />
  70. </label>
  71. <label class="block">
  72. <span class="text-gray-700">Input (time)</span>
  73. <input type="time" class="form-input mt-1 block w-full" />
  74. </label>
  75. <label class="block">
  76. <span class="text-gray-700">Input (week)</span>
  77. <input type="week" class="form-input mt-1 block w-full" />
  78. </label>
  79. </div>
  80. <div class="grid grid-cols-1 gap-6">
  81. <label class="block">
  82. <span class="text-gray-700">Input (tel)</span>
  83. <input
  84. type="tel"
  85. multiple
  86. class="form-input mt-1 block w-full"
  87. placeholder="john@example.com"
  88. />
  89. </label>
  90. <label class="block">
  91. <span class="text-gray-700">Input (url)</span>
  92. <input
  93. type="url"
  94. multiple
  95. class="form-input mt-1 block w-full"
  96. placeholder="john@example.com"
  97. />
  98. </label>
  99. <label class="block">
  100. <span class="text-gray-700">Select</span>
  101. <select class="form-select block w-full mt-1">
  102. <option>Option 1</option>
  103. <option>Option 2</option>
  104. </select>
  105. </label>
  106. <label class="block">
  107. <span class="text-gray-700">Select (single, with size)</span>
  108. <select class="form-select block w-full mt-1" size="3">
  109. <option>Option 1</option>
  110. <option>Option 2</option>
  111. <option>Option 3</option>
  112. <option>Option 4</option>
  113. <option>Option 5</option>
  114. </select>
  115. </label>
  116. <label class="block">
  117. <span class="text-gray-700">Select (multiple)</span>
  118. <select class="form-multiselect block w-full mt-1" multiple>
  119. <option>Option 1</option>
  120. <option>Option 2</option>
  121. <option>Option 3</option>
  122. <option>Option 4</option>
  123. <option>Option 5</option>
  124. </select>
  125. </label>
  126. <label class="block">
  127. <span class="text-gray-700">Select (multiple, with size)</span>
  128. <select class="form-multiselect block w-full mt-1" multiple size="3">
  129. <option>Option 1</option>
  130. <option>Option 2</option>
  131. <option>Option 3</option>
  132. <option>Option 4</option>
  133. <option>Option 5</option>
  134. </select>
  135. </label>
  136. <label class="block">
  137. <span class="text-gray-700">Textarea</span>
  138. <textarea
  139. class="form-textarea mt-1 block w-full h-24"
  140. rows="3"
  141. placeholder="Enter some long form content."
  142. ></textarea>
  143. </label>
  144. <fieldset class="block">
  145. <legend class="text-gray-700">Checkboxes</legend>
  146. <div class="mt-2">
  147. <div>
  148. <label class="inline-flex items-center">
  149. <input class="form-checkbox" type="checkbox" checked />
  150. <span class="ml-2">Option 1</span>
  151. </label>
  152. </div>
  153. <div>
  154. <label class="inline-flex items-center">
  155. <input class="form-checkbox" type="checkbox" />
  156. <span class="ml-2">Option 2</span>
  157. </label>
  158. </div>
  159. <div>
  160. <label class="inline-flex items-center">
  161. <input class="form-checkbox" type="checkbox" />
  162. <span class="ml-2">Option 3</span>
  163. </label>
  164. </div>
  165. </div>
  166. </fieldset>
  167. <fieldset class="block">
  168. <legend class="text-gray-700">Radio Buttons</legend>
  169. <div class="mt-2">
  170. <div>
  171. <label class="inline-flex items-center">
  172. <input class="form-radio" type="radio" checked name="radio-direct" value="1" />
  173. <span class="ml-2">Option 1</span>
  174. </label>
  175. </div>
  176. <div>
  177. <label class="inline-flex items-center">
  178. <input class="form-radio" type="radio" name="radio-direct" value="2" />
  179. <span class="ml-2">Option 2</span>
  180. </label>
  181. </div>
  182. <div>
  183. <label class="inline-flex items-center">
  184. <input class="form-radio" type="radio" name="radio-direct" value="3" />
  185. <span class="ml-2">Option 3</span>
  186. </label>
  187. </div>
  188. </div>
  189. </fieldset>
  190. </div>
  191. </div>
  192. </div>
  193. <div class="max-w-4xl mx-auto py-12">
  194. <h2 class="text-2xl font-bold">Untouched</h2>
  195. <p class="mt-2 text-lg text-gray-500">
  196. These are form elements we don't handle (yet?), but we use this to make sure we haven't
  197. accidentally styled them by mistake.
  198. </p>
  199. <div class="mt-8 grid grid-cols-2 gap-6 items-start">
  200. <div class="grid grid-cols-1 gap-6">
  201. <label class="block">
  202. <span class="text-gray-700">Input (range)</span>
  203. <input type="range" class="mt-1 block w-full" />
  204. </label>
  205. <label class="block">
  206. <span class="text-gray-700">Input (color)</span>
  207. <input type="color" class="mt-1 block w-full" />
  208. </label>
  209. <label class="block">
  210. <span class="text-gray-700">Input (file)</span>
  211. <input type="file" class="mt-1 block w-full" />
  212. </label>
  213. <label class="block">
  214. <span class="text-gray-700">Input (file, multiple)</span>
  215. <input type="file" multiple class="mt-1 block w-full" />
  216. </label>
  217. </div>
  218. </div>
  219. </div>
  220. </div>
  221. </body>
  222. </html>