Vaadin Component Factory Dark Mode Switch
APACHE-2.0 License
https://vcf-dark-mode-switch.netlify.com/
Install vcf-dark-mode-switch
:
npm i @vaadin-component-factory/vcf-dark-mode-switch --save
Once installed, import it in your application:
import '@vaadin-component-factory/vcf-dark-mode-switch';
And use it:
<vcf-dark-mode-switch></vcf-dark-mode-switch>
You can provide a label via a label
attribute.
By toggling the dark mode switch:
theme="dark"
attribute will be toggled on the html
tag.localStorage
with a key vcf-dark-mode
.Note that the component applies dark mode preference from the OS level if the user's preference is not set.
Fork the vcf-dark-mode-switch
repository and clone it locally.
Make sure you have npm installed.
When in the vcf-dark-mode-switch
directory, run npm install
to install dependencies.
Run npm start
to open the demo.
To contribute to the component, please read the guideline first.
Apache License 2.0