Active Foundation · Example
The colour-scheme button
The colour-scheme buttonClient
Full source examples/ui/mode-toggle.tsx
// apps/docs/examples/ui/mode-toggle.tsx'use client';
import {ModeToggle} from '@workspace/active-ui/components/composed/mode-toggle';import {TooltipProvider} from '@workspace/active-ui/components/primitives/tooltip';
/** * The colour-scheme button of an application header, under this site's * theme provider: a click switches the whole site between light and dark, * like the button in the header above. */export default function ModeToggleExample() { return ( <TooltipProvider> <ModeToggle label="Colour scheme" schemeLabels={{light: 'Light', dark: 'Dark'}} showTooltip /> </TooltipProvider> );}