use-date-input - Build Your Own Date Picker
Getting StartedStateThemingCompositionDate FrameworksLocalization
Components
Hooks
AnimatedGroupExamplePropsImportingAnimatedMonthGroupCalendarCalendarProviderClickOutsideDayDayOfWeekHeaderHomeMonthMonthGroupPopperRootWeekWeekHeaderuseCalendarDispatchuseCalendarPropsuseCalendarStateuseDateAPIuseDateInputuseDateRangeInput

AnimatedGroup

The AnimatedGroup component animates it's children by the specified movement in direction for durationMsecs.

In the default implementation, AnimatedGroup scrolls it's children, forward or back.

Example

Build your own datepicker
with use-date-input

Props

Prop NameTypeIs RequiredDefault ValueDescription
childrennodeoptionalChildren
classNamestringoptionalClass name of root element
direction[forward, back]optionalDirection of animation
durationMsecsnumberoptional1200Duration of animation in msecs
movementnumberoptionalPixel movement required
onEnterfuncoptionalCallback called onEnter
onExitedfuncoptionalCallback called onExited
transitionKeystringrequiredKey for animation

Importing

It can be imported as either the base component

import { AnimatedGroup } from "@use-date-input/core";

or as an overridable component that can be replaced through the components prop in CalendarProvider.
Refer to How to replace UI components.

import { CustomisableAnimatedGroup } from "@use-date-input/core";

If providing your own component, it can be useful to import the base component and use it within your composition.