Quickstart

You can either use @likable-hair/svelte package in a sveltekit project or whatever framework that is capable of compiling sveltekit components.

We advise you to use sveltekit because it helps you to keep files ordered and do the hard work under the hood.

Use Sveltekit

Follow the sveltekit starter project tutorial to create a new blank sveltekit app.

After the app is created just install the package:

npm install @likable-hair/svelte

Then you have to create a +layout.svelte in the root of the routes directory and import the css file:

routes/+layout.svelte
<script lang="ts">
  import '@likable-hair/svelte/css/main.css';
</script>

<!-- the layout code ... -->

Then you're free to go! You can write component like this:

/routes/+page.svelte
<script lang="ts">
  import { Button } from '@likable-hair/svelte'
  let buttonText: string = "hello world"
</script>

<Button>{buttonText}</Button>
Previous
Next