Park UI Documentation

repository·main·Indexed 25 days ago

https://github.com/chakra-ui/park-ui

A collection of styled components built on Ark UI for headless logic and Panda CSS for styling. Park UI is framework-agnostic, supporting JavaScript frameworks such as React, Solid, and Vue. It includes a CLI for initialization and component management, and a comprehensive set of components including Accordion, Avatar, Button, Carousel, Checkbox, and Clipboard.

Tokens
39.9K
Snippets
100
Records
347
Agent score
80%

What's inside Park UI

  1. The relationship between Park UI and Ark UI

    main
    Park UI components are built on top of Ark UI, a headless component library. While Ark UI provides the logic and accessibility (headless functionality), Park UI provides the styling and component implementation. This architecture ensures that components are highly composable and maintain a predictable interface across different JavaScript frameworks.
  2. How Pagination.Items works internally

    main

    The Pagination.Items shortcut is a convenience wrapper. Rendering <Pagination.Items /> is functionally equivalent to using the Pagination.Context to map over the pages array and conditionally rendering either a Pagination.Item or a Pagination.Ellipsis based on the page type.

    <Pagination.Context>
      {({ pages }) =>
        pages.map((page, index) =>
          page.type === "page" ? (
            <Pagination.Item key={index} {...page} />
          ) : (
            <Pagination.Ellipsis key={index} index={index} />
          ),
        )
      }
    </Pagination.Context>
  3. Choose color pairings for your theme

    main

    Park UI themes are built around the combination of one accent color and one gray color. You can choose between two pairing strategies:

    • Neutral Pairings: Using a neutral gray scale. This works well with any accent hue and provides a simple, clean vibe.
    • Natural Pairings: Choosing a gray scale that is saturated with the hue closest to your accent hue. This creates a more colorful and harmonious visual vibe.
  4. Use standardized Park UI variants

    main

    To ensure visual harmony, Park UI defines five standardized variants that are shared across components. You can use these to maintain a consistent look and feel when combining different elements:

    • solid: High-contrast background with inverted foreground. Best for primary CTAs and main actions.
    • subtle: Tinted background with matching foreground. Best for badges, tags, and secondary highlights.
    • surface: Background with a visible border and hover states. Best for cards, menu items, and elevated containers.
    • outline: Border-only with a transparent background. Best for secondary actions, cancel buttons, and filters.
    • plain: Minimal style with background appearing only on interaction. Best for text buttons, links, and tabs.