0.0.2 • Published 4 years ago

svelte-step-wizard v0.0.2

Weekly downloads
278
License
MIT
Repository
github
Last release
4 years ago

svelte-step-wizard

Simple Svelte step wizard component

Install

npm i svelte-step-wizard

Example

REPL Example

<script>
	import StepWizard from 'svelte-step-wizard'
</script>

<StepWizard initialStep={1}>
	<StepWizard.Step num={1} let:nextStep>
		<p>
			This is the first step.
		</p>
		<button on:click={nextStep}>
			Next Step	>
		</button>
	</StepWizard.Step>
	<StepWizard.Step num={2} let:previousStep let:nextStep>
		<p>
			Keep going.
		</p>
		<button on:click={previousStep}>
			Go Back
		</button>
		<button on:click={nextStep}>
			Next Step	>
		</button>
	</StepWizard.Step>
	<StepWizard.Step num={3} let:previousStep>
		<p>
			Done!
		</p>
		<button on:click={previousStep}>
			Go Back
		</button>
	</StepWizard.Step>
</StepWizard>