@swarmakit/svelte v0.0.22
Svelte + TypeScript + Vite
This template should help get you started developing with Svelte and TypeScript in Vite.
Everything you need to build a Svelte and TypeScript project, powered by Svelte.
Installation
Install the @swarmakit/svelte library through npm:
npm install @swarmakit/sveltePrerequisites
Node.js and npm should be installed. You can verify installation with:
node -v
npm -vSetting Up a Vite + Svelte Project (If you haven't already)
To initialize a Vite project for Svelte with Typescript, run:
npm create vite@latest my-svelte-app -- --template svelte-tsreplacing my-svelte-app with your project name.
Then, navigate to your project folder:
cd my-svelte-appImporting Components and Basic Usage in Svelte
Import Components: To use a component in your Svelte files, import it from the
@swarmakit/sveltelibrary as shown below:<script> import { ComponentName } from "@swarmakit/svelte"; </script>Example Usage in a Svelte File: Use the imported component within your Svelte file:
<script> import { ComponentName } from "@swarmakit/svelte"; const exampleProp = "Example text"; </script> <main> <ComponentName propName="{exampleProp}" /> </main>
Available Components: Swarmakit Sveltekit includes a vast library of components. See the full list in the components folder on GitHub.