@kwangure/strawberry

A set of svelte components

Usage no npm install needed!

<script type="module">
  import kwangureStrawberry from 'https://cdn.skypack.dev/@kwangure/strawberry';
</script>

README

A set of Svelte components.

🍓 Strawberry is not stable. Its APIs are useable for most uses cases, but are not "finalized" and will have breaking changes. We're still getting the architecture right.

Installation

npm i @kwangure/strawberry

Usage

Include the Strawberry Vite plugin in your config.

// svelte.config.js
import { strawberry } from "@kwangure/strawberry/build/vite-plugin-strawberry";

/** @type {import("@sveltejs/kit").Config} */
export default {
    kit: {
        ...
        vite: {
            plugins: [
                strawberry(),
                ...
            ],
        }
        ...
    }
};
<script>
    // Import the `Theme` component to add styling
    import Theme from "@kwangure/strawberry/components/Theme";

    import Button from "@kwangure/strawberry/components/Button";

    const hello = () => console.log('strawberry');
</script>

<Theme />

<div class="document">
    <Button on:click={hello}>Click me!</Button>
</div>

<style>
    .document {
        --br-button-width: 50px;
        --br-button-border: 3px solid red;
    }
</style>

Note: This library is for use in svelte-kit projects only.

License

Apache 2.0 © Kafungo Wangure