Gathering detailed insights and metrics for @best-skn/framer-types
Gathering detailed insights and metrics for @best-skn/framer-types
A Simple Type Definition Extension Library For Framer Motion 11
npm install @best-skn/framer-types
Typescript
Module System
Node Version
NPM Version
62.4
Supply Chain
89.8
Quality
77.6
Maintenance
100
Vulnerability
100
License
Shell (100%)
Total Downloads
770
Last Day
2
Last Week
7
Last Month
18
Last Year
770
1 Stars
8 Commits
1 Watching
5 Branches
1 Contributors
Latest Version
1.0.2
Package Id
@best-skn/framer-types@1.0.2
Unpacked Size
12.35 kB
Size
3.79 kB
File Count
4
NPM Version
10.8.1
Node Version
20.16.0
Publised On
18 Aug 2024
Cumulative downloads
Total Downloads
Last day
0%
2
Compared to previous day
Last week
75%
7
Compared to previous week
Last month
5.9%
18
Compared to previous month
Last year
0%
770
Compared to previous year
5
2
TypeScript React
ย
ย
Anime
Typevariants
variants
outside motion
components and later use it inside the motion componentsmotion.div
, motion.span
, motion.main
etc. or any other
custom motion components created with motion()
functionUsage
sectionCsxAnime
Typemotion.div
, motion.span
, motion.main
etc. or any other
custom motion components created with motion()
functionUsage
sectionย
ย
18.3.1
18.3.3
18.3.1
18.3.0
14.2.3
11.2.11
ย
ย
1npm add -D @best-skn/framer-types 2#or 3yarn add -D @best-skn/framer-types 4#or 5pnpm add -D @best-skn/framer-types 6#or 7bun add -D @best-skn/framer-types
types
in the root location of your project, and create a file called motion.d.ts
, then do this1import "@best-skn/framer-types";
tsconfig.json
if includes
property has **/*.ts
, **/*.tsx
otherwise the type definition file may not workAnime
Type:variants
in separate file1import type { Anime } from "framer-motion"; 2 3type key = "container" | "box"; // * Create variant names here 4 5export const anime: Anime<key> = { 6 //* You'll get total intellisense for `variant` names 7 container: { 8 //* You'll get intellisense for motion styles inside `hidden` or `visible` properties 9 hidden: { 10 opacity: 0, 11 //* other motion styles here... 12 }, 13 visible: { 14 opacity: 1, 15 //* other motion styles here... 16 }, 17 }, 18 box: { 19 hidden: { 20 opacity: 0, 21 //* other motion styles here... 22 }, 23 visible: { 24 opacity: 1, 25 //* other motion styles here... 26 }, 27 }, 28};
variants
inside motion components in Next.js1"use client" 2 3import { motion } from "framer-motion"; 4import { anime } from "./anime.ts"; 5 6const HomeComponent: React.FC<unknown> = () => { 7 return ( 8 <motion.div 9 variants={anime.container} //* Put your variants here 10 initial="hidden" 11 animate="visible" 12 > 13 <motion.div 14 variants={anime.box} //* Put your variants here 15 initial="hidden" 16 animate="visible" 17 > 18 <!-- other elements here... --> 19 </motion.div> 20 </motion.div> 21 ); 22}; 23 24export default HomeComponent;
CsxAnime
Type:1import type { CsxAnime } from "framer-motion"; 2 3type key = "container" | "box"; // * Create class names here 4 5export const csx: CsxAnime<key> = { 6 //* You'll get total intellisense for `class` names 7 container: { 8 //* You'll get intellisense for react css styles here 9 fontWeight: "bolder", 10 //* css styles here... 11 12 //* framer motion related styles 13 scaleX: "", 14 }, 15 box: { 16 fontWeight: "bolder", 17 //* css styles here... 18 19 //* framer motion related styles 20 scaleX: "", 21 }, 22};
1"use client" 2 3import { motion } from "framer-motion"; 4import { csx } from "./csx.ts"; 5 6const HomeComponent: React.FC<unknown> = () => { 7 return ( 8 <motion.div className={csx.container}> 9 <motion.div className={csx.box}> 10 <!-- other elements here... --> 11 </motion.div> 12 </motion.div> 13 ); 14}; 15 16export default HomeComponent;
ย
Tanjila Hasan Trina
: The long lost love of my life. The course of nature separated us from our paths and put us in separate places far away from each other. But no matter how separated we are right now, each and every moment of mine is only dedicated to you. We may not see each other in this lifetime as it seems but I will find you again in the next life. I just want to say: ไธ็ใฏๆฎ้
ทใ ใใใงใๅใๆใใ
My Parents
: The greatest treasures of my life ever.ย
Copyright (C) 2024 SKN Shukhan
Licensed under the MIT License
No vulnerabilities found.
No security vulnerabilities found.