Skip to content

emrocode/umbra

Repository files navigation

Umbra

Run tests

🌚 A simple dark mode toggle library that makes it easy to implement dark mode on your website without additional configuration

Please make sure to read the Wiki for detailed documentation and examples

📦 Installation

Use npm or any other package manager:

npm install @emrocode/umbra

⚙️ Setup

// main.js
import Umbra from '@emrocode/umbra';

const options = {
  autoMatchTheme: true,
};

// autoMatchTheme: boolean,
// useColorScheme: default is ['#ffffff', '#000000'],
// useStorage: 'local' | 'session' | 'none',
// usePlugins: []

new Umbra('#element', options);