Minor Changes
-
#10877
afc8b48
Thanks @kalisaNkevin! - [New]
DateInput: Add a segmented date field for typing dates without a calendar.import { DateInput } from "@chakra-ui/react"
<DateInput.Root> <DateInput.Label /> <DateInput.Control> <DateInput.Segments /> </DateInput.Control> <DateInput.HiddenInput /> </DateInput.Root>
Each part of the date is its own keyboard-navigable segment, ordered and
formatted bylocale. SupportsselectionMode="range",min/max, and
granularitywithformatterfor time-only input. -
#10939
7b027d4
Thanks @segunadebayo! - - Accordion,
Collapsible, Dialog, Drawer, TreeView: AddhideModeto choose how content
that stays mounted is hidden when closed. The default,"display-none", uses
thehiddenattribute and keeps effects running, so a video keeps playing and
a subscription stays open while closed."activity"uses React 19Activity
to pause those effects instead.<Dialog.Root hideMode="activity" />
It only applies while the content stays mounted.
unmountOnExitremoves the
tree on close, sohideModenever runs.-
Dialog, Drawer: Add
data-autofocusanddata-no-autofocusto pick
what gets focus when the overlay opens, without reaching for
initialFocusEland a ref. Mark chrome like the close button to skip it, or
mark the real target directly.<Dialog.Content> <Dialog.CloseTrigger data-no-autofocus /> <input data-autofocus /> <button>Save</button> </Dialog.Content>
Focus goes to
initialFocusEl, then[data-autofocus], then the first
tabbable element without[data-no-autofocus], then the content root. -
NumberInput: Add
largeStepandsmallStepfor keyboard stepping. Hold
ShiftforlargeStep,AltforsmallStep. They default to10 * step
andstep / 10, which is what the arrow keys already did, so existing
inputs behave the same until you set them.<NumberInput.Root step={1} largeStep={20} smallStep={0.5} />
-
Slider: Add
largeStep, applied onShiftand onPageUp/PageDown.
Defaults to10 * step, matching the previous behavior. -
FocusTrap: Add
persistentElementsto keep portalled content inside the
trap when it isn't reachable througharia-controlsoraria-expanded.
Pass getters so the elements resolve lazily, after they mount.<FocusTrap persistentElements={[() => document.getElementById("toast-region")]} />
-
Toast:
createToasternow takes a content type parameter, sotitle
anddescriptioncan be something other thanReactNode. It still defaults
toReactNode.interface Content { id: string text: string } const toaster = createToaster<Content>({ placement: "top-end" }) toaster.create({ title: { id: "save", text: "Saved" } })
-
-
#10676
8af2836
Thanks @isBatak! - createOverlay: Add a
TReturngeneric so awaitingopen()returns the value passed toclose()
instead ofany.interface DialogResult { message: string } const dialog = createOverlay<DialogProps, DialogResult>(Component) const result = await dialog.open("id", props) if (result) { console.log(result.message) }
TReturndefaults tounknown, so untypedopen()calls may need narrowing
now. The result can also beundefined, sinceclose(id, value)doesn't
require a value. -
#10949
1f28ce9
Thanks @Adebesin-Cell! - Updated Ark UI
to v5.39.0Relevant additions and improvements:
-
Overlays & Collapsible: New
hideModeprop controls how kept-mounted
content is hidden when closed ('display-none'or'activity'for
React 19)Affects Dialog, Drawer, Popover, Accordion, TreeView, and related
components -
Number Input & Slider: Added configurable keyboard stepping with
largeStepandsmallStepprops for Number Input, andlargeStepfor
Slider -
Dialog & Drawer: New
data-autofocusanddata-no-autofocusattributes
for managing focus when overlays open -
Focus Trap: Added
persistentElementsoption to treat portalled content
as part of the trap -
Presence: New
onEnterCompletecallback for when enter animations
finish (mirrors existingonExitComplete)Affects Color Picker, Combobox, Date Picker, Dialog, Drawer, Floating
Panel, Hover Card, Menu, Popover, Select, Tooltip, and Tour -
Date Input & Date Picker: Improved locale support for native numerals,
better constraint handling, and timezone fixes -
Select, Menu, Combobox, Listbox: Fixed keyboard navigation issues and
hover highlight behavior -
Various fixes: Fieldset re-rendering loops, Next.js 15 production
builds, Escape dismissal timing, focus visible state, form submission
handling, and more
-
Patch Changes
-
#10951
c16188f
Thanks @dfedoryshchev! - - Fix
Dialog.ActionTriggerandDrawer.ActionTriggerignoring theonClick
handler passed to them. The handler now runs before the dialog closes -
#10939
7b027d4
Thanks @segunadebayo! - - Fix Next.js 15
production builds failing to compile with
Attempted import error: 'Activity' is not exported from 'react'. React's
optionalActivityexport was imported statically, so webpack rejected it
even on React versions that expose it at runtime. It now resolves at runtime
and falls back todisplay-nonewhen the React build doesn't expose it- Menu: Fix
Menu.ContextTriggerflashing at the top-left corner on the
first right-click, and long-press context menus on touch opening stuck at
(0,0). The positioner reported a placement before one had been computed,
which skipped the off-screen guard that hides it until the anchor point is
known. Long-press had a second cause, it never triggered a reposition on
open - Dialog, Drawer, Menu, Popover: Fix
Escapebeing ignored right after an
overlay opens. Handlers registered a frame late, so the overlay was painted
and focus-trapped before it could listen. Under CPU load that gap grew well
past one frame and swallowed the keypress - Dialog, Drawer, Popover: Fix a closing overlay pulling focus back from
an element your app focused in the meantime, such as a second dialog opened
right after closing the first. Closing a nested overlay no longer throws
when the outer container has no connected focusable element, and the focus
ring now shows on the returned-to element after you close withEscape - Dialog, Drawer: Fix the page still scrolling behind an open overlay on
layouts where<html>is the scroll container. The scroll lock targeted
<body>, so nothing was locked - Popover: Fix tabbing out of portalled content looping back into the
content when the trigger was the last tabbable element on the page. Focus
now moves to the next tabbable element after the trigger - Combobox, Listbox, Menu, Select: Fix keyboard navigation losing or
moving the highlighted item while the pointer rests over scrollable content.
Scrolling an item into view moved the content under the cursor, and the
resultingpointerleavecounted as a real hover - DateInput
- Fix segment text lagging a keystroke behind when you type over an already
committed date, and in-progress edits being dropped while focus caught up
after auto-advance. Fast typing andArrowUp/ArrowDown/Home/Endnow
land on the segment you're editing - Fix
CalendarDateandCalendarDateTimevalues shifting by your local
UTC offset when you pass a customformatterwithout atimeZone. A
wall-clock value round-trips unchanged - Accept your locale's native numerals when typing, not just ASCII digits.
Covers Arabic-Indic٠-٩and Devanagari०-९
- Fix segment text lagging a keystroke behind when you type over an already
- DatePicker
- Fix
minView,maxView, anddefaultViewbeing ignored when resolving
the initial view, which was hardcoded to day through year - Fix
defaultOpenoverridingopen, which let a controlled picker open
against its own prop - Fix disabled and read-only pickers still reacting to cell clicks, the
clear trigger, and presets. Read-only pickers keep roving-focus
navigation, disabled pickers drop out of the tab order - Fix
maxSelectedDatesnot being enforced on month and year cells in
multiplemode - Fix keyboard range selection drifting from pointer behavior. Picking a
third date restarts the range, and reopening with only a start date
resumes it instead of restarting - Fix
translationsrequiring every message. It's nowPartial, so you can
override one message and let the rest fall back to the defaults - Fix the view trigger's
aria-labelnaming the wrong view, and announce
dates inside a range as "In range" instead of the generic "Choose" - Accept your locale's native numerals when typing, not just ASCII digits
- Fix
- NumberInput
- Fix
api.setValuethrowing when you pass a number andformatOptionsis
set - Fix
Cmd/Ctrlwith arrow keys producing values off thestepgrid
- Fix
- Slider: Fix
Cmd/Ctrlwith arrow keys producing values off thestep
grid - TagsInput
- Fix an XSS vector in the hidden element that measures input width. It set
the tag value withinnerHTML, so a value containing markup was parsed
and could execute. It now usestextContent - Fix native form submit so
FormDatareflects the current tags. The hidden
input kept its initial value after you added, removed, or cleared tags
- Fix an XSS vector in the hidden element that measures input width. It set
- Checkbox, RadioGroup, Switch: Fix clicking a label adding
data-focus-visibleto the control. Activating the label briefly moved
focus to an overlay container, which was read as virtual focus - Fieldset: Fix
Fieldset.Rootre-rendering whenever its subtree mutated,
even when helper and error text were unchanged - FloatingPanel: Fix closing a panel leaving it on the stack, so the next
panel now becomes topmost, and fix stack order not applying to the
positioner, so focusing a panel raises it above its siblings - QrCode: Fix
getDataUrl()and the download trigger dropping the
overlay, so a logo or badge placed over the code went missing from the
export - Toast: Fix a height flicker when expanding the stack in overlap mode.
Heights are measured without thescaletransform applied - ColorPicker: Fix the channel input committing a partial value when you
pressEnterto confirm an IME composition - Splitter
- Fix collapsed panels sizing to
minSizeinstead ofcollapsedSize, and
fix keyboard resizing breaking when a resize trigger got focus while
hovered - Fix the resize trigger matching
:focus-visibleafter a pointer drag. It
still takes focus, so keyboard resizing keeps working, but no longer shows
the focus ring
- Fix collapsed panels sizing to
- Steps
- Fix
Steps.NextTriggerandSteps.PrevTriggersubmitting an ancestor
form on click. They carried notype, so they defaulted to
type="submit" - Fix
Steps.RootProviderrendering its children twice
- Fix
- Marquee: Fix scroll speed depending on content width. Duration now comes
from the content size and the actual translation distance, sospeed
matches real pixel speed even when the content is narrower than the viewport
- Menu: Fix
-
#10908
c6516a1
Thanks @akahoshi1421! - - Fix
Tag.CloseTrigger,ActionBar.SelectionTrigger,Dialog.ActionTrigger,
Drawer.ActionTriggermissingtype="button", causing unintended form
submission when used inside a<form> -
#10919
76bb1dc
Thanks @Aditya30december2003! - Fix
semanticiandemelements not rendering in italics when preflight is
enabled. -
065f71c
Thanks @segunadebayo! - - FixTreeView
--tree-indentation: 0pxnot fully removing nested indentation--tree-indentationis now the full per-level indent
(indent-size + half icon-size). Custom non-zero values no longer get an
extra half-icon offset on top- Remove internal
--tree-icon-offsetvariable from the recipe
-
#10938
6948541
Thanks @waterWang! - - RadioCard: Fix the
outlinevariant losing its border width when a card is both checked and
disabled. The checked ring is an inset box-shadow, whichitemControl's
disabled background painted over