HeroUI (formerly NextUI)

repository·v3·Indexed 11 days ago

https://github.com/nextui-org/nextui

A React component library built on React Aria and Tailwind CSS v4, featuring a compound component API and zero-boilerplate setup. It provides a full component bundle via @heroui/react, a framework-agnostic design system engine via @heroui/styles, and specialized AI integration tools including an MCP server and llms.txt for AI-powered development.

Tokens
642.4K
Snippets
1.9K
Records
2.8K
Agent score
90%

What's inside HeroUI

  1. What is included in HeroUI Native Agent Skills

    v3

    The HeroUI Native Agent Skills package provides the following knowledge to your AI assistant:

    • HeroUI Native installation guide: Instructions for setting up the environment.
    • Component Knowledge: All HeroUI Native components including their props, usage examples, and patterns.
    • Theming and Styling: Guidelines for using Uniwind for theming and styling.
    • Design Principles: Information on composition patterns and design principles for mobile development.
  2. Introduction to HeroUI

    v3

    HeroUI is an open-source React component library designed for building beautiful, accessible user interfaces. It is built on top of Tailwind CSS v4 and React Aria Components, ensuring high-quality animations, polished details, and built-in accessibility (focus management, keyboard navigation, and screen reader support) out of the box.

    Key Features

    • Accessibility: Built with React Aria Components to meet WCAG standards.
    • Customizability: Every component is composed of customizable slots. You can use Tailwind utility classes, CSS variables, or BEM modifiers to style components.
    • Developer Experience: Fully typed API with excellent IDE support and autocomplete.
    • Performance: Supports Tree Shaking to ensure only the components you use are included in your bundle.
    • Modern Stack: Built for React 19 and Tailwind CSS v4, and optimized for AI-assisted development.
  3. Overview of HeroUI features and architecture

    v3

    HeroUI is a modern React UI component library designed for React 19 and Next.js App Router. It combines accessibility, styling flexibility, and AI-ready tooling.

    Core Architecture

    • Accessibility-first: Built on React Aria primitives, ensuring robust screen reader support, keyboard navigation, and ARIA compliance out of the box.
    • Tailwind CSS v4 Native: Uses CSS-based theming with @theme and design tokens, avoiding the runtime overhead associated with CSS-in-JS.
    • Compound Component API: Employs a composable pattern (e.g., Card.Header, Card.Content, Card.Footer) to provide full control over markup and layout.
    • Server Component Friendly: Designed with React Server Components (RSC) in mind, featuring minimal and clearly documented client boundaries.

    AI Tooling Support

    HeroUI provides specialized resources to help AI coding assistants work with its APIs accurately:

    • MCP server
    • llms.txt
    • Agent skills

    When to use HeroUI

    Ideal for new projects using Next.js, React 19, and Tailwind CSS v4 that require a modern, accessible component library with first-class AI tooling support.

  4. Introduction to HeroUI Native

    v3

    HeroUI Native is an open-source React Native UI component library designed for building beautiful and accessible mobile interfaces. It is built on top of Tailwind v4 and Uniwind, making it compatible with modern mobile technology stacks like Expo.

    Key features include:

    • Accessibility First: Built-in focus management, touch accessibility, and screen reader support.
    • Highly Composable: Components are made of replaceable sub-parts (slots) for deep customization.
    • Developer Experience: Full TypeScript support with excellent IDE autocompletion.
    • Lightweight: Supports tree-shaking to ensure only used components are bundled.
    • AI-Friendly: APIs are designed to be compatible with AI-assisted development and code generation.
  5. What is included in HeroUI Migration Agent Skills

    v3

    The HeroUI Migration Skills package provides a comprehensive knowledge base for upgrading projects, including:

    • Migration workflows: Both full and incremental approaches.
    • Component guides: Specific migration instructions for 39 components.
    • Hooks migration: Guidance on replacing deprecated hooks (e.g., useDisclosureuseOverlayState).
    • Styling migration: Documentation for utility classes, color tokens, and CSS variables.
    • API changes: Details on key API updates and new compound component patterns.
  6. Core features of HeroUI

    v3

    HeroUI (formerly NextUI) is a React component library with the following key characteristics:

    • Accessibility: Built on React Aria for WCAG-compliant keyboard, focus, and screen-reader behavior.
    • Styling: Uses Tailwind CSS v4 for utility-first styling with no CSS-in-JS runtime overhead.
    • API Pattern: Uses a compound component API (e.g., Card.Header, Card.Content) for better composability.
    • Zero Boilerplate: Unlike many other libraries, HeroUI requires no <Provider> wrapper to function.
    • Compatibility: Works out of the box with React 19 and Next.js.
  7. Why choose HeroUI for your design system

    v3

    HeroUI is a React UI library designed for enterprise-grade applications, focusing on accessibility, performance, and AI-native developer workflows. It combines the accessibility primitives of React Aria, the styling power of Tailwind CSS v4, and a Compound Component API to provide structural control without prop explosion.

    Key Pillars:

    • Accessibility: Built on Adobe's React Aria, providing industry-leading WCAG compliance, keyboard navigation, screen reader support, and internationalization.
    • Styling: Native support for Tailwind CSS v4 with zero runtime CSS overhead and design tokens defined via standard CSS @theme directives.
    • API Pattern: Uses a Compound Component pattern (e.g., Card.Header, Modal.Body) for high structural flexibility and fine-grained styling.
    • AI-Native: Provides specialized tools like MCP servers, llms.txt, and Agent Skills to ensure AI coding assistants generate accurate, up-to-date code.
  8. Compare HeroUI and Material UI (MUI)

    v3

    HeroUI and MUI represent different philosophies in component library design.

    HeroUI is built for flexibility and modern performance:

    • Styling: Uses Tailwind CSS v4 (static CSS), which avoids the runtime overhead of CSS-in-JS.
    • Accessibility: Built on React Aria, providing industry-leading accessibility coverage.
    • Design: Neutral by default, making it easy to customize via CSS custom properties (design tokens) to match any brand.
    • Architecture: Uses a compound component pattern for structural flexibility.
    • Best for: New projects using Tailwind CSS, teams prioritizing accessibility, and developers using AI coding tools.

    MUI is built around a specific design system:

    • Styling: Uses Emotion by default (runtime CSS-in-JS), with Pigment CSS as an experimental option.
    • Accessibility: Uses a custom implementation.
    • Design: Strictly follows Google's Material Design guidelines. Theming away from Material Design requires significant effort.
    • Best for: Projects requiring strict Material Design compliance or specific enterprise features like MUI X (Data Grid, Charts).
  9. Use the HeroUI CLI to manage projects

    v3

    The HeroUI CLI provides a suite of commands to initialize, manage, and maintain HeroUI projects. Key capabilities include:

    • Dependency Management: install, uninstall, or upgrade individual HeroUI components.
    • Project Health: Use doctor to assess the health of your project.
    • Initialization: Use init to set up new projects.
    • AI Integration: Use agents-md to download documentation specifically formatted for AI coding agents.
    • Information: Use list to view available components and env to check environment settings.
  10. Key benefits of HeroUI Native styling and theming

    v3

    HeroUI Native uses a CSS-first approach for styling and theming, which provides several advantages for developers:

    • Upgrade-safe customization: You customize the UI by overriding tokens and writing CSS rather than forking component internals, ensuring library updates remain compatible.
    • Systemic propagation: Changing a single token (like an accent color or base radius) automatically updates all derived states and sizes across the system.
    • Performance-oriented theming: Themes are managed in CSS via Uniwind. Switching themes does not require a React context update to cascade through the component tree.
    • Portable themes: A complete visual identity is encapsulated in a stylesheet, making it a shippable, versionable, and installable artifact.
    • Consistent vocabulary: The styling system uses the same semantic roles, foreground pairing, and compound component concepts used in the web version of HeroUI.
    • AI-friendly: Because design tokens are CSS variables and component styles are CSS classes, the system is easily interpretable by AI assistants via MCP servers or llms.txt endpoints.
  11. Compare HeroUI and Mantine component libraries

    v3

    HeroUI and Mantine represent two different philosophies for React component libraries:

    • HeroUI v3: A focused set of high-quality components built on React Aria for enterprise-grade accessibility. It uses Tailwind CSS v4 for styling and follows a compound component API pattern. It is highly optimized for AI developer tooling (MCP, llms.txt, agent skills).
    • Mantine v8: A broad, 'batteries-included' toolkit with over 120 components and 70+ hooks. It uses CSS Modules/PostCSS for styling and provides a large built-in hooks library and form handling (@mantine/form).

    Key Decision Factors:

    • Styling: Choose HeroUI if you use Tailwind CSS; choose Mantine if you prefer CSS Modules.
    • Accessibility: Choose HeroUI for strict WCAG compliance (government, healthcare, finance) due to its React Aria foundation.
    • Scope: Choose Mantine for a massive, all-in-one ecosystem; choose HeroUI for a focused, high-depth component set that integrates with best-in-class specialized libraries.
  12. Explore the HeroUI ecosystem

    v3

    HeroUI offers several specialized tools and extensions for different needs:

    • HeroUI Pro: A paid extension providing application-level components and templates such as AppLayout, Sidebar, Navbar, high-density DataGrid, and data visualization components (LineChart, BarChart).
    • HeroUI Native: A React Native implementation that shares the same design tokens, component APIs, and accessibility standards as the Web version, allowing for true cross-platform development.
    • Figma Kit: A design file that mirrors the React implementation, ensuring design-to-code parity.
    • Storybook: A visual catalog of all component variants, states, and combinations.
    • AI Tools: Includes an MCP server and llms.txt to support AI-assisted development.