svelte-object

2.0.3 • Public • Published


👉   Define objects in your markup-structure!
💫   Driven by Svelte 5's runes for highly robust code
🔥   Handles submit events and validation


    Made for Svelte 5

Get started with literal wizardry!🧙‍♂️
bun add -D svelte-object  /  npm i -D svelte-object  /  pnpm add -D svelte-object


This could be your code See REPL

<h3> An array of pets </h3>

<I.Array bind:value={pets}>
	{#snippet item(prop)}
		<I.Object name={prop.index}>
			<Input name='name' min={2}>Pets name</Input>
			<Input name='age' type='number'>Pets age</Input>
		</I.Object>
	{/snippet}
	<button on:click={() => pets.push({})}> Add pet </button>
</I.Array>

[!NOTE]
What are you waiting for? Get Started!



Package Sidebar

Install

npm i svelte-object

Weekly Downloads

44

Version

2.0.3

License

MIT

Unpacked Size

25.6 kB

Total Files

29

Last publish

Collaborators

  • refzlund