Time Zone Picker
A copy-paste settings & preferences component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Settings & PreferencesHTMLCSSany framework
- Europe / MadridGMT+2 · 14:32
- Europe / LisbonGMT+1 · 13:32
- Africa / CasablancaGMT+1 · 13:32
Copy into your project
HTML
<div class="nuda-tz">
<label class="nuda-tz__search">
<svg viewBox="0 0 16 16" fill="none" aria-hidden="true">
<circle cx="7" cy="7" r="5" stroke="currentColor" stroke-width="1.5" />
<path d="m11 11 3 3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" />
</svg>
<input type="search" placeholder="Search time zone..." value="Madrid" />
</label>
<ul class="nuda-tz__list" role="listbox">
<li class="nuda-tz__item nuda-tz__item--active" role="option" aria-selected="true">
<div class="nuda-tz__name">Europe / Madrid</div>
<div class="nuda-tz__offset">GMT+2 · 14:32</div>
</li>
<li class="nuda-tz__item" role="option">
<div class="nuda-tz__name">Europe / Lisbon</div>
<div class="nuda-tz__offset">GMT+1 · 13:32</div>
</li>
<li class="nuda-tz__item" role="option">
<div class="nuda-tz__name">Africa / Casablanca</div>
<div class="nuda-tz__offset">GMT+1 · 13:32</div>
</li>
</ul>
</div>CSS
/* Time Zone Picker
Search input + list of selectable zones with local time.
Customize: --accent, --card-bg */
.nuda-tz {
--accent: #e4ff54;
--card-bg: #0c0c10;
display: flex;
flex-direction: column;
gap: 0.5rem;
padding: 0.625rem;
background: var(--card-bg);
border: 1px solid rgba(255, 255, 255, 0.06);
border-radius: 12px;
width: 100%;
max-width: 340px;
}
.nuda-tz__search {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0 0.75rem;
background: #111114;
border: 1px solid rgba(255, 255, 255, 0.06);
border-radius: 8px;
transition: border-color 0.2s ease;
}
.nuda-tz__search:focus-within {
border-color: rgba(228, 255, 84, 0.4);
}
.nuda-tz__search svg {
width: 14px;
height: 14px;
color: #63636e;
flex-shrink: 0;
}
.nuda-tz__search input {
flex: 1;
background: transparent;
border: 0;
outline: 0;
color: #fafafa;
font-size: 0.8125rem;
padding: 0.5rem 0;
font-family: inherit;
}
.nuda-tz__search input::placeholder {
color: #63636e;
}
.nuda-tz__list {
margin: 0;
padding: 0;
list-style: none;
display: flex;
flex-direction: column;
gap: 1px;
max-height: 200px;
overflow-y: auto;
}
.nuda-tz__item {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.75rem;
padding: 0.625rem 0.75rem;
border-radius: 7px;
cursor: pointer;
transition: background 0.15s ease;
}
.nuda-tz__item:hover {
background: #111114;
}
.nuda-tz__item--active {
background: #111114;
}
.nuda-tz__item--active .nuda-tz__name {
color: var(--accent);
}
.nuda-tz__name {
color: #fafafa;
font-size: 0.8125rem;
font-weight: 500;
}
.nuda-tz__offset {
color: #a0a0a8;
font-size: 0.75rem;
font-variant-numeric: tabular-nums;
}
@media (prefers-reduced-motion: reduce) {
.nuda-tz__search,
.nuda-tz__item {
transition: none;
}
}How to use Time Zone Picker
Paste the HTML where you need it and the CSS into a global stylesheet (or a <style> tag). Every class is prefixed nuda- so it never collides with Tailwind or your own styles. Tweak the CSS custom properties to match your design system.
Works in React, Vue, Svelte, Astro, Next.js, Nuxt, Laravel Blade, Django, Rails — or a single .html file. No npm install, no build step.