Active network + switch menu — NetworkBadge's interactive sibling.
Anatomy
[ ◉ Solana ▾ ] ← trigger (Select-height, icon + label) ┌──────────────┐ │ ◉ Solana ✓ │ ← RadioItem (check = active) │ ○ Eclipse │ │ ○ Sonic │ └──────────────┘ ← Menu-styled panel (surface-bright)
Props
| Prop | Type | Default | Notes |
|---|---|---|---|
networks | Network[] | — | { id, label, iconSrc? } — Logobase URLs for icons; dot fallback. |
value | string | — | Active network id. |
onValueChange | (id: string) => void | — | Fire your adapter's switch here. |
disabled | boolean | — | E.g. while a transaction is pending. |
className | string | — | Merged onto the trigger. |
Motion
Panel fades via animate-in fade-in-0 (Menu's preset). The trigger
label swaps instantly on selection — network changes must read as
immediate facts.
A11y
Radix DropdownMenu radio semantics: trigger has aria-haspopup +
aria-expanded and an explicit label naming the current network;
items are role="menuitemradio" with aria-checked; typeahead and
arrow keys work. Icons are decorative — labels carry the meaning.