0.0.22 • Published 10 months ago

@swarmakit/svelte v0.0.22

Weekly downloads
-
License
-
Repository
github
Last release
10 months ago

Svelte + TypeScript + Vite

Hits NPM Version npm downloads License Build and Publish Monorepo

Static Badge Static Badge

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/svelte

Prerequisites

Node.js and npm should be installed. You can verify installation with:

node -v
npm -v

Setting 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-ts

replacing my-svelte-app with your project name.

Then, navigate to your project folder:

cd my-svelte-app

Importing Components and Basic Usage in Svelte

  1. Import Components: To use a component in your Svelte files, import it from the @swarmakit/svelte library as shown below:

    <script>
      import { ComponentName } from "@swarmakit/svelte";
    </script>
  2. 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.

0.0.22

10 months ago

0.0.21

10 months ago

0.0.20

10 months ago

0.0.19

10 months ago

0.0.18

10 months ago

0.0.15

10 months ago

0.0.13

10 months ago

0.0.12

10 months ago

0.0.10

11 months ago

0.0.8

12 months ago

0.0.6

12 months ago