(() => new Set(["1"]));
const renderExpandableRow = (item: Row) => {
return (
{({hasChildItems, isDisabled, isExpanded, isTreeColumn}) => (
{hasChildItems && isTreeColumn ? (
) : null}
{item.title}
)}
{item.type}
{item.date}
{renderExpandableRow}
);
};
return (
Name
Type
Date Modified
{renderExpandableRow}
);
}
```
### useTheme hook
For plain React with Vite or Create React App (no Next.js theme provider), import `useTheme` from `@heroui/react`. It accepts any theme name (`"light"`, `"dark"`, `"brutalism-light"`, etc.). Pass `"system"` to follow the OS preference. It persists the value in `localStorage`, and sets both `data-theme` and `class` on `` to the resolved theme name.
```tsx
"use client";
import { Button, useTheme } from "@heroui/react";
export function ThemeSwitch() {
const { theme, setTheme } = useTheme("light");
return (
Current: {theme}
);
}
```
### DOM polymorphic utility
The DOM polymorphic helper lets lightweight components that are not built on React Aria primitives change their host element through a render prop.
**Example:** rendering a Card component as ``
```tsx
render={(props) => } />
```
### License change
HeroUI is now licensed under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0), replacing the previous MIT license. Apache 2.0 provides the same permissive freedoms while adding an explicit patent grant for additional legal protection. No action is required from existing users.
## Bug Fixes
- **Tabs**: scope secondary-variant styles so nested tab groups no longer inherit the parent variant ([#6384](https://github.com/heroui-inc/heroui/pull/6384))
## Dependencies
- **React Aria Components**: Updated from `1.16.0` to [`1.17.0`](https://react-aria.adobe.com/releases/v1-17-0)
- **@react-aria/utils**: Updated from `3.33.1` to `3.34.0`
- **@react-types/shared**: Updated from `3.33.1` to `3.34.0`
- **@internationalized/date**: Updated from `3.12.0` to `3.12.1`
## Links
- [Component Docs](/docs/react/components)
- [Figma Kit V3](https://www.figma.com/community/file/1546526812159103429/heroui-figma-kit-v3)
- [GitHub Repository](https://github.com/heroui-inc/heroui)
- [GitHub PR #6441](https://github.com/heroui-inc/heroui/pull/6441)
## Contributors
Thanks to everyone who contributed to this release!