Workspace switcher
A closed button shows the workspace you are in. Open it to pick another from a list of real radios, and the button's avatar and name follow your choice.
Working inKiln Road PotterySaturday Clay ClubImre Vass, personal
The code
Plain HTML and CSS on your kit's variables. Put it next to tokens/variables.css from your kit's files and it draws in your look.
<div class="ukc-avatar-account-switch">
<details class="sw" open>
<summary>
<span class="cur" aria-hidden="true"><span class="av a">KR</span><span class="av b">SC</span><span class="av c me">IV</span></span>
<span class="lab"><span class="k">Working in</span><span class="nm na">Kiln Road Pottery</span><span class="nm nb">Saturday Clay Club</span><span class="nm nc">Imre Vass, personal</span></span>
<span class="chev" aria-hidden="true"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6 9l6 6 6-6"/></svg></span>
</summary>
<fieldset class="menu">
<legend class="vh">Switch workspace</legend>
<label class="opt"><input class="vh ra" type="radio" name="ukc-avatar-account-switch-ws" checked><span class="av a" aria-hidden="true">KR</span><span class="who"><strong>Kiln Road Pottery</strong><span>Owner · 3 invoices unpaid</span></span><span class="tick" aria-hidden="true"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7.5"/></svg></span></label>
<label class="opt"><input class="vh rb" type="radio" name="ukc-avatar-account-switch-ws"><span class="av b" aria-hidden="true">SC</span><span class="who"><strong>Saturday Clay Club</strong><span>Teacher · 12 students</span></span><span class="new">2 new</span><span class="tick" aria-hidden="true"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7.5"/></svg></span></label>
<label class="opt"><input class="vh rc" type="radio" name="ukc-avatar-account-switch-ws"><span class="av c me" aria-hidden="true">IV</span><span class="who"><strong>Imre Vass</strong><span>Personal · receipts only</span></span><span class="tick" aria-hidden="true"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7.5"/></svg></span></label>
<div class="foot"><button type="button"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg>Add a workspace</button><button class="bye" type="button">Sign out</button></div>
</fieldset>
</details>
</div>
.ukc-avatar-account-switch { position: relative; font-family: var(--uk-font-body, system-ui, sans-serif); color: var(--uk-ink); font-size: 15px; line-height: 1.5;
--tint: color-mix(in srgb, var(--uk-accent) 12%, var(--uk-paper));
--tint-strong: color-mix(in srgb, var(--uk-accent) 22%, var(--uk-paper));
--accent-deep: color-mix(in srgb, var(--uk-accent) 72%, black);
--ink-soft: color-mix(in srgb, var(--uk-ink) 8%, var(--uk-paper));
--line-strong: color-mix(in srgb, var(--uk-ink) 32%, var(--uk-paper));
--danger-tint: color-mix(in srgb, var(--uk-danger) 12%, var(--uk-paper));
--high-tint: color-mix(in srgb, var(--uk-highlight) 28%, var(--uk-paper)); }
.ukc-avatar-account-switch *, .ukc-avatar-account-switch *::before, .ukc-avatar-account-switch *::after { box-sizing: border-box; }
.ukc-avatar-account-switch :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote) { margin: 0; }
.ukc-avatar-account-switch :where(ul, ol) { padding: 0; list-style: none; }
.ukc-avatar-account-switch :where(button, input, select, textarea) { font: inherit; color: inherit; }
.ukc-avatar-account-switch :where(a) { color: inherit; }
.ukc-avatar-account-switch svg { flex: none; }
.ukc-avatar-account-switch .vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ukc-avatar-account-switch .sw { width: 300px; max-width: 100%; }
.ukc-avatar-account-switch summary { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border: var(--uk-border-width) solid var(--line-strong); border-radius: min(var(--uk-radius-md), 12px); background: var(--uk-surface); list-style: none; cursor: pointer; }
.ukc-avatar-account-switch summary::-webkit-details-marker { display: none; }
.ukc-avatar-account-switch summary:focus-visible { outline: 2px solid var(--uk-accent); outline-offset: 2px; }
.ukc-avatar-account-switch .av { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: min(var(--uk-radius-md), 26%); font-size: 12px; font-weight: 700; letter-spacing: 0.02em; }
.ukc-avatar-account-switch .me { border-radius: 50%; }
.ukc-avatar-account-switch .a { background: var(--uk-ink); color: var(--uk-paper); }
.ukc-avatar-account-switch .b { background: var(--uk-accent); color: var(--uk-accent-ink); }
.ukc-avatar-account-switch .c { background: var(--high-tint); color: var(--uk-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--uk-ink) 14%, transparent); }
.ukc-avatar-account-switch .cur { display: grid; }
.ukc-avatar-account-switch .cur .av, .ukc-avatar-account-switch .nm { display: none; }
.ukc-avatar-account-switch:has(.ra:checked) .cur .a, .ukc-avatar-account-switch:has(.rb:checked) .cur .b, .ukc-avatar-account-switch:has(.rc:checked) .cur .c { display: grid; }
.ukc-avatar-account-switch:has(.ra:checked) .na, .ukc-avatar-account-switch:has(.rb:checked) .nb, .ukc-avatar-account-switch:has(.rc:checked) .nc { display: block; }
.ukc-avatar-account-switch .lab { display: grid; flex: 1; min-width: 0; line-height: 1.3; }
.ukc-avatar-account-switch .k { font-family: var(--uk-font-mono, ui-monospace, monospace); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--uk-muted); }
.ukc-avatar-account-switch .nm { overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.ukc-avatar-account-switch .chev { display: grid; color: var(--uk-muted); transition: rotate var(--uk-motion-duration) var(--uk-motion-ease); }
.ukc-avatar-account-switch .sw[open] .chev { rotate: 180deg; }
.ukc-avatar-account-switch .menu { min-width: 0; margin: 6px 0 0; padding: 4px; border: var(--uk-border-width) solid var(--uk-line); border-radius: min(var(--uk-radius-lg), 12px); background: var(--uk-surface); box-shadow: var(--uk-shadow-float); }
.ukc-avatar-account-switch .opt { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: min(var(--uk-radius-md), 8px); cursor: pointer; }
.ukc-avatar-account-switch .opt:hover { background: color-mix(in srgb, var(--uk-ink) 5%, transparent); }
.ukc-avatar-account-switch .opt:has(input:checked) { background: var(--tint); }
.ukc-avatar-account-switch .opt:has(input:focus-visible) { outline: 2px solid var(--uk-accent); outline-offset: -2px; }
.ukc-avatar-account-switch .who { display: grid; flex: 1; min-width: 0; line-height: 1.3; }
.ukc-avatar-account-switch .who strong { font-size: 14px; font-weight: 500; }
.ukc-avatar-account-switch .opt:has(input:checked) .who strong { font-weight: 700; }
.ukc-avatar-account-switch .who span { overflow: hidden; font-size: 12px; color: var(--uk-muted); text-overflow: ellipsis; white-space: nowrap; }
.ukc-avatar-account-switch .new { flex: none; padding: 0 7px; border: 1px solid var(--uk-ink); border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 18px; white-space: nowrap; }
.ukc-avatar-account-switch .tick { display: none; flex: none; }
.ukc-avatar-account-switch .opt:has(input:checked) .tick { display: grid; }
.ukc-avatar-account-switch .foot { display: flex; gap: 4px; margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--uk-line); }
.ukc-avatar-account-switch .foot button { flex: 1; height: 32px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 8px; border: 0; border-radius: min(var(--uk-radius-md), 8px); background: transparent; font-size: 13px; white-space: nowrap; cursor: pointer; }
.ukc-avatar-account-switch .foot button:hover { background: color-mix(in srgb, var(--uk-ink) 6%, transparent); }
.ukc-avatar-account-switch .foot button:focus-visible { outline: 2px solid var(--uk-accent); outline-offset: -2px; }
.ukc-avatar-account-switch .foot .bye { flex: none; color: var(--uk-danger); }
@media (prefers-reduced-motion: reduce) { .ukc-avatar-account-switch .chev { transition: none; } }
More avatars
All 29Who reports to whomSpoke and Sprocket Cycle Works
-
Lena HartmannOwner6 people
-
Ibrahim SesayWorkshop lead3 seats
- Coral WhyteMechanic
- Jun ParkWheel builder
- Apprentice mechanicOpen seat. See the listing
-
Tess RuizShop floor lead1 seat
- Mateus LimaSales, weekends
-
-
OM& Ottilie & Marcus
Wedding flowers · Sat 14 June
Ranunculus, sweet pea and olive. Final stem count is due on 30 May.
- Henrik & PauloAnniversary table
- Sunita & DaraRegistry office posies
- Wren & ElioBarn arch and aisle
Your pen palsSlow Post Club
-
Noor Haddad
Tangier
42 letters Your turn to write
-
Anders Holm
Bergen
17 letters Posted 3 Nov, no reply yet
-
Keiko Arai
Otaru
3 letters New this autumn
-
- Person IO IO IO IO IO Company RF RF RF RF RF 3240486480
-
Kitchen reframe
9 on the crew
MR DW IO TM KH +4 -
Garage roof
3 on the crew
SB DW JO
-
Profile photo
MRCompany logo
Square PNG or SVG, 256 px or larger. It prints at the top of every invoice.