v3.0.0-alpha.32
Card component redesign, CloseButton, MCP Server for AI assistants
This release adds AI development tools, updates the Card component API, and improves the developer experience.
Installation
Update to the latest version:
npm i @heroui/styles@alpha @heroui/react@alphapnpm add @heroui/styles@alpha @heroui/react@alphayarn add @heroui/styles@alpha @heroui/react@alphabun add @heroui/styles@alpha @heroui/react@alphaWhat's New
MCP Server
HeroUI now includes an MCP server that lets AI assistants like Cursor, Claude Code, and VS Code Copilot access HeroUI v3 documentation and component information directly.
Quick Setup:
Cursor
Or manually add to Cursor Settings → Tools → MCP Servers:
{
  "mcpServers": {
    "heroui-react": {
      "command": "npx",
      "args": ["-y", "@heroui/react-mcp@latest"]
    }
  }
}Claude Code
Run this command in your terminal:
claude mcp add heroui-react -- npx -y @heroui/react-mcp@latestCard Component API Redesign
The Card component has been updated with a new variant system that makes it more flexible.
Breaking Changes:
- Replaced 
surfaceprop with newvariantsystem - Removed 
Card.Image,Card.Details, andCard.CloseButton(use composition instead) - New variants: 
flat,outlined,elevated,filled 
Before:
<Card surface="1">
  <Card.Image src="/image.jpg" />
  <Card.Details>
    <Card.Title>Old Card</Card.Title>
  </Card.Details>
</Card>After:
<Card variant="outlined">
  <Card.Header>
    <img src="/image.jpg" alt="Card image" />
  </Card.Header>
  <Card.Body>
    <Card.Title>New Card</Card.Title>
  </Card.Body>
</Card>New Features:
- Horizontal layout support
 - Avatar integration
 - Background image support
 - Improved accessibility with semantic HTML
 
CloseButton Component
Added a CloseButton component for closing dialogs, modals, and other dismissible elements.
import {CloseButton} from "@heroui/react";
// Basic usage
<CloseButton onPress={() => console.log("Closed")} />
// With custom icon
<CloseButton>
  <XMarkIcon className="size-4" />
</CloseButton>Documentation Improvements
UI for Agents
- MCP Server documentation for development with AI assistants
 - llms.txt file for LLM-friendly documentation
 - Setup guides for popular AI coding tools
 
Component Documentation
- Card: Rewrote documentation with anatomy, variants, and more examples
 - Switch: Added anatomy diagrams and better examples
 - CloseButton: New documentation with usage examples
 
Migration Guide
Card Component Migration
- 
Update variant prop:
surface="1"→variant="flat"surface="2"→variant="outlined"surface="3"→variant="elevated"surface="4"→variant="filled"- Custom surfaces → Use new variant system
 
 - 
Update component structure:
- Replace 
Card.Imagewith<img>inCard.Header - Replace 
Card.DetailswithCard.Body - Move 
Card.CloseButtonto use newCloseButtoncomponent 
 - Replace 
 - 
Update imports:
// Add CloseButton if needed import {Card, CloseButton} from "@heroui/react"; 
Links
Contributors
Thanks to everyone who contributed to this release!