Expand description
HeroGPUI components — a faithful Rust/GPUI port of the HeroUI v3 component
library. One module per @heroui/* package.
Every component and builder type is #[must_use]: a builder that is built
and then dropped renders nothing, so the compiler says so.
ⓘ
#![deny(unused_must_use)]
Button::new("save").label("Save"); // dropped: `unused_must_use` firesThe same statement, used:
#![deny(unused_must_use)]
Button::new("save").label("Save")Re-exports§
pub use traits::Disableable;pub use traits::Selectable;pub use traits::Sizable;pub use accordion::*;pub use alert::*;pub use alert_dialog::*;pub use assets::*;pub use autocomplete::*;pub use avatar::*;pub use avatar_group::*;pub use badge::*;pub use breadcrumbs::*;pub use button::*;pub use button_group::*;pub use calendar::*;pub use calendar_view::*;pub use card::*;pub use checkbox::*;pub use chip::*;pub use close_button::*;pub use color_picker::*;pub use combo_box::*;pub use command_palette::*;pub use context_menu::*;pub use date_constraints::*;pub use date_picker::*;pub use disclosure::*;pub use drawer::*;pub use dropdown::*;pub use field::*;pub use filter::*;pub use form::*;pub use hover_card::*;pub use icon::*;pub use icons::*;pub use input::*;pub use input_group::*;pub use input_otp::*;pub use kbd::*;pub use link::*;pub use list_box::*;pub use menu_bar::*;pub use meter::*;pub use modal::*;pub use number_field::*;pub use pagination::*;pub use picker_item::*;pub use popover::*;pub use progress::*;pub use radio_group::*;pub use range_calendar::*;pub use resizable::*;pub use scroll_shadow::*;pub use scrollbar::*;pub use select::*;pub use selection::*;pub use separator::*;pub use sidebar::*;pub use skeleton::*;pub use slider::*;pub use spinner::*;pub use surface::*;pub use switch::*;pub use table::*;pub use tabs::*;pub use tag_group::*;pub use textarea::*;pub use time_field::*;pub use title_bar::*;pub use toast::*;pub use toggle_button::*;pub use toolbar::*;pub use tooltip::*;pub use tree_view::*;pub use typography::*;pub use validation::*;pub use virtual_list::*;
Modules§
- a11y
- What each control tells assistive technology, stated once per control.
- accordion
- Accordion — port of
@heroui/accordion. - alert
- Alert — port of
@heroui/alert. - alert_
dialog - AlertDialog — port of
@heroui/alert-dialog(v3). - anim
- Motion primitives shared by every animated component.
- assets
- Embedded assets: the SVGs HeroGPUI’s built-in component chrome draws
(every path in
icons) and the Lucide set named byIconName. - autocomplete
- Autocomplete — port of
@heroui/autocomplete. - avatar
- Avatar — port of
@heroui/avatar(v3.2.6, Radix Avatar 1.2.6 semantics). - avatar_
group - AvatarGroup — port of
@heroui/reactv3.2.6AvatarGroupandAvatarGroup.Count(avatar-group/avatar-group.tsx,styles/components/avatar-group.css). - badge
- Badge — port of
@heroui/badge. - breadcrumbs
- Breadcrumbs — port of
@heroui/breadcrumbs. - button
- Button — port of
@heroui/button(v3). - button_
group - ButtonGroup — port of
@heroui/button-group(v3). - calendar
- Calendar & RangeCalendar — port of
@heroui/calendarand@heroui/date-picker’s range grid (std-only date math). - calendar_
system - The calendar system a month grid is drawn in.
- calendar_
view - The v3 calendar view model:
visibleDuration,pageBehaviorandselectionAlignment. - card
- Card — port of
@heroui/card. - checkbox
- Checkbox — port of
@heroui/checkbox. - chip
- Chip — port of
@heroui/chip. - close_
button - CloseButton — port of
@heroui/close-button. - color_
picker - Colors — port of
@heroui/color-area,color-field,color-picker,color-slider,color-swatchandcolor-swatch-picker(v3). - combo_
box - ComboBox — port of
@heroui/combo-box(v3). - command_
palette CommandPalette— a modal command search (HeroGPUI extension; HeroUI v3 has no command palette).- context_
menu ContextMenu— a right-click menu over an area (HeroGPUI extension; HeroUI v3 has no context menu, only the trigger-anchoredDropdown).- date_
constraints - The date constraints v3 puts on every date component.
- date_
picker - DatePicker, DateRangePicker & DateField — port of the v3
@heroui/date-pickerfamily: a popover calendar plus ISO text entry. - disclosure
- Disclosure & DisclosureGroup — HeroUI v3
Disclosure. - drawer
- Drawer — port of
@heroui/drawer. - dropdown
- Dropdown & Menu — port of
@heroui/dropdown,@heroui/menuand@heroui/listbox. - extend
- The helpers HeroGPUI supports for building custom widgets that match the components: v3’s radius scale read from the active theme, the field metrics, the interactive cursor, the focus-visible modality, and the vanilla-GPUI workarounds the components themselves use.
- field
- Form field primitives — port of
@heroui/label,@heroui/description,@heroui/error-message,@heroui/field-errorand@heroui/fieldset. - filter
useFilter— the string matchers v3 hands an Autocomplete or a ComboBox.- form
- Form — port of
@heroui/form(v3). - gallery_
source - Component source embedded only for the installable gallery’s generic API reference fallback.
- hover_
card HoverCard— a rich preview card opened by hovering or focusing a trigger (HeroGPUI extension; HeroUI v3 has no hover card, and React Aria has no hook for one).- i18n
- Localizable component chrome strings (HeroGPUI extension).
- icon
- A named, embedded Lucide icon set (HeroGPUI extension, not a HeroUI v3 API).
- icons
- Icon asset paths used by HeroGPUI components.
- input
- Input & InputState — port of
@heroui/input. - input_
group - InputGroup — port of
@heroui/input-group(v3). - input_
otp - InputOTP — port of
@heroui/input-otp. - kbd
- Kbd — port of
@heroui/kbd. - link
- Link — port of
@heroui/link(v3). - list_
box - ListBox — port of
@heroui/list-box(v3). - list_
nav - Arrow-key navigation shared by every list-shaped control.
- menu_
bar MenuBar— a horizontal application menu bar (HeroGPUI extension; HeroUI v3 has no menu bar, only the trigger-anchoredDropdown).- meter
- Meter — HeroUI v3
Meter(value within a known range). - modal
- Modal — port of
@heroui/modal. - number_
field - NumberField — port of
@heroui/number-field(v3). - pagination
- Pagination — port of
@heroui/pagination. - picker_
item - The shared keyed item for the pickers.
- popover
- Popover — port of
@heroui/popover. - progress
- ProgressBar / ProgressCircle — port of
@heroui/progress. - radio_
group - RadioGroup — port of
@heroui/radio. - range_
calendar - RangeCalendar — port of
@heroui/range-calendar(v3). - resizable
ResizablePanelGroupandResizablePanel— split panels with a drag handle between each pair (HeroGPUI extension; HeroUI v3 has no resizable or split-view component).- scroll_
shadow - ScrollShadow — port of
@heroui/scroll-shadow(v3). - scrollbar
- Painted scrollbar — the GPUI stand-in for HeroUI’s CSS
scrollbartoken. - select
- Select — port of
@heroui/selectwith single and multiple selection. - selection
- The shared
selectionModesemantics. - separator
- Separator — port of
@heroui/separator(v3, formerlyDivider). - sidebar
Sidebar— a collapsible application sidebar (HeroGPUI extension; HeroUI v3 has no sidebar). The API follows gpui-kit’sSidebarand shadcn/ui’s sidebar: a header, groups of menu items under optional labels, and a footer.- skeleton
- Skeleton — port of
@heroui/skeleton(v3). - slider
- Slider — port of
@heroui/slider(single or multi-thumb). - spinner
- Spinner — port of
@heroui/spinner(v3). - surface
- Surface — port of
@heroui/surface. - switch
- Switch — port of
@heroui/switch. - table
- Table — port of
@heroui/table(v3). - tabs
- Tabs — port of
@heroui/tabs. - tag_
group - TagGroup — port of
@heroui/tag-group(v3). - textarea
- TextArea — port of
@heroui/text-area(v3). - time_
field - TimeField — port of
@heroui/time-field(v3). - title_
bar TitleBarandWindowBorder— custom window chrome for frameless windows (HeroGPUI extension; HeroUI v3 is a web library and has no window chrome). The platform split follows gpui-kit’stitle_bar.rsandwindow_border.rs, checked against the pinnedgpui-pre0.3.5 platform sources.- toast
- Toast — port of
@heroui/toast(v3). - toggle_
button - ToggleButton & ToggleButtonGroup — port of
@heroui/toggle-buttonv3. - toolbar
- Toolbar — port of
@heroui/toolbar. - tooltip
- Tooltip — port of
@heroui/tooltip(v3). - traits
- Shared builder traits (HeroGPUI extension, not a HeroUI v3 API).
- tree_
view TreeViewandTreeItem— a hierarchical list with expandable rows (HeroGPUI extension; HeroUI v3 has no tree, onlyTable’s tree rows).- typography
- Typography — port of
@heroui/typography(HeroUI v3.2.4). - validation
- The shared
validate/validationErrorsmodel. - virtual_
list VirtualList— a vertical list that renders only the rows in (and just around) the viewport, with programmatic scrolling to a row (HeroGPUI extension; HeroUI v3 has no such component). It has two modes, chosen by theVirtualListHandleit is built over:
Structs§
- Field
Focus [data-focus-visible]— whether a focus ring should be showing.- Interactive
State - v3’s interactive render props, as one value.
- Number
Format formatOptionsfor the components that take it, re-exported so a caller reaches it beside the component it configures. TheformatOptionssubset these components use.- Selection
Value - v3’s value render props, as one value.
Enums§
- Backdrop
- Overlay scrim style —
Modal,DrawerandAlertDialog. - Color
- Semantic color roles — HeroUI v3.
- Currency
Sign formatOptionsfor the components that take it, re-exported so a caller reaches it beside the component it configures.Intl.NumberFormatOptions["currencySign"].- Field
Variant - Form-control emphasis —
primarycarries the field shadow,secondaryis the flat low-emphasis style for use inside aSurface. - Number
Style formatOptionsfor the components that take it, re-exported so a caller reaches it beside the component it configures.Intl.NumberFormatOptions["style"].- Orientation
- Orientation for separators, toolbars, sliders and groups.
- Placement
placement— where a floating panel sits relative to its trigger.- Placement
Align - How a panel lines up along the trigger’s cross axis.
- Prominence
- Container prominence —
SurfaceandCard.Separatoruses the same ladder minustransparent. - Selection
Behavior - How a multi-select collection changes selection when an item is activated.
- Selection
Mode - How many items a collection lets the user select.
- Size
- The
sm | md | lgscale used by most components. - SizeXl
- The
xs | sm | md | lg | xlscale used bySpinner,ColorSwatchandColorSwatchPicker. - Unit
Display formatOptionsfor the components that take it, re-exported so a caller reaches it beside the component it configures.Intl.NumberFormatOptions["unitDisplay"].- Variant
- Button emphasis variant —
Button, and the vocabularyButtonGroupinherits to its direct children (the pinned group context takesButtonProps["variant"], every value on this enum).
Functions§
- app_
focus_ root - Records keyboard-versus-pointer input, and moves the focus on Tab.