pinceau

Make your lighter and your smarter.
88,358 690
Install
npm install pinceau@0.20.2
Latest Version:0.20.2
Vue:3
License:MIT
Last Updated:Nov 5, 2024
Links: GitHub  ·  npm
Maintainer: tahul

Pinceau Cover

Pinceau

NPM version

Make your <script> lighter and your <style> smarter.

🎨 play.pinceau.dev • 🧑‍🎨 Documentation

⚙️ Install

npm i pinceau
// nuxt.config.js
export default defineNuxtConfig({
  modules: [
    'pinceau/nuxt',
  ],
  pinceau: {
    ...PinceauOptions
  }
})

Example: playground/

This module only works with Nuxt 3.

// vite.config.ts
import Pinceau from 'pinceau/vite'

export default defineConfig({
  plugins: [
    Pinceau(PinceauOptions),
  ],
})

Example: playground/_vite.config.ts

// tokens.config.ts
import { defineTheme } from 'pinceau'

export default defineTheme({
  // Media queries
  media: {
    mobile: '(min-width: 320px)',
    tablet: '(min-width: 768px)',
    desktop: '(min-width: 1280px)'
  },


  // Some Design tokens
  color: {
    red: {
      1: '#FCDFDA',
      2: '#F48E7C',
      3: '#ED4D31',
      4: '#A0240E',
      5: '#390D05',
    },
    green: {
      1: '#CDF4E5',
      2: '#9AE9CB',
      3: '#36D397',
      4: '#1B7D58',
      5: '#072117',
    }
  },
  space: {
    1: '0.25rem',
    2: '0.5rem',
    3: '0.75rem',
    4: '1rem'
  }

  // Utils properties
  utils: {
    px: (value: PropertyValue<'padding'>) => ({ paddingLeft: value, paddingRight: value }),
    py: (value: PropertyValue<'padding'>) => ({ paddingTop: value, paddingBottom: value })
  }
})

Example: playground/theme/tokens.config.ts

Learn more about Pinceau in the documentation].

💖 Credits

Thanks to these amazing people that helped me along the way:

This package takes a lot of inspiration from these amazing projects:

License

MIT License © 2022-PRESENT Yaël GUILLOUX


“All you need to paint is a few tools, a little instruction, and a vision in your mind.” • Bob Ross

Related Packages

unplugin-vue-prop

Add import define props type support for Vue3 script-setup and lang is typescrip...

1,105 2
@storybook-vue/nuxt

Storybook addon for Nuxt and Vite

2,665,088 490
@nuxtjs/storybook

Storybook module for Nuxt

2,341,848 489
@storybook-nuxt/framework

Storybook for Nuxt and Vite: Develop Vue3 components in isolation with Hot Reloa...

792 132
@storybook-nuxt/monorepo

Storybook for Nuxt and Vite: Develop Vue3 components in isolation with Hot Reloa...

297

Version History

Version Released License
0.20.2 MIT
0.20.1 MIT
0.20.0 MIT
0.19.2 MIT
0.19.1 MIT
Pre-releases (17)
Version Released License
1.0.0-beta.29
1.0.0-beta.28
1.0.0-beta.27
1.0.0-beta.25
1.0.0-beta.24