Installation
corvu provides every UI primitive as a separate package. This allows you to only install the primitives you need, to use the semver of every package as a reference for breaking/feature changes and progressively update packages in case of new versions.
For example the drawer component is available as @corvu/drawer
:
npm install @corvu/drawer
If you want to install all primitives at once you can install the main package. Unused primitives will get tree-shaken by your bundler, so you don’t have to worry about the bundle size.
npm install corvu
You’re good to go! Head over to Usage to learn how to use corvu.
TailwindCSS plugin Section titled TailwindCSS plugin
If you want make use of the tailwind modifiers like corvu-open:
, install the tailwind plugin:
npm install @corvu/tailwind
Then add the plugin to your tailwind.config.js
file:
module.exports = {
// ...
plugins: [
// Use it with the default prefix 'corvu'
require('@corvu/tailwind'),
// or with a custom prefix
require('@corvu/tailwind')({ prefix: 'ui' }),
// ...
],
}
Check out the Styling guide learn how to use the tailwind plugin.
UnoCSS preset Section titled UnoCSS preset
We also provide a preset for UnoCSS that adds the same modifiers.
npm install @corvu/unocss
Add the preset to your uno.config.tsx
file:
import { defineConfig } from 'unocss'
import presetCorvu from '@corvu/unocss'
export default defineConfig({
// ...
presets: [
// Use it with the default prefix 'corvu'
presetCorvu(),
// or with a custom prefix
presetCorvu({ prefix: 'ui' }),
// ...
],
})
Check out the Styling guide learn how to use the UnoCSS preset.
Developed and designed by Jasmin