Buttons & Actions
v1.0.0Added in 1.0.0
Switch light, dark and system on top of next-themes: an animated sun / moon button, a segmented control or a menu, with a circular reveal.
Press the icon button and the new theme grows over the page in a circle from the button, while the glyph morphs: going dark the sun's rays fold away, the disc swells and a shadow slides across it until a crescent moon is left; going light it runs backwards. The button cycles System, then the theme the device is not showing, then the device's own theme, then System again (a small monitor badge appears in the corner and the page follows the device), so from System the first press always changes what you see. With includeSystem off it flips between light and dark and never shows the badge. Hover or focus shows a tooltip with the current theme and the shortcut. The segmented variant slides its raised thumb to Light, Dark or System; the dropdown opens a menu with the three choices and a check on the current one, as a bottom sheet on phones. Keyboard: Tab to it, Enter or Space toggles the icon button; in the segmented control Left / Right (and Home / End) pick a theme; in the menu Up / Down move, Enter picks, Escape closes and focus returns to the button. A shortcut prop such as shift+t flips light and dark from anywhere. The new theme is announced to screen readers. With reduced motion the glyph crossfades and the page switches at once. On a phone every target is 44px.
npx wingo-ui@latest add theme-togglePro item: the CLI needs a Pro account. See plans
Thursday, Sep 24, 2026 · 3 invoices due today
theme: …state: next-themesresolved: …reveal: circle 500msshortcut: nonemenu: align end, sheet on phones
The showcase binds t; the demo uses shift+t when you set a shortcut.