HTML
Copy
<div><span class="mb-3 block text-[.72rem] tracking-[.12em] text-[#596073] uppercase">Default with a hint</span><div class="rounded-2xl border border-[#e3e5ee] bg-white px-6 pt-[22px] pb-6 shadow-[0_1px_2px_rgba(20,24,40,.04)]">
<div class="grid min-w-0 gap-[7px]">
<label class="text-[.9rem] font-semibold" for="sel-country">Country of residence</label>
<select class="sel-chevron block h-11 w-full cursor-pointer appearance-none rounded-[10px] border border-sel-line bg-white pr-[42px] pl-3.5 text-[.95rem] text-sel-ink shadow-[0_1px_2px_rgba(20,24,40,.06)] [color-scheme:light] transition-[border-color,box-shadow] duration-150 hover:border-[#5f6579] focus-visible:border-sel-accent focus-visible:shadow-[0_0_0_4px_rgba(79,70,229,.28)] focus-visible:outline-none motion-reduce:transition-none" id="sel-country" name="country" aria-describedby="sel-country-hint">
<optgroup label="Baltics"><option value="EE">Estonia</option><option value="LV" selected>Latvia</option><option value="LT">Lithuania</option></optgroup>
<optgroup label="Nordics"><option value="DK">Denmark</option><option value="FI">Finland</option><option value="NO">Norway</option><option value="SE">Sweden</option></optgroup>
<optgroup label="Western Europe"><option value="BE">Belgium</option><option value="FR">France</option><option value="DE">Germany</option><option value="NL">Netherlands</option></optgroup>
</select>
<p class="text-[.82rem] text-sel-muted" id="sel-country-hint">Used for tax and invoicing. You can change it later in Billing.</p>
</div>
</div></div>
<div><span class="mb-3 block text-[.72rem] tracking-[.12em] text-[#596073] uppercase">Three sizes</span><div class="rounded-2xl border border-[#e3e5ee] bg-white px-6 pt-[22px] pb-6 shadow-[0_1px_2px_rgba(20,24,40,.04)]">
<div class="grid grid-cols-[repeat(auto-fit,minmax(150px,1fr))] items-start gap-4">
<div class="grid min-w-0 gap-[7px]"><label class="text-[.9rem] font-semibold" for="sel-rows">Rows per page</label>
<select class="sel-chevron block h-[34px] w-full cursor-pointer appearance-none rounded-lg border border-sel-line bg-white bg-position-[right_10px_center] bg-size-[14px] pr-[34px] pl-[11px] text-[.84rem] text-sel-ink shadow-[0_1px_2px_rgba(20,24,40,.06)] [color-scheme:light] transition-[border-color,box-shadow] duration-150 hover:border-[#5f6579] focus-visible:border-sel-accent focus-visible:shadow-[0_0_0_4px_rgba(79,70,229,.28)] focus-visible:outline-none motion-reduce:transition-none" id="sel-rows" name="rows"><option>10</option><option selected>25</option><option>50</option><option>100</option></select></div>
<div class="grid min-w-0 gap-[7px]"><label class="text-[.9rem] font-semibold" for="sel-sort">Sort by</label>
<select class="sel-chevron block h-11 w-full cursor-pointer appearance-none rounded-[10px] border border-sel-line bg-white pr-[42px] pl-3.5 text-[.95rem] text-sel-ink shadow-[0_1px_2px_rgba(20,24,40,.06)] [color-scheme:light] transition-[border-color,box-shadow] duration-150 hover:border-[#5f6579] focus-visible:border-sel-accent focus-visible:shadow-[0_0_0_4px_rgba(79,70,229,.28)] focus-visible:outline-none motion-reduce:transition-none" id="sel-sort" name="sort"><option>Newest first</option><option>Oldest first</option><option>Price, low to high</option><option>Price, high to low</option></select></div>
<div class="grid min-w-0 gap-[7px]"><label class="text-[.9rem] font-semibold" for="sel-plan">Plan</label>
<select class="sel-chevron block h-[54px] w-full cursor-pointer appearance-none rounded-[13px] border border-sel-line bg-white bg-position-[right_18px_center] bg-size-[18px] pr-12 pl-[18px] text-[1.05rem] text-sel-ink shadow-[0_1px_2px_rgba(20,24,40,.06)] [color-scheme:light] transition-[border-color,box-shadow] duration-150 hover:border-[#5f6579] focus-visible:border-sel-accent focus-visible:shadow-[0_0_0_4px_rgba(79,70,229,.28)] focus-visible:outline-none motion-reduce:transition-none" id="sel-plan" name="plan"><option>Starter</option><option selected>Team</option><option>Business</option></select></div>
</div>
</div></div>
<div><span class="mb-3 block text-[.72rem] tracking-[.12em] text-[#596073] uppercase">Leading icon, pill shape</span><div class="rounded-2xl border border-[#e3e5ee] bg-white px-6 pt-[22px] pb-6 shadow-[0_1px_2px_rgba(20,24,40,.04)]">
<div class="grid grid-cols-[repeat(auto-fit,minmax(200px,1fr))] gap-4">
<div class="grid min-w-0 gap-[7px]"><label class="text-[.9rem] font-semibold" for="sel-currency">Currency</label><div class="relative">
<svg class="pointer-events-none absolute top-1/2 left-[15px] size-[18px] -translate-y-1/2 text-sel-accent" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><rect x="2.5" y="6" width="19" height="12" rx="2"/><circle cx="12" cy="12" r="2.6"/><path d="M6 9.5v5M18 9.5v5"/></svg>
<select class="sel-chevron block h-11 w-full cursor-pointer appearance-none rounded-full border border-sel-line bg-white bg-position-[right_16px_center] pr-11 pl-[43px] text-[.95rem] text-sel-ink shadow-[0_1px_2px_rgba(20,24,40,.06)] [color-scheme:light] transition-[border-color,box-shadow] duration-150 hover:border-[#5f6579] focus-visible:border-sel-accent focus-visible:shadow-[0_0_0_4px_rgba(79,70,229,.28)] focus-visible:outline-none motion-reduce:transition-none" id="sel-currency" name="currency"><option value="EUR" selected>EUR — Euro</option><option value="GBP">GBP — Pound sterling</option><option value="USD">USD — US dollar</option><option value="SEK">SEK — Swedish krona</option></select></div></div>
<div class="grid min-w-0 gap-[7px]"><label class="text-[.9rem] font-semibold" for="sel-lang">Language</label><div class="relative">
<svg class="pointer-events-none absolute top-1/2 left-[15px] size-[18px] -translate-y-1/2 text-sel-accent" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="9.5"/><path d="M2.5 12h19M12 2.5c2.6 2.8 3.8 6 3.8 9.5s-1.2 6.7-3.8 9.5c-2.6-2.8-3.8-6-3.8-9.5s1.2-6.7 3.8-9.5Z"/></svg>
<select class="sel-chevron block h-11 w-full cursor-pointer appearance-none rounded-full border border-sel-line bg-white bg-position-[right_16px_center] pr-11 pl-[43px] text-[.95rem] text-sel-ink shadow-[0_1px_2px_rgba(20,24,40,.06)] [color-scheme:light] transition-[border-color,box-shadow] duration-150 hover:border-[#5f6579] focus-visible:border-sel-accent focus-visible:shadow-[0_0_0_4px_rgba(79,70,229,.28)] focus-visible:outline-none motion-reduce:transition-none" id="sel-lang" name="language"><option value="en" selected>English</option><option value="de">Deutsch</option><option value="es">Español</option><option value="fr">Français</option><option value="lv">Latviešu</option></select></div></div>
</div>
</div></div>
<div><span class="mb-3 block text-[.72rem] tracking-[.12em] text-[#596073] uppercase">Valid, invalid and disabled</span><div class="rounded-2xl border border-[#e3e5ee] bg-white px-6 pt-[22px] pb-6 shadow-[0_1px_2px_rgba(20,24,40,.04)]">
<div class="grid grid-cols-[repeat(auto-fit,minmax(200px,1fr))] gap-4">
<div class="grid min-w-0 gap-[7px]"><label class="text-[.9rem] font-semibold" for="sel-ship">Delivery</label>
<select class="sel-valid block h-11 w-full cursor-pointer appearance-none rounded-[10px] border border-sel-ok bg-white pr-[68px] pl-3.5 text-[.95rem] text-sel-ink shadow-[0_1px_2px_rgba(20,24,40,.06)] [color-scheme:light] transition-[border-color,box-shadow] duration-150 focus-visible:shadow-[0_0_0_4px_rgba(21,128,61,.25)] focus-visible:outline-none motion-reduce:transition-none" id="sel-ship" name="delivery" aria-describedby="sel-ship-msg"><option>Standard — 3 to 5 days</option><option selected>Express — next day</option><option>Collect from store</option></select>
<p class="text-[.82rem] font-medium text-sel-ok" id="sel-ship-msg">Arrives Thursday, 2 October</p></div>
<div class="grid min-w-0 gap-[7px]"><label class="text-[.9rem] font-semibold" for="sel-size">Frame size</label>
<select class="sel-invalid block h-11 w-full cursor-pointer appearance-none rounded-[10px] border border-sel-err bg-white pr-[68px] pl-3.5 text-[.95rem] text-sel-ink shadow-[0_1px_2px_rgba(20,24,40,.06)] [color-scheme:light] transition-[border-color,box-shadow] duration-150 focus-visible:shadow-[0_0_0_4px_rgba(200,30,58,.22)] focus-visible:outline-none motion-reduce:transition-none" id="sel-size" name="size" required aria-invalid="true" aria-describedby="sel-size-msg"><option value="" selected>Choose a size</option><option>S — 160 to 170 cm</option><option>M — 170 to 180 cm</option><option>L — 180 to 190 cm</option></select>
<p class="text-[.82rem] font-medium text-sel-err" id="sel-size-msg">Choose a frame size to continue.</p></div>
<div class="grid min-w-0 gap-[7px]"><label class="text-[.9rem] font-semibold" for="sel-region">Data region</label>
<select class="sel-chevron block h-11 w-full cursor-not-allowed appearance-none rounded-[10px] border border-[#cfd2dc] bg-[#f1f2f6] pr-[42px] pl-3.5 text-[.95rem] text-[#6b7080] [color-scheme:light]" id="sel-region" name="region" disabled aria-describedby="sel-region-hint"><option>EU — Frankfurt</option></select>
<p class="text-[.82rem] text-sel-muted" id="sel-region-hint">Set when the workspace was created.</p></div>
</div>
</div></div>
<div><span class="mb-3 block text-[.72rem] tracking-[.12em] text-[#596073] uppercase">Native multiple select</span><div class="rounded-2xl border border-[#e3e5ee] bg-white px-6 pt-[22px] pb-6 shadow-[0_1px_2px_rgba(20,24,40,.04)]">
<div class="grid min-w-0 gap-[7px]">
<label class="text-[.9rem] font-semibold" for="sel-topics">Newsletter topics</label>
<select class="block w-full appearance-none overflow-y-auto rounded-[10px] border border-sel-line bg-white p-1.5 text-[.95rem] text-sel-ink shadow-[0_1px_2px_rgba(20,24,40,.06)] [color-scheme:light] transition-[border-color,box-shadow] duration-150 hover:border-[#5f6579] focus-visible:border-sel-accent focus-visible:shadow-[0_0_0_4px_rgba(79,70,229,.28)] focus-visible:outline-none motion-reduce:transition-none [&_option]:rounded-[7px] [&_option]:px-2.5 [&_option]:py-2 [&_option:checked]:bg-[linear-gradient(#e4e5ff,#e4e5ff)] [&_option:checked]:font-semibold [&_option:checked]:text-[#312e81]" id="sel-topics" name="topics" multiple size="6" aria-describedby="sel-topics-hint">
<option value="product" selected>Product updates</option>
<option value="engineering">Engineering blog</option>
<option value="design" selected>Design notes</option>
<option value="stories">Customer stories</option>
<option value="events" selected>Events and webinars</option>
<option value="jobs">Open roles</option>
</select>
<p class="text-[.82rem] text-sel-muted" id="sel-topics-hint">Hold Ctrl (or ⌘ on a Mac) to pick more than one.</p>
</div>
</div></div>
CSS
Copy
@theme {
--color-sel-accent: #4f46e5;
--color-sel-line: #8a90a6;
--color-sel-ink: #1e2233;
--color-sel-muted: #596073;
--color-sel-ok: #15803d;
--color-sel-err: #c81e3a;
}
/* the chevron, and the chevron plus a status icon, as background images on the <select> */
@utility sel-chevron {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23596073' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
}
@utility sel-valid {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23596073' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2315803d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3.5 8.5 3 3 6-7'/%3E%3C/svg%3E");
background-repeat: no-repeat; background-position: right 14px center, right 40px center; background-size: 16px, 16px;
}
@utility sel-invalid {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23596073' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23c81e3a' stroke-width='1.6'%3E%3Ccircle cx='8' cy='8' r='6.5'/%3E%3Cpath d='M8 4.6v4' stroke-linecap='round'/%3E%3Ccircle cx='8' cy='11.2' r='.6' fill='%23c81e3a'/%3E%3C/svg%3E");
background-repeat: no-repeat; background-position: right 14px center, right 40px center; background-size: 16px, 16px;
}