tailwind css forms

Solutions on MaxInterview for tailwind css forms by the best coders in the world

showing results for - "tailwind css forms"
Luisa
09 Sep 2018
1<form class="w-full max-w-lg">
2  <div class="flex flex-wrap -mx-3 mb-6">
3    <div class="w-full md:w-1/2 px-3 mb-6 md:mb-0">
4      <label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2" for="grid-first-name">
5        First Name
6      </label>
7      <input class="appearance-none block w-full bg-gray-200 text-gray-700 border border-red-500 rounded py-3 px-4 mb-3 leading-tight focus:outline-none focus:bg-white" id="grid-first-name" type="text" placeholder="Jane">
8      <p class="text-red-500 text-xs italic">Please fill out this field.</p>
9    </div>
10    <div class="w-full md:w-1/2 px-3">
11      <label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2" for="grid-last-name">
12        Last Name
13      </label>
14      <input class="appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500" id="grid-last-name" type="text" placeholder="Doe">
15    </div>
16  </div>
17  <div class="flex flex-wrap -mx-3 mb-6">
18    <div class="w-full px-3">
19      <label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2" for="grid-password">
20        Password
21      </label>
22      <input class="appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 mb-3 leading-tight focus:outline-none focus:bg-white focus:border-gray-500" id="grid-password" type="password" placeholder="******************">
23      <p class="text-gray-600 text-xs italic">Make it as long and as crazy as you'd like</p>
24    </div>
25  </div>
26  <div class="flex flex-wrap -mx-3 mb-2">
27    <div class="w-full md:w-1/3 px-3 mb-6 md:mb-0">
28      <label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2" for="grid-city">
29        City
30      </label>
31      <input class="appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500" id="grid-city" type="text" placeholder="Albuquerque">
32    </div>
33    <div class="w-full md:w-1/3 px-3 mb-6 md:mb-0">
34      <label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2" for="grid-state">
35        State
36      </label>
37      <div class="relative">
38        <select class="block appearance-none w-full bg-gray-200 border border-gray-200 text-gray-700 py-3 px-4 pr-8 rounded leading-tight focus:outline-none focus:bg-white focus:border-gray-500" id="grid-state">
39          <option>New Mexico</option>
40          <option>Missouri</option>
41          <option>Texas</option>
42        </select>
43        <div class="pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700">
44          <svg class="fill-current h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z"/></svg>
45        </div>
46      </div>
47    </div>
48    <div class="w-full md:w-1/3 px-3 mb-6 md:mb-0">
49      <label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2" for="grid-zip">
50        Zip
51      </label>
52      <input class="appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500" id="grid-zip" type="text" placeholder="90210">
53    </div>
54  </div>
55</form>