Skip to content
Merged

V3.2.1 #6654

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions apps/docs/content/docs/cn/react/releases/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ description: HeroUI v3 的所有更新与变更,包含新功能、修复以及

## 最新版本

### v3.2.1

**2026 年 6 月 17 日**

补丁版本:`@heroui/react` 不再内置自己的 `react-aria` 副本。`react-aria` 的子路径在 Rollup 构建中被外部化,使消费方解析到项目中安装的单一 `react-aria`,而非内联副本。同时修复了 `SwitchGroup` 横向布局。

[阅读完整发布说明 →](/docs/react/releases/v3-2-1)

---

### v3.2.0

**2026 年 6 月 6 日**
Expand Down
1 change: 1 addition & 0 deletions apps/docs/content/docs/cn/react/releases/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"---概述---",
"index",
"---版本列表---",
"v3-2-1",
"v3-2-0",
"v3-1-0",
"v3-0-5",
Expand Down
60 changes: 60 additions & 0 deletions apps/docs/content/docs/cn/react/releases/v3-2-1.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
title: v3.2.1
description: 补丁版本:将 react-aria 从 @heroui/react 产物中外部化,并修复 SwitchGroup 横向布局。
github:
pull: 6654
---

<div className="flex items-center gap-3 mb-6">
<span className="text-sm text-muted">2026 年 6 月 17 日</span>
</div>

补丁版本:`@heroui/react` 不再内置自己的 `react-aria` 副本。`react-aria` 的子路径现在在 Rollup 构建中被外部化,因此会解析到你项目中安装的版本 —— 避免在 `@heroui/react` 内部打包出一份重复、内联的 `react-aria` 副本。本次发布还修复了 `SwitchGroup` 横向布局,补全缺失的 `switch-group__items` 包装层。

## 安装

升级到最新版本:

<Tabs items={["npm", "pnpm", "yarn", "bun"]}>
<Tab value="npm">
```bash
npm i @heroui/styles@latest @heroui/react@latest
```
</Tab>
<Tab value="pnpm">
```bash
pnpm add @heroui/styles@latest @heroui/react@latest
```
</Tab>
<Tab value="yarn">
```bash
yarn add @heroui/styles@latest @heroui/react@latest
```
</Tab>
<Tab value="bun">
```bash
bun add @heroui/styles@latest @heroui/react@latest
```
</Tab>
</Tabs>

<Callout type="info">
**正在使用 AI 助手?** 对它说「Hey Cursor,把 HeroUI 升级到最新版本」。它会自动对比版本并应用必要变更。了解更多请参阅 [HeroUI MCP 服务器](/docs/ui-for-agents/mcp-server)。
</Callout>

## 错误修复

- **@heroui/react**:将 `react-aria` 子路径与其他 `@react-*` 和 `react-aria-components` 一起在 Rollup 构建中外部化,使 `@heroui/react` 不再内置自己的 `react-aria` 副本。消费方现在会解析到项目中安装的单一 `react-aria`,避免重复实例的问题以及不必要的产物体积膨胀 ([#6653](https://github.com/heroui-inc/heroui/pull/6653))。
- **SwitchGroup**:补全缺失的 `switch-group__items` 包装层,使 `orientation="horizontal"` 时开关横向排列,而不再垂直堆叠 ([#6655](https://github.com/heroui-inc/heroui/pull/6655))。

## 链接

- [组件文档](/docs/react/components)
- [GitHub 仓库](https://github.com/heroui-inc/heroui)
- [GitHub PR #6654](https://github.com/heroui-inc/heroui/pull/6654)

## 贡献者

感谢所有为本次发布做出贡献的人!

<PRContributors />
10 changes: 10 additions & 0 deletions apps/docs/content/docs/en/react/releases/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ description: All updates and changes to HeroUI v3, including new features, fixes

## Latest Release

### v3.2.1

**June 17, 2026**

Patch release: `@heroui/react` no longer bundles its own copy of `react-aria`. The `react-aria` subpaths are externalized in the Rollup build, so consumers resolve to the single `react-aria` installed in their project instead of a vendored copy. Also fixes `SwitchGroup` horizontal layout.

[Read full release notes →](/docs/react/releases/v3-2-1)

---

### v3.2.0

**June 6, 2026**
Expand Down
1 change: 1 addition & 0 deletions apps/docs/content/docs/en/react/releases/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"---Overview---",
"index",
"---Releases---",
"v3-2-1",
"v3-2-0",
"v3-1-0",
"v3-0-5",
Expand Down
60 changes: 60 additions & 0 deletions apps/docs/content/docs/en/react/releases/v3-2-1.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
title: v3.2.1
description: Patch release that externalizes react-aria from the @heroui/react bundle and fixes SwitchGroup horizontal layout.
github:
pull: 6654
---

<div className="flex items-center gap-3 mb-6">
<span className="text-sm text-muted">June 17, 2026</span>
</div>

Patch release: `@heroui/react` no longer bundles its own copy of `react-aria`. The `react-aria` subpaths are now externalized in the Rollup build, so they resolve to the version installed in your project — preventing a duplicated, vendored copy of `react-aria` from shipping inside `@heroui/react`. This release also fixes `SwitchGroup` horizontal layout by rendering the missing `switch-group__items` wrapper.

## Installation

Update to the latest version:

<Tabs items={["npm", "pnpm", "yarn", "bun"]}>
<Tab value="npm">
```bash
npm i @heroui/styles@latest @heroui/react@latest
```
</Tab>
<Tab value="pnpm">
```bash
pnpm add @heroui/styles@latest @heroui/react@latest
```
</Tab>
<Tab value="yarn">
```bash
yarn add @heroui/styles@latest @heroui/react@latest
```
</Tab>
<Tab value="bun">
```bash
bun add @heroui/styles@latest @heroui/react@latest
```
</Tab>
</Tabs>

<Callout type="info">
**Using AI assistants?** Simply prompt "Hey Cursor, update HeroUI to the latest version" and your AI assistant will automatically compare versions and apply the necessary changes. Learn more about the [HeroUI MCP Server](/docs/ui-for-agents/mcp-server).
</Callout>

## Bug Fixes

- **@heroui/react**: Externalize the `react-aria` subpaths in the Rollup build alongside the other `@react-*` and `react-aria-components` externals, so `@heroui/react` no longer vendors its own copy of `react-aria`. Consumers now resolve to the single `react-aria` installed in their project, avoiding duplicate-instance bugs and unnecessary bundle bloat ([#6653](https://github.com/heroui-inc/heroui/pull/6653)).
- **SwitchGroup**: Render the missing `switch-group__items` wrapper so `orientation="horizontal"` lays out switches in a row instead of stacking vertically ([#6655](https://github.com/heroui-inc/heroui/pull/6655)).

## Links

- [Component Docs](/docs/react/components)
- [GitHub Repository](https://github.com/heroui-inc/heroui)
- [GitHub PR #6654](https://github.com/heroui-inc/heroui/pull/6654)

## Contributors

Thanks to everyone who contributed to this release!

<PRContributors />
4 changes: 2 additions & 2 deletions apps/docs/src/lib/dictionaries/cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"home": {
"releaseBadges": [
{
"label": "HeroUI React v3.2.0Calendar 视图与 toggle 变更",
"href": "/docs/react/releases/v3-2-0"
"label": "HeroUI React v3.2.1补丁版本",
"href": "/docs/react/releases/v3-2-1"
},
{
"label": "全新 CLI:create-heroui-native-app v1.0.0",
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/src/lib/dictionaries/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"home": {
"releaseBadges": [
{
"label": "HeroUI React v3.2.0Calendar views & toggle changes",
"href": "/docs/react/releases/v3-2-0"
"label": "HeroUI React v3.2.1patch release",
"href": "/docs/react/releases/v3-2-1"
},
{
"label": "New CLI: create-heroui-native-app v1.0.0",
Expand Down
1 change: 1 addition & 0 deletions packages/react/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const external = [
/^@react-stately/,
/^@react-types\//,
/^@internationalized\//,
/^react-aria($|\/)/,
/^react-aria-components($|\/)/,
/^tailwind-merge/,
/^tailwind-variants/,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ const SwitchGroupRoot = <E extends keyof React.JSX.IntrinsicElements = "div">({

return (
<dom.div data-slot="switch-group" {...(props as any)} className={slots.base({className})}>
{children}
<dom.div className={slots.items()} data-slot="switch-group-items">
{children}
</dom.div>
</dom.div>
);
};
Expand Down
Loading