Skip to content

HeroUI Native v1.0.0 arrives as the first stable release

updated

HeroUI Native has reached v1.0.0, the library's first stable release, moving it out of the beta and release candidate stages. The release adds a LinkButton component, resolves sub-menu conflicts, makes @gorhom/bottom-sheet an optional peer dependency and tightens typing for useThemeColor.

To update:

npm i heroui-native

LinkButton component

LinkButton is a new compound component that renders a ghost-variant button without highlight feedback, intended for inline links such as "Terms of Service" or "Privacy Policy". It builds on the existing Button infrastructure and enforces the ghost variant internally, so no variant prop is exposed. It includes a LinkButton.Label sub-component, uses an h-auto p-0 base class to remove default height and padding, and merges consumer animation config while keeping highlight: false.

import { LinkButton } from "heroui-native";

export function TermsLink() {
  return (
    <LinkButton onPress={() => openURL("https://example.com/terms")}>
      <LinkButton.Label>Terms of Service</LinkButton.Label>
    </LinkButton>
  );
}

The Menu sub-menu system now tracks the active sub-menu by ID through openSubMenuId, so only one sub-menu can be open at a time. A Pressable backdrop overlay lets users dismiss an open sub-menu by tapping outside. Other sub-menu triggers get opacity-40 and pointer-events-none via a new isOtherSubMenuOpen style variant, and open content uses z-50 versus z-40 when closed. This also fixes issue #340, where sub-menu content appeared behind sibling triggers.

Type and API updates

  • The ButtonLabel ref type was corrected from View to TextRef.
  • useThemeColor now returns a ThemeColorValue branded type for single-color calls, so incorrect array destructuring shows up as never in the IDE. ThemeColorValue extends string, and existing call sites are unaffected at runtime.
  • useBottomSheetAwareHandlers is now a public hook for wiring keyboard avoidance inside bottom sheets.

Breaking change

The isBottomSheetAware prop has been removed from Input and InputOTP. Inputs rendered inside a BottomSheet must now use the hook explicitly:

import { useBottomSheetAwareHandlers } from "heroui-native";

const { onFocus, onBlur } = useBottomSheetAwareHandlers();
<Input onFocus={onFocus} onBlur={onBlur} placeholder="Type here..." />

Components used outside bottom sheets are not affected. Relatedly, issue #330 is fixed: Input no longer imports @gorhom/bottom-sheet unconditionally, and the package is loaded lazily, so projects without bottom sheet features no longer need it installed.

Documentation for LinkButton, Menu, Input and InputOTP has been updated to match.

Source: heroui.com