Minor Changes
-
BREAKING CHANGE: Prop types for the previously removed styled
Accordion,Select, andComboboxcomponents have also been removed:AccordionProps,AccordionItemProps,AccordionTriggerProps,AccordionContentProps,SelectProps,SelectOptionProps,ComboboxProps, andComboboxOptionProps. Accordion's unusedheadingLevelprop and corresponding context fields, along with theAccordionHeadingLeveltype, have also been removed. (#11986) -
BREAKING CHANGE: The toggle mixin is now exported as
toggleinstead ofcontrol. Sincetoggleconsists of a single mixin, it can now be called directly astoggle()rather than grouped undertoggle.control(). (#11986)-import * as toggle from '@remix-run/ui/toggle' +import { toggle } from '@remix-run/ui/toggle' -<input mix={toggle.control({ defaultChecked: true })} /> +<input mix={toggle({ defaultChecked: true })} />
The options type has also been renamed from
ToggleControlOptionstoToggleOptions:-import type { ToggleControlOptions } from '@remix-run/ui/toggle' +import type { ToggleOptions } from '@remix-run/ui/toggle'
-
Check the user's current motion preference with
prefersReducedMotion()from@remix-run/ui/animation. It returnsfalseduring server rendering or whenmatchMediais unavailable, so it can be called safely from component render functions as well as browser event handlers. (#11993)import { animateLayout, prefersReducedMotion, spring } from '@remix-run/ui/animation' function Card() { return () => ( <div mix={animateLayout(prefersReducedMotion() ? false : { ...spring('snappy') })}>Details</div> ) }
Patch Changes
-
Server rendering skips setup and render for animation mixins, keyboard and outside-click helpers, typeahead behavior, and popover anchor and focus helpers. Mixins that provide initial attributes, styles, or ARIA props still run on the server. (#12019)
-
Bumped
@remix-run/*dependencies: