Slide In
MotionMITSlide-in entrance primitive from any edge — top / right / bottom / left.
bun add @otfdashkit/ui
Preview
Slide InMotion
Loading Storybook preview…
Code
@otfdashkit/uiimport { SlideIn } from '@otfdashkit/ui'
export function Example() {
return (
<div className="space-y-4">
<SlideIn direction="up"><div className="rounded-md border border-border bg-card p-4 text-foreground">Slide up</div></SlideIn>
<SlideIn direction="down" delay={0.1}><div className="rounded-md border border-border bg-card p-4 text-foreground">Slide down</div></SlideIn>
<SlideIn direction="left" delay={0.2}><div className="rounded-md border border-border bg-card p-4 text-foreground">Slide left</div></SlideIn>
<SlideIn direction="right" delay={0.3}><div className="rounded-md border border-border bg-card p-4 text-foreground">Slide right</div></SlideIn>
</div>
)
}
Free with the SDK. This pattern ships in @otfdashkit/ui under the MIT license.
Props
Props declared in the SlideIn source. Inherited HTML attributes are not listed.
| Prop | Type | Default | Description |
|---|---|---|---|
| childrenrequired | ReactNode | ||
| delay | number | 0 | |
| direction | 'up' | 'down' | 'left' | 'right' | 'up' | |
| duration | number |