Getting StartedStateThemingCompositionDate FrameworksLocalizationAnimatedGroupExamplePropsImportingAnimatedMonthGroupCalendarCalendarProviderClickOutsideDayDayOfWeekHeaderHomeMonthMonthGroupPopperRootWeekWeekHeaderuseCalendarDispatchuseCalendarPropsuseCalendarStateuseDateAPIuseDateInputuseDateRangeInput
Components
Hooks
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 Name | Type | Is Required | Default Value | Description |
---|---|---|---|---|
children | node | optional | Children | |
className | string | optional | Class name of root element | |
direction | [forward, back] | optional | Direction of animation | |
durationMsecs | number | optional | 1200 | Duration of animation in msecs |
movement | number | optional | Pixel movement required | |
onEnter | func | optional | Callback called onEnter | |
onExited | func | optional | Callback called onExited | |
transitionKey | string | required | Key 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.