PhoenixKit 2.22.22: A cleaner account switcher in the user menu
PhoenixKit 2.22.22 fixes the layout of the account switcher in the user menu, in both the admin and the user dashboard.
The entry for adding an account used the same gear icon as Settings above it, so it looked like a second settings link. It now has an add-user icon. The active account and the other accounts were built differently, so their emails did not line up; they now share one layout. The role badge on the active account was the same colour as its background and could not be seen. Role badges now end at the same right edge, and rows no longer change width depending on whether they have a remove button. The remove button names the account it removes for screen readers.
The active account is now highlighted in the primary colour, like the active language just above it.
Full release notes: PhoenixKit 2.22.22
2.22.22 · 12 September 2026
Fixed
- The account switcher in the user dropdown is aligned and legible again
(both
AdminNav.admin_user_dropdown/1andUserDashboardNav.user_dropdown/1, which carried byte-identical markup and so carried identical bugs).- “Add account” wore a gear icon —
icon_settings, the same glyph as the Settings row above it, reading as a second settings entry rather than an action. It is nowicon_user_add. - The active and inactive rows were built differently and did not line up.
The active row put its padding on the
li‘s direct child; the inactive row split it across a wrapper and a<button>two levels deeper, so daisyUI’s own menu-child padding landed on each differently and the emails drifted a pad’s width apart. The wrapper is now the onlyli > *and carries the!p-0reset (the idiom the in-menu language list already used), with every bit of spacing on an inner row that is structurally identical in both branches. - The role badge on the active row was invisible —
badge-ghostrenders asbase-200and the row’s own background wasbase-200, so the current account’s role read as bare text while every other row showed a chip. - Role badges now share a right edge: the active row reserves width for its check mark, the inactive rows gained a matching spacer.
- Rows no longer change width with their remove button. The trailing slot
is a fixed width rendered on every row as soon as any account is removable
(empty on the active and root rows), so the email column stops stepping in
and out down the list. The literal
✕character becameicon_x_thin, and the button gained anaria-labelnaming the account it removes. - The active account now takes the
bg-primarytreatment the active language row above it already used, instead of a grey highlight — one active style per menu.
- “Add account” wore a gear icon —
PhoenixKit 2.22.22. Install or update: {:phoenix_kit, "~> 2.22"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.