0.0.6 β’ Published 5 months ago
react-screenflow v0.0.6
React ScreenFlow π
A smooth and elegant animation component for React, powered by framer-motion. Perfect for page transitions, modals, and more!
β¨ Features
- π¨ Multiple Animation Types: Choose from
elegantSlide
,smoothFade
,materialScale
,cardFlip
,elastic
, andswoosh
. - β‘οΈ Optimized Performance: Uses
framer-motion
for buttery-smooth animations. - π Highly Customizable: Add your own styles and animations with ease.
- π οΈ TypeScript Support: Fully typed for a better developer experience.
- π¦ Lightweight: Minimal dependencies, optimized for production.
π₯ Installation
Install the package using npm or yarn:
npm install react-screenflow
or
yarn add react-screenflow
Required Dependency
Ensure framer-motion
is installed for animations to work:
npm install framer-motion
or
yarn add framer-motion
π Usage
Hereβs a simple example of how to use the ScreenFlow
component in your React application:
import React from 'react';
import { ScreenFlow } from 'react-screenflow';
function App() {
return (
<ScreenFlow animation="smoothFade">
<div>
<h1>Welcome to My App</h1>
<p>This content will animate smoothly!</p>
</div>
</ScreenFlow>
);
}
export default App;
π Demo
Check out a live demo on CodeSandbox:
π Preview: Live Preview
π Official Website: React ScreenFlow
βοΈ Props
Prop | Type | Default | Description |
---|---|---|---|
animation | keyof typeof animations | elegantSlide | Animation type |
mode | "wait" \| "sync" \| "popLayout" | "wait" | Defines how multiple animations work |
className | string | "" | Custom class for the wrapper |
ποΈ Animation Types
Your package supports the following animations:
- elegantSlide: Smooth slide with blur effect.
- smoothFade: Fade with subtle scale and vertical movement.
- materialScale: Material Design-inspired scale and slide.
- cardFlip: Flip animation for card-like transitions.
- elastic: Bouncy, elastic animations.
- swoosh: Fast, swooshing motion.
π¦ Dependencies
This package requires the following dependencies:
- framer-motion: ^10.16.4
- react: ^18.2.0
- react-dom: ^18.2.0
- react-router-dom: ^6.18.0
π οΈ Development
Build the Package
npm run build
Run in Development Mode
npm run dev
Preview the Build
npm run preview
ποΈ Tech Stack
- React: Core UI library.
- framer-motion: Animation engine.
- Vite: Build tool for fast development and production builds.
- TypeScript: Type-safe development.
π License
MIT Β© Milan Patel
π GitHub Repository
Find the source code and contribute at:
MilanPatel2003/react-screenflow
π€ Contributing
Contributions are welcome! Follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature/YourFeature
. - Commit your changes:
git commit -m 'Add some feature'
. - Push to the branch:
git push origin feature/YourFeature
. - Open a pull request.
π‘ Support
If you find this package useful, consider giving it a βοΈ on GitHub!
Made with β€οΈ by Milan Patel