Search
 
SCRIPT & CODE EXAMPLE
 

HTML

Tailwind CSS select

<label for="countries" class="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-400">Select an option</label>
<select id="countries" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
  <option selected>Choose a country</option>
  <option value="US">United States</option>
  <option value="CA">Canada</option>
  <option value="FR">France</option>
  <option value="DE">Germany</option>
</select>
Comment

custom select tailwind css

<div class="inline-block relative w-64">
  <select class="block appearance-none w-full bg-white border border-gray-400 hover:border-gray-500 px-4 py-2 pr-8 rounded shadow leading-tight focus:outline-none focus:shadow-outline">
    <option>Really long option that will likely overlap the chevron</option>
    <option>Option 2</option>
    <option>Option 3</option>
  </select>
  <div class="pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700">
    <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>
  </div>
</div>
Comment

PREVIOUS NEXT
Code Example
Html :: bootstrap display none 
Html :: how to disable right clicking on video using html 
Html :: svelte for loop 
Html :: opening email on clicking email link 
Html :: disable a tag 
Html :: adding meta social media tags 
Html :: otp not getting recognised in safari react 
Html :: listen on contenteditable 
Html :: facebook icon html 
Html :: html color tomato hex 
Html :: meta og:image 
Html :: json-ld for portfolio site 
Html :: vue get element by id 
Html :: align right tailwind 
Html :: html drop down 
Html :: tailwind custom inline shadow 
Html :: html_entity_decode 
Html :: meta name viewport 
Html :: make text blue html 
Html :: form multipart/form-data 
Html :: vuetify tooltip 
Html :: Dropdown and searchable text 
Html :: html beginform asp.net mvc add id 
Html :: bottstrap starter template 
Html :: html button that hide and show 
Html :: display object with indentaion in html 
Html :: down chevron unicode 
Html :: jquery specific child by index 
Html :: html ideas 
Html :: html bookmark spot 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =