useSimplePageMotion
@hua-labs/hua/motion
bash
npm install @hua-labs/huatsx
import { useSimplePageMotion } from "@hua-labs/hua/framework";tsx
const motions = useSimplePageMotion("home");
return (
<div>
<h1 ref={motions.hero?.ref} style={motions.hero?.style}>
Welcome
</h1>
<p ref={motions.title?.ref} style={motions.title?.style}>
Description
</p>
</div>
);| pageType* | "home" | "dashboard" | "product" | "blog" | - | Page type preset (first positional argument) |
| [elementId] | MotionRef | Motion refs for each preset element (ref, style, isVisible) |