Skip to content
ํ”„๋กœ์ ํŠธ

์†Œ๊ฐœ

๐Ÿ–Œ๏ธ <script>๋Š” ๋” ๊ฐ€๋ณ๊ฒŒ, <style>์€ ๋” ์Šค๋งˆํŠธํ•˜๊ฒŒ

๋””์ž์ธ ๋ฐ ๋ฏธ๋””์–ด

์ด ์ˆ˜์น˜๋ฅผ ์ธก์ •ํ•˜๋Š” ๋ฐฉ๋ฒ•

์ธก์ •๋œ ์Šคํƒ€ ์ฆ๊ฐ€

in 24h
0
in 7 days
0
in 15 days
-1
in 1 month
๊ธฐ๋ก ์ˆ˜์ง‘ ์ค‘

์„œ๋กœ ๊ฒน์น˜๋Š” ๊ธฐ๊ฐ„์˜ ์ˆœ์ฆ๊ฐ€๋Ÿ‰์ด๋ฉฐ ์ผ๋ณ„ ํ•ฉ๊ณ„๊ฐ€ ์•„๋‹™๋‹ˆ๋‹ค. ์ธก์ •๊ฐ’์ด ์—†์œผ๋ฉด ๋น„์›Œ ๋‘ก๋‹ˆ๋‹ค. ์Šคํƒ€๋Š” ๊ด€์‹ฌ๋„๋ฅผ ๋‚˜ํƒ€๋‚ด๋ฉฐ ํ’ˆ์งˆ์„ ๋ณด์žฅํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

README.md

Original

Pinceau Cover

Pinceau NPM version

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

๐Ÿ•น๏ธ Try it online โ€ข ๐Ÿ“– Documentation

  • ๐Ÿฆพ Typed Styling API inspired from the tools you already love

    • const Component = $styled.a<Props>({ ...componentStyle })
      const className = styled({ ...scopedCss })
      css({ ...globalCss })
      
  • ๐ŸŽจ Multi-layers Design Tokens compatible theme configuration

  • โšก Plug & play support for any Vite-based framework

    Vue, React, Svelte, Nuxt, Astro

  • ๐Ÿช„ Comes with everything you need to build a robust design system

    • Smart output engine that uses static CSS or CSSOM when you need it
    • Style colocation
    • Style composition
    • Responsive variants API
    • Theming and local tokens
    • Runtime theme swapping
  • ๐Ÿงฑ Fully modulable, let you disable every feature you do not need but needs no configuration to start

  • ๐ŸŒ SSR-ready with optimized hydration and no JS/CSS style duplication

  • โœ… 300+ tests covering every core packages and integrations

  • ๐Ÿฆ VSCode extension for DX Sugar

Planned support for: Qwik, SolidJS, Preact, Lit, yours ?

Pinceau v1 is currently in โš ๏ธ beta, feel free to report any feedback you may have in issues.

โš™๏ธ Install

Vue
pnpm install @pinceau/vue
// vite.config.ts
import Pinceau from '@pinceau/vue/plugin'

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

Example: examples/vite-vue/vite.config.ts

Svelte
pnpm install @pinceau/svelte
// vite.config.ts
import Pinceau from '@pinceau/svelte/plugin'

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

Example: examples/vite-svelte/vite.config.ts

React
pnpm install @pinceau/react
// vite.config.ts
import Pinceau from '@pinceau/react/plugin'

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

Example: examples/vite-react/vite.config.ts

Use our theme or create yours

Use our default theme, ๐ŸŽจ Pigments:

// vite.config.ts
export default defineConfig({
  plugins: [
    Pinceau({
      theme: {
        layers: ['@pinceau/pigments']
      }
    })
  ]
})

Or build your in theme.config.ts:

// theme.config.ts
import { defineTheme } from '@pinceau/theme'

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: examples/theme/theme.config.ts

๐Ÿ’– Credits

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

Stitches โ€ข vanilla-extract โ€ข unocss โ€ข style-dictionary

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

๊ด€๋ จ ํ”„๋กœ์ ํŠธ ์‚ดํŽด๋ณด๊ธฐ

๋ถˆ๋Ÿฌ์˜ค๋Š” ์ค‘โ€ฆ