Let's setup our Next.js app to import SVGs as React components! Get that infinite scalability and easy recolouring 🥰
More in our "An app with Next.js" series: • An App with Next.js
Highlighted software:
Next.js: https://nextjs.org/
SVGR: https://react-svgr.com/
Figma: https://www.figma.com/
🎶 I've remixed Screaming Out by Duplex Heart, for the background music 🎶
See the code: https://github.com/jmagrippis/eri
No affiliations whatsoever: if I show something, you know you're hearing my unfiltered thoughts 😄
My own website: https://magrippis.com/
--
TIMESTAMPS
--
0:00 - Why can I not add logos?
0:59 - @svgr/webpack config
3:05 - Sizing options
4:03 - TypeScript definitions
5:37 Dynamic colours
8:30 Accessibility with aria-labels
8:40 - Next up…
Смотрите видео Why can’t I get my LOGO in my APP? 😨 How to import SVGs in Next.js онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Johnny Magrippis 12 Июль 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 12,207 раз и оно понравилось 239 людям.