Convert Figma logo to code with AI

chakra-ui logoark

Build scalable design systems with React, Vue, Solid, and Svelte.

4,919
181
4,919
6

Top Related Projects

19,673

Fluent UI web represents a collection of utilities, React components, and web components for building web applications.

Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.

A utility-first CSS framework for rapid UI development.

Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 💅

17,915

👩‍🎤 CSS-in-JS library designed for high performance style composition

An enterprise-class UI design language and React UI library

Quick Overview

Chakra UI Ark is an open-source project that aims to provide a set of low-level, headless UI components for building accessible and customizable user interfaces. It serves as the foundation for Chakra UI v3, offering a more flexible and composable approach to UI development.

Pros

  • Highly customizable and flexible components
  • Focus on accessibility and adherence to WAI-ARIA standards
  • Framework-agnostic, can be used with various JavaScript libraries and frameworks
  • Lightweight and performant due to its headless nature

Cons

  • Still in development, may have incomplete features or documentation
  • Requires more setup and configuration compared to fully styled component libraries
  • Steeper learning curve for developers used to pre-styled components
  • Limited community resources and examples due to its early stage

Code Examples

  1. Creating a custom checkbox using Ark:
import { useCheckbox } from "@chakra-ui/ark"

function CustomCheckbox() {
  const checkbox = useCheckbox()
  return (
    <label>
      <input type="checkbox" {...checkbox.inputProps} />
      <div {...checkbox.controlProps}>
        {checkbox.isChecked ? "✓" : null}
      </div>
      Click me
    </label>
  )
}
  1. Implementing a custom select component:
import { useSelect } from "@chakra-ui/ark"

function CustomSelect() {
  const select = useSelect({
    items: ["Apple", "Banana", "Orange"],
  })
  
  return (
    <div>
      <button {...select.triggerProps}>{select.selectedItem || "Select a fruit"}</button>
      <ul {...select.contentProps}>
        {select.items.map((item) => (
          <li key={item} {...select.getItemProps({ item })}>
            {item}
          </li>
        ))}
      </ul>
    </div>
  )
}
  1. Creating an accessible modal dialog:
import { useModal } from "@chakra-ui/ark"

function AccessibleModal() {
  const modal = useModal()
  
  return (
    <>
      <button {...modal.triggerProps}>Open Modal</button>
      {modal.isOpen && (
        <div {...modal.backdropProps}>
          <div {...modal.contentProps}>
            <h2 {...modal.titleProps}>Modal Title</h2>
            <p>Modal content goes here</p>
            <button {...modal.closeButtonProps}>Close</button>
          </div>
        </div>
      )}
    </>
  )
}

Getting Started

To start using Chakra UI Ark, follow these steps:

  1. Install the package:

    npm install @chakra-ui/ark
    
  2. Import and use the desired hooks in your components:

    import { useButton } from "@chakra-ui/ark"
    
    function MyButton() {
      const button = useButton()
      return <button {...button.buttonProps}>Click me</button>
    }
    
  3. Customize the components by adding your own styles and logic as needed.

Competitor Comparisons

19,673

Fluent UI web represents a collection of utilities, React components, and web components for building web applications.

Pros of Fluent UI

  • Extensive component library with a wide range of UI elements
  • Strong integration with Microsoft products and services
  • Robust documentation and design guidelines

Cons of Fluent UI

  • Steeper learning curve due to its complexity
  • Less flexibility for customization compared to Ark
  • Larger bundle size, which may impact performance

Code Comparison

Ark:

import { Button } from '@ark-ui/react'

function App() {
  return <Button>Click me</Button>
}

Fluent UI:

import { PrimaryButton } from '@fluentui/react'

function App() {
  return <PrimaryButton>Click me</PrimaryButton>
}

Key Differences

  • Ark focuses on providing unstyled, accessible components with a smaller footprint
  • Fluent UI offers a complete design system with pre-styled components
  • Ark allows for more customization and flexibility in styling
  • Fluent UI provides a more opinionated and consistent look out-of-the-box

Use Cases

  • Choose Ark for projects requiring high customization and smaller bundle sizes
  • Opt for Fluent UI when building applications that align with Microsoft's design language or require extensive pre-built components

Community and Support

  • Fluent UI has a larger community and more resources due to Microsoft backing
  • Ark is newer but gaining traction in the React community for its flexibility

Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.

Pros of Material-UI

  • Extensive component library with a wide range of pre-built UI elements
  • Strong community support and extensive documentation
  • Mature project with a long history and proven track record

Cons of Material-UI

  • Larger bundle size due to comprehensive feature set
  • Steeper learning curve for customization and theming
  • More opinionated design system, which may limit flexibility

Code Comparison

Material-UI:

import { Button } from '@mui/material';

<Button variant="contained" color="primary">
  Click me
</Button>

Ark:

import { Button } from '@chakra-ui/ark';

<Button variant="solid" colorScheme="blue">
  Click me
</Button>

Key Differences

  • Ark is a newer project focused on headless components and flexibility
  • Material-UI provides a complete design system, while Ark offers more customization options
  • Ark has a smaller footprint and aims for better performance
  • Material-UI has a larger ecosystem of third-party components and tools

Use Cases

  • Choose Material-UI for rapid development with a consistent, pre-designed look
  • Opt for Ark when you need more control over styling and want to build custom design systems

Community and Support

  • Material-UI has a larger community and more resources available
  • Ark is growing but has less third-party content and fewer Stack Overflow answers

A utility-first CSS framework for rapid UI development.

Pros of Tailwind CSS

  • Larger community and ecosystem, with more resources and third-party tools
  • More flexible and customizable, allowing for fine-grained control over styles
  • Faster development process due to utility-first approach

Cons of Tailwind CSS

  • Steeper learning curve, especially for developers new to utility-first CSS
  • Can lead to verbose HTML markup with multiple classes
  • Requires additional configuration for optimal performance

Code Comparison

Tailwind CSS:

<button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">
  Click me
</button>

Ark:

<Button colorScheme="blue" size="md">
  Click me
</Button>

Additional Notes

Tailwind CSS is a utility-first CSS framework, while Ark is a component library built on top of Chakra UI. Tailwind focuses on providing low-level utility classes, giving developers more control over styling. Ark, on the other hand, offers pre-built, accessible components with a consistent design system.

Tailwind CSS has a larger community and more extensive documentation, making it easier to find solutions and resources. However, Ark benefits from Chakra UI's strong focus on accessibility and theming capabilities.

Ultimately, the choice between Tailwind CSS and Ark depends on project requirements, team preferences, and development approach.

Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 💅

Pros of styled-components

  • Mature and widely adopted with a large community and ecosystem
  • Supports dynamic styling based on props and themes
  • Seamless integration with React components

Cons of styled-components

  • Larger bundle size compared to Ark
  • Steeper learning curve for developers new to CSS-in-JS
  • Potential performance overhead due to runtime style generation

Code Comparison

styled-components:

const Button = styled.button`
  background-color: ${props => props.primary ? 'blue' : 'white'};
  color: ${props => props.primary ? 'white' : 'blue'};
  padding: 10px 20px;
  border: 2px solid blue;
`;

Ark:

import { button } from '@ark-ui/react';

const buttonRecipe = button.raw({
  base: {
    bg: 'blue.500',
    color: 'white',
    px: '4',
    py: '2',
    borderRadius: 'md',
  },
});

Ark focuses on a more atomic and composable approach to styling, while styled-components offers a more traditional CSS-like syntax within JavaScript. Ark aims to provide better performance and a smaller bundle size, but styled-components has the advantage of wider adoption and a more extensive ecosystem.

17,915

👩‍🎤 CSS-in-JS library designed for high performance style composition

Pros of Emotion

  • Mature and widely adopted CSS-in-JS solution with a large ecosystem
  • Offers both object and string styles, providing flexibility in styling approaches
  • Supports server-side rendering out of the box

Cons of Emotion

  • Requires additional setup and configuration for optimal performance
  • Learning curve for developers new to CSS-in-JS concepts
  • Can lead to larger bundle sizes if not optimized properly

Code Comparison

Emotion:

import { css } from '@emotion/react'

const style = css`
  background-color: hotpink;
  &:hover {
    color: ${props => props.color};
  }
`

Ark:

import { css } from '@ark-ui/react'

const style = css({
  backgroundColor: 'hotpink',
  '&:hover': {
    color: props => props.color
  }
})

Both Emotion and Ark provide CSS-in-JS solutions, but Ark is specifically designed for building design systems and component libraries. Emotion offers more flexibility and a broader range of use cases, while Ark focuses on providing a foundation for creating consistent and accessible UI components. Ark also emphasizes type safety and runtime performance, which may be advantageous for larger projects or teams prioritizing these aspects.

An enterprise-class UI design language and React UI library

Pros of Ant Design

  • Extensive component library with a wide range of pre-built UI elements
  • Strong community support and extensive documentation
  • Mature and battle-tested in production environments

Cons of Ant Design

  • Opinionated design system, which may limit customization flexibility
  • Larger bundle size due to the comprehensive component set
  • Steeper learning curve for developers new to the ecosystem

Code Comparison

Ant Design (Button component):

import { Button } from 'antd';

const MyComponent = () => (
  <Button type="primary">Click me</Button>
);

Ark (Button component):

import { Button } from '@chakra-ui/ark';

const MyComponent = () => (
  <Button variant="solid">Click me</Button>
);

Key Differences

  • Ark focuses on providing low-level primitives, while Ant Design offers a complete UI kit
  • Ark emphasizes customization and flexibility, whereas Ant Design provides a more opinionated design system
  • Ant Design has a larger ecosystem and more third-party extensions
  • Ark is newer and still in development, while Ant Design is more established and widely adopted

Use Cases

  • Choose Ant Design for rapid development of enterprise-level applications with a consistent look and feel
  • Opt for Ark when building custom design systems or requiring more granular control over components

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README


Ark UI

Build scalable design systems with unstyled, accessible UI components

MIT License npm downloads GitHub stars Discord

Documentation • Installation • Features • Components • Roadmap • Contributing


Overview

Ark UI is a headless component library that provides the foundation for building high-quality, accessible design systems and web applications. Built on top of Zag.js state machines, Ark UI delivers robust, framework-agnostic component logic with perfect parity across React, Solid, Vue, and Svelte.

Why Ark UI?

  • 🎨 Completely Unstyled - Zero styling opinions. Bring your own styles with CSS-in-JS, Tailwind, vanilla CSS, or any styling solution
  • ♿️ Accessibility First - WCAG compliant components tested with real assistive technologies out of the box
  • 🔄 State Machine Powered - Predictable, testable behavior powered by Zag.js finite state machines
  • 🌍 Multi-Framework - Same API across React, Solid, Vue, and Svelte - write once, use everywhere
  • 📦 Truly Composable - Granular component primitives that work together seamlessly
  • ⚡️ Production Ready - Battle-tested in products like Chakra UI, used by teams at OVHCloud, PluralSight, and more
  • 🎯 Type-Safe - Fully typed with TypeScript for exceptional developer experience

Installation

Choose your framework and install the corresponding package:

# React
npm install @ark-ui/react

# Solid
npm install @ark-ui/solid

# Vue
npm install @ark-ui/vue

# Svelte
npm install @ark-ui/svelte

Quick Start

Here's a simple example showing how consistent the API is across frameworks:

React

import { Dialog } from '@ark-ui/react/dialog'

export const MyDialog = () => (
  <Dialog.Root>
    <Dialog.Trigger>Open Dialog</Dialog.Trigger>
    <Dialog.Backdrop />
    <Dialog.Positioner>
      <Dialog.Content>
        <Dialog.Title>Dialog Title</Dialog.Title>
        <Dialog.Description>Dialog description</Dialog.Description>
        <Dialog.CloseTrigger>Close</Dialog.CloseTrigger>
      </Dialog.Content>
    </Dialog.Positioner>
  </Dialog.Root>
)

Vue

<script setup lang="ts">
import { Dialog } from '@ark-ui/vue/dialog'
</script>

<template>
  <Dialog.Root>
    <Dialog.Trigger>Open Dialog</Dialog.Trigger>
    <Dialog.Backdrop />
    <Dialog.Positioner>
      <Dialog.Content>
        <Dialog.Title>Dialog Title</Dialog.Title>
        <Dialog.Description>Dialog description</Dialog.Description>
        <Dialog.CloseTrigger>Close</Dialog.CloseTrigger>
      </Dialog.Content>
    </Dialog.Positioner>
  </Dialog.Root>
</template>

Solid

import { Dialog } from '@ark-ui/solid/dialog'

export const MyDialog = () => (
  <Dialog.Root>
    <Dialog.Trigger>Open Dialog</Dialog.Trigger>
    <Dialog.Backdrop />
    <Dialog.Positioner>
      <Dialog.Content>
        <Dialog.Title>Dialog Title</Dialog.Title>
        <Dialog.Description>Dialog description</Dialog.Description>
        <Dialog.CloseTrigger>Close</Dialog.CloseTrigger>
      </Dialog.Content>
    </Dialog.Positioner>
  </Dialog.Root>
)

Svelte

<script lang="ts">
  import { Dialog } from '@ark-ui/svelte/dialog'
</script>

<Dialog.Root>
  <Dialog.Trigger>Open Dialog</Dialog.Trigger>
  <Dialog.Backdrop />
  <Dialog.Positioner>
    <Dialog.Content>
      <Dialog.Title>Dialog Title</Dialog.Title>
      <Dialog.Description>Dialog description</Dialog.Description>
      <Dialog.CloseTrigger>Close</Dialog.CloseTrigger>
    </Dialog.Content>
  </Dialog.Positioner>
</Dialog.Root>

Features

Zero-Styling Freedom

Every component is completely unstyled, giving you total control over your design. Use any styling solution:

// Tailwind CSS
<Dialog.Trigger className="px-4 py-2 bg-blue-500 rounded">Open</Dialog.Trigger>

// CSS-in-JS
<Dialog.Trigger css={{ padding: '8px 16px', background: 'blue' }}>Open</Dialog.Trigger>

// Vanilla CSS
<Dialog.Trigger className="my-button">Open</Dialog.Trigger>

Accessibility Built-In

All components follow WAI-ARIA design patterns and are tested with screen readers:

  • ✅ Proper ARIA attributes and roles
  • ✅ Keyboard navigation support
  • ✅ Focus management
  • ✅ Screen reader announcements
  • ✅ RTL support

State Machine Architecture

Powered by Zag.js, each component uses finite state machines for predictable behavior:

  • 🔒 Type-safe state transitions
  • 🧪 Easier to test and debug
  • 🐛 Fewer edge cases and bugs
  • 📊 Visualizable component logic

Framework Parity

Maintain a single design system across multiple frameworks without rewriting component logic:

// Same API, same behavior, different frameworks
const packages = ['@ark-ui/react', '@ark-ui/solid', '@ark-ui/vue', '@ark-ui/svelte']

Components

Ark UI provides 45+ production-ready components covering common UI patterns:

Layout & Navigation

  • Accordion
  • Tabs
  • Splitter
  • Steps
  • Tree View
  • Tour

Overlays & Dialogs

  • Dialog
  • Popover
  • Tooltip
  • Hover Card
  • Bottom Sheet
  • Floating Panel

Forms & Inputs

  • Checkbox
  • Radio Group
  • Select
  • Combobox
  • Number Input
  • Pin Input
  • Tags Input
  • Editable
  • File Upload
  • Color Picker
  • Date Picker
  • Password Input
  • Signature Pad
  • Slider
  • Angle Slider
  • Rating Group
  • Switch
  • Toggle / Toggle Group

Data Display

  • Avatar
  • Highlight
  • Progress
  • QR Code
  • Format
  • JSON Tree View
  • Marquee

Utilities

  • Carousel
  • Clipboard
  • Collapsible
  • Field / Fieldset
  • Menu
  • Pagination
  • Portal
  • Presence
  • Scroll Area
  • Segment Group
  • Timer
  • Toast
  • Client Only
  • Download Trigger
  • Focus Trap
  • Frame
  • Collection
  • Listbox

View all components →

Documentation

Visit ark-ui.com for:

  • 📖 Comprehensive guides and tutorials
  • 📚 Detailed API references for each component
  • 💡 Interactive examples and recipes
  • 🎓 Styling guides for popular frameworks
  • 🔧 TypeScript usage patterns

Ecosystem

Built with Ark UI

  • Chakra UI v3 - A simple, modular component library
  • Park UI - Beautifully designed components built with Ark UI and Panda CSS
  • Tark UI - Ark UI components styled with Tailwind CSS

Styling Libraries

Ark UI works seamlessly with:

Developer Tools

  • MCP Server - AI-assisted development with Claude and other AI agents

Community

  • 💬 Discord - Join our community for help and discussions
  • 🐦 Twitter - Follow us for updates and announcements
  • 🗺️ Roadmap - Request features and vote on upcoming work
  • 📝 Blog - Read about releases and technical deep dives

Contributing

We welcome contributions! Please read our Contributing Guide to learn about:

  • Setting up your development environment
  • Our development workflow
  • Code conventions and standards
  • How to submit pull requests

Support

Sponsors

Ark UI is maintained by Christian Schröter, Segun Adebayo, and the Chakra UI team. Development is supported by our amazing sponsors:

Become a sponsor →

License

MIT © Chakra Systems Inc.


Made with ❤️ by the Ark UI Community