Using `themeChanger`

theme persistence

For now a theme changer will not persistence a theme, after refresh a page the theme will going back to default or what ever you initial setting for theme name that given to themeChanger

Lists of theme name:



.svelte
+
+
+
<script>
	import svlatepickr from 'svelte-flatpickr-plus';
	import { themeChanger, themeNames } from 'svelte-flatpickr-plus'; 

	let value = $state();
	// you can using theme name from svelte-flatpickr-plus
	let themeName = $state(themeNames.default); 

	// on reactive of theme name will be load new css to document
	// while default theme will remove and not load any .css
	$effect(async () => {
		if (themeName) {
			themeChanger(themeName); 
		}
	});
</script>

<input name="datepicker" use:svlatepickr />
svelte

Result:

Value :

please select date from input above.