Skip to content

component

Theme Slider

By yahya

Details

Summary

A draggable Theme Switcher

Description

This component creates a draggable theme switch that allows users to toggle between light and dark modes. It dynamically updates CSS variables and the background/text colors based on the switch’s position, and persists the user’s theme preference in local storage. Unlike the user toggle switch, this updates styles in real time as you drag visualizing the entire theme switching experience. All you need to do is dropping the component on the page, them set your framer color tokens for light and dark mode for each token. Everything is automatically handled by the switcher to convert light to dark mode as the user drags the switcher.

Introduction

A draggable Theme Switcher

Rank history

Daily rank per list, from the first snapshot — lower is better.

120014001600163598/148/228/309/79/15
  • All · #6014