Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ollema committed Jan 24, 2024
1 parent faa88a3 commit 7e946e2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,20 @@ To set a default mode, use the `defaultMode` prop:
<ModeWatcher defaultMode={"dark"}>
```

`ModeWatcher` can manage the `theme-color` meta tag for you.

To enable this, set the `themeColor` prop to your preferred colors:

```svelte
<ModeWatcher themeColor={{ dark: "black", light: "white" }}>
```

Note that for this to work, you must have added the `theme-color` meta tag to your `head` element in `app.html`:

```html
<meta name="theme-color" content="black" />
```

## API

### toggleMode
Expand Down

0 comments on commit 7e946e2

Please sign in to comment.