diff --git a/README.md b/README.md index fcb7aaf..c3129b1 100644 --- a/README.md +++ b/README.md @@ -3,14 +3,12 @@ A animation library designed for Vue 3, Powered by [Motion](https://www.framer.com/motion/). ## Features - - ✨ Declarative animation API for intuitive control - 👋 Gesture-driven animations for interactive experiences - ⚙ Motion values for dynamic animations - 🔲 layout animations and transitions - 🚪 Polished enter/exit animations - 📜 Smooth scroll-based animations and effects -- Layout animations and transitions ## 🏎️ Quick start Install `motion-v`: diff --git a/docs/components/demo/layout-group/ToggleContent.vue b/docs/components/demo/layout-group/ToggleContent.vue index e73b247..6169a4a 100644 --- a/docs/components/demo/layout-group/ToggleContent.vue +++ b/docs/components/demo/layout-group/ToggleContent.vue @@ -13,14 +13,14 @@ function handleClick() { - - diff --git a/docs/content/2.components/4.motion-config.md b/docs/content/2.components/4.motion-config.md new file mode 100644 index 0000000..8028dc5 --- /dev/null +++ b/docs/content/2.components/4.motion-config.md @@ -0,0 +1,34 @@ +--- +title: MotionConfig +navigation.icon: lucide:settings +--- + +`MotionConfig` Component is used to configure child `Motion` components. + +## Props + +### `transition` + +define the default transition for all child `Motion` components. + +### `reduceMotion` + +default value is `never`. + +`reduceMotion` is used to control the behavior of motion when the user has enabled reduced motion. + +- `never`: Don't reduce motion. +- `always`: Always reduce motion. +- `user`: Reduce motion based on the user's system setting. + +when reduced motion is enabled, transform and layout animations will be disabled. +other animations will persist. + +### `none` + +If using a Content Security Policy with a nonce attribute, passing the same attribute through MotionConfig will allow any style blocks generated by Motion to adhere the the security policy. + +## Reference + +- [Motion-MotionConfig](https://motion.dev/docs/react-motion-config) +- [Content-Security-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src#unsafe_inline_styles) diff --git a/docs/content/3.animation/layout.md b/docs/content/3.animation/layout.md index cc3176f..393cfb1 100644 --- a/docs/content/3.animation/layout.md +++ b/docs/content/3.animation/layout.md @@ -14,6 +14,13 @@ like [Motion React](https://motion.dev/docs/react-layout-animations), you can us + + ## Resources - [Motion React layout animations](https://motion.dev/docs/react-layout-animations)