svgr
framer/motion
Our great sponsors
svgr | framer/motion | |
---|---|---|
26 | 28 | |
9,327 | 17,429 | |
- | 2.3% | |
8.3 | 9.9 | |
29 days ago | 2 days ago | |
TypeScript | TypeScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
svgr
-
One way of building an SVG icon library for your project
Really interesting framework agnostic approach, but I think SVGR is a better option for my React homies. It imports an SVG file as a React component. Shouts also to react-icons if Font Awesome, Material Icons and friends are more your bag.
-
Alternative libs to migrate from React to Vue (or Vue to React)
SVGR
-
Power up SVGs with React and CSS
There is another way to import an SVG in Create React App, though. We can import the SVG as a ReactComponent. This is because CRA leverages SVGR to process SVGs.
-
Создаем React-компоненты иконок с помощью Figma API и SVGR. Часть 2.
const { types } = require('@babel/core'); module.exports = { ... template: function svgrCustomTemplate( { imports, interfaces, componentName, props, jsx, exports }, { tpl } ) { // меняем корневой элемент на SvgIcon jsx.openingElement.name.name = 'SvgIcon'; jsx.closingElement.name.name = 'SvgIcon'; // https://github.com/gregberge/svgr/issues/530 // при изменении корневого элемента пропадает спред пропсов // поэтому необходимо добавить спред пропсов самостоятельно jsx.openingElement.attributes.push( types.jSXSpreadAttribute(types.identifier('props')) ); return tpl` ${imports}; import { SvgIcon } from '../SvgIcon'; ${interfaces}; const ${componentName} = (${props}) => ( ${jsx} ); ${exports}; ` } }
-
Using SVGs in Common Lisp web apps with Djula
To solve these problems and have a better development workflow, I have created a package called cl-djula-svg which automates all the above steps for you. The inspiration for this package came from svgr which exactly does the same thing in React applications. It takes a SVG file, process some override logic, optimize it and create React wrapper components based on the SVG content.
-
Some svg icons wont show with react native svg
I normally use SVGR but every time a designer sends me an svg i’ll pass it in svgOmg that deletes all the unnecessary attributes and propietary code from figma, illustrator &co.
- External SVGs that you can style
-
How to debug from this error statement
https://github.com/gregberge/svgr/issues/362 this may help as well.
-
Repeating variable names for imports, types and switch. Got to be a better way!
If you're using Webpack, CRA, or Next.js, you should be using SVGR.
-
How to use SVGs in React
SVGR is the library that powers this ability. Setting it up could be a little hairy, thankfully many popular frameworks (Create React App, Gatsby) support this feature out of the box.
framer/motion
-
Full Stack Food Delivery App - React Redux Reducer, Firebase | For Beginners
⭐ Framer Motion -https://framer.com/motion/
-
How a friend's call ended up with me building #AThing
I used Framer Motion for the animations which is an outstanding library and I learned a lot about layout's and groups. Another awesome mention I want to credit here is a library called cva or class-varience-authority. The amount of class concatication it has saved me from while building reactive components is just incredible.
-
I made an interactive landing page for my open-source side project
Thank you so much! I can't take all the credits however – I'm building on top of the shoulder of giants/amazing OSS libraries like cobe.vercel.app, airbnb.io/visx, framer.com/motion, radix-ui.com, tailwindcss.com, and many more! :)
-
I built an interactive landing page for my side project
FWIW, I built the site using amazing OSS libraries like cobe.vercel.app, airbnb.io/visx, framer.com/motion, radix-ui.com, tailwindcss.com, and many more – so maybe you can refer to those to build something similar!
Not really – the globe was made with cobe.vercel.app, the graphs with airbnb.io/visx, the animations with framer.com/motion – all of which are really amazing open-source libraries!
-
Does anyone know how to make an animation like on Auth0 website?
I'm trying with framer motion but I still can't do it, can anyone help me?
-
How I Made My Portfolio with Next.js
framer-motion : To Add animation in project
-
🌈 Building an Animated and Accessible Command Menu in React
// ... import { SiFramer, SiTailwindcss, SiApple, SiVercel, SiTwitter, SiTesla, SiArchlinux, SiDeno, SiFlutter, SiGithub, SiNike, SiDiscord, } from 'react-icons/si' export const commands: Command[] = [ { icon: , text: 'Framer Motion', perform: () => window.open('https://framer.com/motion', '_blank'), }, { icon: , text: 'TailwindCSS', perform: () => window.open('https://tailwindcss.com', '_blank'), }, { icon: , text: 'Apple', perform: () => window.open('https://apple.com', '_blank'), }, { icon: , text: 'Arch Linux', perform: () => window.open('https://apple.com', '_blank'), }, { icon: , text: 'Vercel', perform: () => window.open('https://vercel.com', '_blank'), }, { icon: , text: 'Tesla', perform: () => window.open('https://tesla.com', '_blank'), }, { icon: , text: 'Deno', perform: () => window.open('https://deno.land', '_blank'), }, { icon: , text: 'Discord', perform: () => window.open('https://discord.com', '_blank'), }, { icon: , text: 'Flutter', perform: () => window.open('https://flutter.dev/', '_blank'), }, { icon: , text: 'GitHub', perform: () => window.open('https://github.com/', '_blank'), }, { icon: , text: 'Nike', perform: () => window.open('https://nike.com/', '_blank'), }, { icon: , text: 'Twitter', perform: () => window.open('https://twitter.com', '_blank'), }, ]
-
Top 7 React Animation Libraries in 2022
Framer Motion has more than 15,000 GitHub stars and 1.2 million weekly NPM downloads.
-
Best React Libraries to Use in 2022
I would suggest react-three-fiber for people who want to use Threejs in react, makes it so much nicer to work with. And framer motion for when you need an animation library.
What are some alternatives?
react-spring - ✌️ A spring physics based React animation library
react-gsap-enhancer - Use the full power of React and GSAP together
GreenSock-JS - GreenSock's GSAP JavaScript animation library (including Draggable).
react-motion - A spring that solves your animation problems.
svg-sprite-loader - Webpack loader for creating SVG sprites.
vite-plugin-svgr - Vite plugin to transform SVGs into React components
svgo - ⚙️ Node.js tool for optimizing SVG files
three.js - JavaScript 3D Library.
react-parallax-component - Easiest way to add scroll parallax effect on the component
react-flip-move - Effortless animation between DOM changes (eg. list reordering) using the FLIP technique.
esbuild - An extremely fast bundler for the web
react-beautiful-dnd - Beautiful and accessible drag and drop for lists with React