Giter VIP home page Giter VIP logo

panda's Introduction

Write typesafe styles with Panda


Panda is a universal styling solution for the modern web —
build time, type safe, and scalable CSS-in-JS

Features

  • ⚡️ Write style objects or style props, extract them at build time
  • ✨ Modern CSS output — cascade layers @layer, css variables and more
  • 🦄 Works with most JavaScript frameworks
  • 🚀 Recipes and Variants - Just like Stitches™️ ✨
  • 🎨 High-level design tokens support for simultaneous themes
  • 💪 Type-safe styles and autocomplete (via codegen)


🐼 Get a taste of Panda. Try it out for yourself in  StackBlitz



Documentation

Visit our official documentation.

Install

The recommended way to install the latest version of Panda is by running the command below:

npm i -D @pandacss/dev

To scaffold the panda config and postcss

npx panda init -p

Setup and import the entry CSS file

@layer reset, base, tokens, recipes, utilities;
import 'path/to/entry.css'

Start the dev server of your project

npm run dev

Start using panda

import { css } from '../styled-system/css'
import { stack, vstack, hstack } from '../styled-system/patterns'

function Example() {
  return (
    <div>
      <div className={hstack({ gap: '30px', color: 'pink.300' })}>Box 1</div>
      <div className={css({ fontSize: 'lg', color: 'red.400' })}>Box 2</div>
    </div>
  )
}

Directory Structure

Package Description
cli CLI package installed by the end user
core Contains core features of Panda (utility, recipes, etc)
config Contains functions for reading and merging the panda config
extractor Contains code for fast AST parsing and scanning
generator Contains codegen artifacts (js, css, jsx)
parser Contains code for parsing a source code
is-valid-prop Contains code for checking if a prop is a valid css prop
node Contains the Node.js API of Panda's features
token-dictionary Contains code used to process tokens and semantic tokens
shared Contains shared TS functions

Support

Having trouble? Get help in the official Panda Discord.

Acknowledgement

The development of Panda was only possible due to the inspiration and ideas from these amazing projects.

License

MIT License © 2023-Present Segun Adebayo

panda's People

Contributors

segunadebayo avatar renovate[bot] avatar astahmer avatar anubra266 avatar github-actions[bot] avatar cschroeter avatar timkolberger avatar themosaad avatar estheragbaje avatar pawelblaszczyk5 avatar bmsuseluda avatar jeiea avatar nguyenyou avatar yasnbouz avatar ihiutch avatar thejackshelton avatar dcheglakov avatar blechatellier avatar mzaien avatar makotot avatar manucorporat avatar markelarizaga avatar 0o001 avatar poiu694 avatar qin-guan avatar raphaelcunha avatar ruckonic avatar wobsoriano avatar mingyu-song avatar simonswiss avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.