1.0.0-next.14 • Published 2 years ago
@twind/sveltekit v1.0.0-next.14
@twind/sveltekit
READ THIS FIRST!
Twind v1 is still in beta. Expect bugs!
Seamless integration of twind for SvelteKit
Used within the following examples:
Installation
Install from npm:
npm install twind @twind/sveltekit@next
Usage
Please see examples/sveltekit for detailed usage example.
src/routes/__layout.svelte
<script type="module">
import { setup } from 'twind'
// import { setup } from '@twind/tailwind'
import twindConfig from '../twind.config'
setup(twindConfig)
</script>
src/hooks
— SvelteKit › Hooks
enable for server-side rendering of Twind styles
import { withTwind } from '@twind/sveltekit'
export const handle = withTwind()
If your have other handles use the sequence
helper:
import { sequence } from '@sveltejs/kit/hooks'
export const handle = sequence(withTwind(), ...otherHandles)
Using a custom Twind instance:
import { withTwind } from '@twind/sveltekit'
import { tw } from './custom/twind/instance'
export const handle = withTwind(tw)
API
withTwind([tw])
TBD
1.0.0-next.34
2 years ago
1.0.0-next.33
2 years ago
1.0.0-next.32
2 years ago
1.0.0-next.31
2 years ago
1.0.0-next.30
2 years ago
1.0.0-next.28
2 years ago
1.0.0-next.27
2 years ago
1.0.0-next.26
2 years ago
1.0.0-next.25
2 years ago
1.0.0-next.24
2 years ago
1.0.0-next.23
2 years ago
1.0.0-next.22
2 years ago
1.0.0-next.21
2 years ago
1.0.0-next.20
2 years ago
1.0.0-next.19
2 years ago
1.0.0-next.18
2 years ago
1.0.0-next.17
2 years ago
1.0.0-next.16
2 years ago
1.0.0-next.14
2 years ago