Select

Dropdown selection control.

html

<label class="field">
  <span class="field__label">Country</span>
  <select class="field__select field__select--outline" style="--accent:#D9C8F0;border-radius:8px;">
    <option>United Kingdom</option>
    <option>Ireland</option>
    <option>France</option>
    <option>Germany</option>
  </select>
</label>
<style>
.field { display: block; font: 14px system-ui, sans-serif; color: #241430; max-width: 240px; }
.field__label { display: block; margin-bottom: 6px; font-weight: 500; }
.field__select { width: 100%; box-sizing: border-box; padding: 10px 12px; font: inherit; color: #241430; background: #FAF7F2; appearance: none; }
.field__select--outline { border: 1.5px solid #24143040; }
.field__select--filled { border: 1.5px solid transparent; background: #24143010; }
.field__select:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.field__select:disabled { opacity: .5; cursor: not-allowed; }
</style>

tailwind

<label class="block max-w-[240px] text-sm text-[#241430] font-sans">
  <span class="block mb-1.5 font-medium">Country</span>
  <select class="field-select-tw field-select-tw--outline w-full box-border px-3 py-2.5 bg-[#FAF7F2] border-[1.5px] appearance-none disabled:opacity-50 disabled:cursor-not-allowed" style="border-radius:8px;border-color:#D9C8F0;">
    <option>United Kingdom</option>
    <option>Ireland</option>
    <option>France</option>
    <option>Germany</option>
  </select>
</label>
<style>
.field-select-tw--filled { background: #24143010 !important; border-color: transparent !important; }
</style>

react

export function Select({
  label = "Country",
  variant = "outline",
  accent = "#D9C8F0",
  radius = 8,
  disabled = false,
}) {
  return (
    <label style={{ display: "block", maxWidth: 240, fontFamily: "system-ui, sans-serif", fontSize: 14, color: "#241430" }}>
      <span style={{ display: "block", marginBottom: 6, fontWeight: 500 }}>{label}</span>
      <select disabled={disabled} style={{
        width: "100%", boxSizing: "border-box", padding: "10px 12px", font: "inherit",
        color: "#241430", background: variant === "filled" ? "#24143010" : "#FAF7F2",
        border: variant === "filled" ? "1.5px solid transparent" : "1.5px solid #24143040",
        borderRadius: radius, appearance: "none", opacity: disabled ? 0.5 : 1,
      }}>
        <option>United Kingdom</option>
        <option>Ireland</option>
        <option>France</option>
        <option>Germany</option>
      </select>
    </label>
  );
}