Expand description
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.
Everything else the components share stays private to this crate, so its signatures can change without a breaking release.
Constants§
- FIELD_
HEIGHT - The one height every v3 form field has:
.date-input-groupand.color-input-groupareh-9, and.input’spy-2plus its line box comes to the same 36px. v3 removedsizefrom the field components (Input, Select, ComboBox, DateField, …), keeping it only on the nineteen where a scale is documented, so a field’s metrics are constants rather than aherogpui_core::Sizelookup. - FIELD_
ICON - Glyph size for an icon inside a form field.
- FIELD_
TEXT - Type size inside a form field.
Functions§
- app_
focus_ root - Records keyboard-versus-pointer input, and moves the focus on Tab.
- container_
radius min(32px, --radius-3xl)— cards, the table, and every floating panel (modal, popover, toast, alert, dropdown). Surface is not on the list: upstream.surfacedeclares no radius.- control_
radius rounded-3xl— buttons, toggle buttons and avatars.- cursor_
interactive - Applies the theme’s interactive cursor (
--cursor-interactive) toel. - field_
radius - Corner radius of a form field —
--field-radius. - focus_
visible - Whether focus rings should currently be shown, i.e. the last interaction was keyboard-driven.
- hairline_
radius rounded-sm— separators and skeletons, which are nearly square.- inner_
fill_ radius - Corner radius for a fill painted inside a rounded
overflow_hiddenclip parent on vanilla GPUI. - interactive_
cursor - The theme’s interactive cursor, for a site that must capture it by value.
- key_
radius rounded-lg— the keyboard key and the radio control, which v3 draws as a rounded square rather than a circle.- mark_
radius rounded-md— the checkbox control (.checkbox__controlissize-4 rounded-md).- micro_
radius rounded-xs— the small ProgressBar track.- set_
focus_ visible - Sets whether focus rings should be shown, refreshing windows when the value changes.
- shift_
wheel_ scroll_ x - Shift+wheel horizontal scroll for mouse wheels on the web platform.
- small_
radius rounded-xl— close buttons, tags, links, tooltips.- soft_
radius rounded-2xl— chips, menu and list rows, the colour area.