useDarkReader

Dark Reader analyzes web pages and aims to reduce eyestrain while browsing the web.

Dark Reader is an open-source MIT-licensed browser extension designed to analyze web pages. Dark Reader will generate a dark mode that aims to reduce the eyestrain of the user. Dark Reader is feature-rich and is customizable in many ways throughout the UI.

Example #

  • Svelte
<script lang="ts">
	import { Button } from 'flowbite-svelte'
	import { useDarkReader } from 'sveltuse/integrations/useDarkReader'

	const darkReader = useDarkReader()
</script>

<div>
	<Button on:click={() => darkReader.toggle()}>Toggle</Button>
	<Button on:click={() => darkReader.toggle(true)}>Turn On</Button>
	<Button on:click={() => darkReader.toggle(false)}>Turn Off</Button>
</div>

Source #