Skip to content

Instantly share code, notes, and snippets.

@nikolailehbrink
Created March 6, 2023 09:47
Show Gist options
  • Save nikolailehbrink/e011ceb91ca58ac4e8b04918106a74dd to your computer and use it in GitHub Desktop.
Save nikolailehbrink/e011ceb91ca58ac4e8b04918106a74dd to your computer and use it in GitHub Desktop.
Set custom arrow for HTML Select element with TailwindCSS
<select id="language-selector" class="flex p-3 px-12 bg-[95%] border-2 appearance-none border-violet">
<option selected> Deutsch </option>
<option> English </option>
<option> Français </option>
</select>
select {
background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment