Coder Social home page Coder Social logo

ark-ui-issue-reproduction's Introduction

Panda Emoji

Panda Boilerplate

A starter template that uses the NextJS App Router, TypeScript, and PandaCSS.

πŸ‘ NextJS App Router

The Next.js App Router is the current standard for building applications using React's latest features.

The significant feature of Next.js App Router are Server Components.

  • Previously, with the Pages Router, each of your pages are rendered on the client or the server.

  • Currently, with the App Router, your components within each page can be rendered on the client or the server.

This allows more of your application to receive the benefits of server rendering.

πŸ“š UI Libraries

The challenge is that the majority UI Libraries are not compaitable to be used in Server Components.

Per Segun's (Founder of Chakra UI) Future of Chakra Blog:

"The major technical disadvantage Chakra UI has is its runtime CSS-in-JS due to the @emotion/styled dependency. This isn't unique to Chakra, but the same is true of other popular libraries like Material UI, Mantine, and Theme UI.

Getting rid of the runtime CSS-in-JS is one of the most common requests we get from our users, as it unlocks better performance, reduces the initial JS payload, and, enables the usage of Chakra in React Server Components (RSC)."

Although TailwindCSS is considered to be the most used UI library and is Server Component compatible, Chakra UI was still considered to be the UI Library with the best developer experience.

🀝 PandaCSS

PandaCSS has now been launched by the Chakra UI team with the same great developer experience and semantics as Chakra UI with zero runtime CSS-in-JS for Server Components compatibility.

πŸ—οΈ Component Library

Chakra UI was a monolithic all-in-one UI solution handling the styling system, design tokens, headless UI components (the pre-built UI components), and state machines (the model logic the UI components use).

Now, PandaCSS is responsible for the Styling System (style functions, style props, and recipes) and Design Tokens. A separate library will be responsible for pre-built accessible UI components library and logic.

If you are coming from Chakra UI or another UI Library that provides a Component Library to import pre-built components and wish to continue to use a component library, you may supplement PandaCSS with a headless UI library such as Ark UI or Park UI.

πŸš€ Usage

First, install the dependencies:

pnpm install

Then, run the application:

pnpm dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

🎨 Code Style

We use ESLint for our code style. You may modify the ESLint rule set in the .eslintrc.js file. Include ESLint On Save in your code editor Preferences settings.

{
    "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true
    }
}

See

🧐 What's inside?

A quick look at the top-level files and directories where we made our feature changes in the project.

src
└── app
     β”œβ”€β”€ layout.tsx
     └── page.tsx
styled-system
β”œβ”€β”€ ...
└── ...
eslintrc.js
panda.config.ts
  1. /src/app: This directory will contain all of the code related to what you will see on the front-end of the site. src is a convention for β€œsource code” and app is the convention for β€œapp router”.

  2. src/app/layout.tsx: This file contains the Root Layout. The JSX elements in this file applies onto all routes with routes being {children}. See NextJS Documentation: Layouts

  3. src/app/page.tsx: This file contains the code for the front-end page. See NextJS Documentation: Pages

  4. /styled-system: This folder contains the core functioning files for Panda CSS. You would not modify any files in this folder.

  5. eslintrc.js: This file contains the ESLint rule configuration.

  6. panda.config.ts: This file configures how Panda works, including adding in global styles. See Panda Config Reference

πŸ“£ Recognition

Thank you to Segun Abedbayo, the Chakra UI team, and all contributors for the creation of PandaCSS.

ark-ui-issue-reproduction's People

Contributors

renchris avatar

Watchers

 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.