Work in progress, check back soon - PRs are welcome!
The component names and interface are inspired by the patternfly-react library for React.
Just started this, a lot of components are still missing
npm install --save svelte svelte-patternfly
You need to include a link to patternfly stylesheet in your page - these components do not include or embed any patternfly styles automatically.
Either in your HTML layout:
<head>
<link rel="stylesheet" href="https://unpkg.com/@patternfly/patternfly@2/patternfly.css">
</head>
Or add from your Svelte app:
<svelte:head>
<link rel="stylesheet" href="https://unpkg.com/@patternfly/patternfly@2/patternfly.css">
</svelte:head>
In your svelte component:
<script>
import { Button } from 'svelte-patternfly';
</script>
<Button variant="primary">Hello World!</Button>
If you are using svelte-patternfly in an SSR environment like Sapper, it's recommended you import the component source directly, for example:
<script>
import Button from 'svelte-patternfly/src/Button.svelte';
</script>
<Button variant="primary">Hello World!</Button>