Skip to content

Park UI Roadmap to 1.0 #466

Open
Open
@cschroeter

Description

@cschroeter

Park UI Roadmap to 1.0

Park UI is evolving to provide a more intuitive, flexible, and maintainable component system. These updates should make Park UI more adaptable and easier to work with, directly reflecting our user feedback. Here's our path to version 1.0:

Configuration Updates (v0.43)

The configuration system is being streamlined to provide more direct control over theming:

import { defineConfig } from '@pandacss/dev'
import { createPreset } from '@park-ui/panda-preset'
import amber from '@park-ui/panda-preset/colors/amber'
import sand from '@park-ui/panda-preset/colors/sand'

export default defineConfig({
  preflight: true,
  presets: [createPreset({ accentColor: amber, grayColor: sand, radius: 'sm' })],
  include: ['./src/**/*.{js,jsx,ts,tsx,vue}'],
  jsxFramework: 'react', // or solid or vue
  outdir: 'styled-system',
})

Simplifying Color Tokens (v0.43)

- <Box color="accent.default"/>
+ <Box color="colorPalette.default" />

The previous structure for color tokens looked like this:

colorPalette.1  
  └── accent.1  
      └── amber.1  
          ├── amber.light.1  
          └── amber.dark.1  

However, in our recipes and preset, the "accent" portion is unnecessary and can be simplified to:

colorPalette.1  
  └── amber.1  
      ├── amber.light.1  
      └── amber.dark.1  

Recipes

Component recipes will be embedded within the component snippets, making customization and adjustments easier:

import { ark } from '@ark-ui/react/factory'
import { cva } from 'styled-system/css'
import { styled } from 'styled-system/jsx'
import type { ComponentProps } from 'styled-system/types'

const buttonRecipe = cva({
  base: {
    display: 'inline-flex',
  },
  defaultVariants: {
    variant: 'solid',
    size: 'md',
  },
  variants: {
    variant: {
      solid: {},
      subtle: {},
      outline: {},
    },
    size: {
      sm: {},
      md: {},
      lg: {},
    },
  },
})

export type ButtonProps = ComponentProps<typeof Button>
export const Button = styled(ark.button, buttonRecipe)

Update Compositions (v0.7)

Compositions will be updated to match the one in Chakra UI. You can learn more about compositions here.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions