Github

$ npm i @barelyreaper/themer
      

// Example below is in React, but the library is framework agnostic
import {init,getCurrentThemeSimplified,toggleTheme} from "@barelyreaper/themer";

function App(){
    useEffect(()=>{
        const unsub = init()
        return unsub
    },[])

    return <>
        <button onClick="toggleTheme">{getCurrentThemeSimplified()}</button>
    </>
}