apps/docs/content/docs/en/react/releases/v3-0-0-beta-6.mdx
This release introduces a comprehensive Color System with six new components for color selection and manipulation: ColorPicker, ColorArea, ColorSlider, ColorField, ColorSwatch, and ColorSwatchPicker. Also includes Separator variants and various style improvements.
<DocsImage src="https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/docs/versions/[email protected]" darkSrc="https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/docs/versions/[email protected]" alt="HeroUI v3 Beta 6" href="/docs/changelog/v3-0-0-beta-6" />
Update to the latest version:
<Tabs items={["npm", "pnpm", "yarn", "bun"]}>
<Tab value="npm">
bash npm i @heroui/styles@beta @heroui/react@beta
</Tab>
<Tab value="pnpm">
bash pnpm add @heroui/styles@beta @heroui/react@beta
</Tab>
<Tab value="yarn">
bash yarn add @heroui/styles@beta @heroui/react@beta
</Tab>
<Tab value="bun">
bash bun add @heroui/styles@beta @heroui/react@beta
</Tab>
</Tabs>
We're excited to introduce a comprehensive Color System - a complete suite of components for color selection, manipulation, and display. These components are built on React Aria's color primitives and work together seamlessly.
Key features:
This release introduces 6 new color components:
The ColorPicker is a compound component that combines all color components into a complete color selection experience.
<ComponentPreview name="color-picker-basic" />
A 2D gradient area for selecting two color channels at once, typically saturation and brightness.
<ComponentPreview name="color-area-basic" />
A slider for adjusting individual color channels like hue, saturation, lightness, or alpha.
<ComponentPreview name="color-slider-basic" />
With different channels:
<ComponentPreview name="color-slider-channels" />
A text input field for entering color values directly. Supports various color formats.
<ComponentPreview name="color-field-basic" />
A visual display of a color value with support for transparency patterns.
<ComponentPreview name="color-swatch-basic" />
A grid of color swatches for quick color selection from a predefined palette.
<ComponentPreview name="color-swatch-picker-basic" />
The Toast component has been significantly improved with new features and better stability (#6151):
New Features:
isLoading prop to show a spinner instead of the default indicatortimeout prop)width prop to Toast.Provider for customizable toast widthonClose callback to prevent toast transition deadlocktoast.promise() with better loading states and error handlingNew Demos:
<ComponentPreview name="toast-variants" />
Added variants to the Separator component for different visual styles.
The Chip component now supports a Chip.Label subcomponent for better visual alignment. When removing start or end content (like icons), the label text was too close to the chip edges. Plain text children are automatically wrapped in <Chip.Label> for backward compatibility.
Usage:
import { Chip } from '@heroui/react';
// Automatic wrapping (backward compatible)
<Chip>Label text</Chip>
// Explicit label with custom styling
<Chip>
<Chip.Label className="font-bold">Custom Label</Chip.Label>
</Chip>
// Mixing icons and labels
<Chip>
<Icon icon="gravity-ui:check" />
<Chip.Label>With Icon</Chip.Label>
</Chip>
The Toast.Container component has been renamed to Toast.Provider for better semantic clarity (#6151).
Before:
<Toast.Container placement="bottom" />
After:
<Toast.Provider placement="bottom" />
Additional Changes:
gap prop changed from 14 to 12 pixelstimeout is now 4000 (4 seconds) instead of requiring explicit timeoutToast.Action has been renamed to Toast.ActionButton for consistencyCSS classes have been renamed to use hyphenated format for consistency (#6141). This follows BEM conventions more closely and improves compatibility with Tailwind CSS.
Important Note: The textarea class was initially renamed to text-area but was rolled back to textarea in PR #6191 due to conflicts with Tailwind's native textarea class. No changes are needed for TextArea component classes.
The following CSS class names have been updated. If you have custom CSS targeting these classes directly, update your selectors:
| Component | Old Class Name | New Class Name | Notes |
|---|---|---|---|
| ComboBox | .combobox | .combo-box | All related classes updated |
.combobox__input-group | .combo-box__input-group | ||
.combobox__trigger | .combo-box__trigger | ||
.combobox__popover | .combo-box__popover | ||
.combobox--full-width | .combo-box--full-width | ||
| ListBox | .listbox | .list-box | All related classes updated |
| ListBoxItem | .listbox-item | .list-box-item | All related classes updated |
.listbox-item__indicator | .list-box-item__indicator | ||
.listbox-item--default | .list-box-item--default | ||
.listbox-item--danger | .list-box-item--danger | ||
| ListBoxSection | .listbox-section | .list-box-section | All related classes updated |
| TextArea | .textarea | .textarea | No change - Rolled back to avoid Tailwind conflict |
Before:
/* Custom styles targeting old class names */
.combobox {
/* styles */
}
.listbox-item {
/* styles */
}
After:
/* Update to new hyphenated class names */
.combo-box {
/* styles */
}
.list-box-item {
/* styles */
}
JavaScript/TypeScript Updates:
If you're using these class names in JavaScript or TypeScript code:
// Before
<div className="combobox" />
<ListBoxItem className="listbox-item" />
// After
<div className="combo-box" />
<ListBoxItem className="list-box-item" />
Note: Component props and TypeScript types remain unchanged. Only CSS class names have been updated.
Several CSS variables have been removed as part of the surface color refactoring (#6204). These variables were either replaced with direct variable references or removed entirely.
The following calculated surface color variables have been removed and replaced with direct variable references:
Removed:
--color-surface-secondary (was calculated via color-mix)--color-surface-tertiary (was calculated via color-mix)Replacement:
These variables now directly reference the base variables defined in variables.css:
--color-surface-secondary → Uses var(--surface-secondary) directly--color-surface-tertiary → Uses var(--surface-tertiary) directlyThe base variables --surface-secondary and --surface-tertiary are now defined directly in variables.css instead of being calculated in theme.css.
All --color-on-surface-* variables have been removed entirely:
Removed:
--color-on-surface--color-on-surface-foreground--color-on-surface-hover--color-on-surface-focus--color-on-surface-secondary--color-on-surface-secondary-foreground--color-on-surface-secondary-hover--color-on-surface-secondary-focus--color-on-surface-tertiary--color-on-surface-tertiary-foreground--color-on-surface-tertiary-hover--color-on-surface-tertiary-focusMigration:
If you were using these variables, update your code to use the appropriate surface variables directly:
/* Before */
.element {
background: var(--color-on-surface);
color: var(--color-on-surface-foreground);
}
.element:hover {
background: var(--color-on-surface-hover);
}
/* After */
.element {
background: var(--surface-secondary);
color: var(--surface-secondary-foreground);
}
.element:hover {
background: color-mix(in oklab, var(--surface-secondary) 92%, var(--surface-secondary-foreground) 8%);
}
Or use the Tailwind utilities:
// Before
<div className="bg-on-surface text-on-surface-foreground" />
// After
<div className="bg-surface-secondary text-surface-secondary-foreground" />
Related PR: #6204
Thanks to everyone who contributed to this release!
<PRContributors />