From 78ce3784ccef3fc87ffa209bddf3e692036791a0 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Fri, 22 Jan 2021 16:48:10 -0800 Subject: [PATCH] docs: document dynamic theming --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.md b/README.md index ce593664..42e42b32 100644 --- a/README.md +++ b/README.md @@ -130,6 +130,34 @@ export default app; See [webpack.config.js](examples/webpack/webpack.config.js) in [examples/webpack](examples/webpack). +#### Dynamic theming + +Use `carbon-components-svelte/css/all.css` for dynamic, client-side styling. + +Update the theme by setting the `theme` attribute on the `html` element. The default `theme` is `"white"`. + +```html + + + + ... + + +``` + +Using JavaScript: + +```svelte + + + +``` + ### TypeScript support [TypeScript definitions](types) are generated by [sveld](https://github.com/IBM/sveld).