Dark Mode Toggle

A component that allows users to toggle between light and dark mode.

Props

The available data properties for this component.

Property Default Description
darkModePreferencesystemSets the default mode, available options are 'system', 'on' and 'off'.
useLocalStoragetrueWhen set to 'true', the component will store the user's dark mode preference in localStorage and retrieve it on future visits, ensuring their choice persists across sessions.