Theme Provider
After successfully installing Dapper UI and the default fonts, you must wrap your app with the
ThemeProvider component. This component provides a default theme and adds the
default style to the head of your document. It's best to do this as high up in the component
tree as possible. If you are using SvelteKit, a good place to include the
ThemeProvider is the main +layout.svelte file.
1
2
3
4
5
6
7
8<script>
import { ThemeProvider, Button } from '@dapper-ui/core';
</script>
<ThemeProvider>
<!-- Your app here -->
<Button>Example</Button>
</ThemeProvider>If you want to customize the default theme, you can pass a custom theme object to the
ThemeProvider component. You can find more information about the theme object in
the Theming
section.