All Projects β†’ kossnocorp β†’ desvg

kossnocorp / desvg

Licence: other
πŸŒ… Converts SVG files into components 🌞

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to desvg

Design System Utils
πŸ‘©β€πŸŽ¨ Access your design tokens with ease
Stars: ✭ 465 (+488.61%)
Mutual labels:  preact, styled-components
Nyancss
🌈 Write plain CSS while reaping benefits of CSS-in-JS
Stars: ✭ 544 (+588.61%)
Mutual labels:  preact, styled-components
Styled Breakpoints
Simple and powerful tool for creating breakpoints in styled components and emotion. πŸ’…
Stars: ✭ 428 (+441.77%)
Mutual labels:  preact, styled-components
React Ssr Starter
All have been introduced React environment
Stars: ✭ 20 (-74.68%)
Mutual labels:  preact, styled-components
Filbert Js
A lightweight(~1kb) css-in-js framework
Stars: ✭ 167 (+111.39%)
Mutual labels:  preact, styled-components
YASCC
Yet Another SoundCloud Client
Stars: ✭ 30 (-62.03%)
Mutual labels:  preact, styled-components
Styled Components Website
The styled-components website and documentation
Stars: ✭ 513 (+549.37%)
Mutual labels:  preact, styled-components
Scoped Style
A tiny css in js library πŸš€
Stars: ✭ 129 (+63.29%)
Mutual labels:  preact, styled-components
Goober
πŸ₯œ goober, a less than 1KB πŸŽ‰ css-in-js alternative with a familiar API
Stars: ✭ 2,317 (+2832.91%)
Mutual labels:  preact, styled-components
Styled Loaders
Loaders Built with Preact and Styled Components
Stars: ✭ 212 (+168.35%)
Mutual labels:  preact, styled-components
mediocre-pictures
Helping you take mediocre pictures, hands-free. πŸ“·πŸ™†πŸ»πŸ™…πŸΎπŸ’πŸΌπŸ“Έ
Stars: ✭ 16 (-79.75%)
Mutual labels:  preact, styled-components
stoxy
Stoxy is a state management API for all modern Web Technologies
Stars: ✭ 73 (-7.59%)
Mutual labels:  preact
youtube-clone-mercadolivre
Mercado Livre (Sale Page) UI Clone
Stars: ✭ 24 (-69.62%)
Mutual labels:  styled-components
blog-desktop-v2
Yancey Blog website for desktop and mobile.
Stars: ✭ 19 (-75.95%)
Mutual labels:  styled-components
twin.examples
Packed with examples for different frameworks, this repo helps you get started with twin a whole lot faster.
Stars: ✭ 320 (+305.06%)
Mutual labels:  styled-components
styled-components-docs-zh
πŸ’… styled-components δΈ­ζ–‡ζ–‡ζ‘£ηΏ»θ―‘ πŸ‡ζŒη»­ζ–½ε·₯δΈ­
Stars: ✭ 160 (+102.53%)
Mutual labels:  styled-components
smores-react
🍭 Marshmallow React components
Stars: ✭ 34 (-56.96%)
Mutual labels:  styled-components
web-template-project
This repository contains a template for nodeJS and ReactJs projects using TypeScript.
Stars: ✭ 18 (-77.22%)
Mutual labels:  styled-components
weather-sucks
Weather App with Estonian Mood
Stars: ✭ 23 (-70.89%)
Mutual labels:  preact
dl-model
Dragalia Lost Model Viewer
Stars: ✭ 30 (-62.03%)
Mutual labels:  preact

desvg

desvg converts SVG files into React/Preact components. It inlines SVG source so that you can alter it (animate, set color, control size, etc.).

Installation

If you want to use desvg with webpack, install desvg-loader and svg-loader:

npm install desvg-loader svg-loader --save-dev
# or
yarn add --dev desvg-loader svg-loader

To use the low-level API, or to manage the core library version, install desvg:

npm install @kossnocorp/desvg --save
# or
yarn add @kossnocorp/desvg

Configuration

// ...
{
  test: /\.svg$/,
  use: [
    'desvg-loader/react', // πŸ‘ˆ Add loader (use 'desvg-loader/preact' for Preact)
    'svg-loader' // πŸ‘ˆ svg-loader must precede desvg-loader
  ],

  // or if you prefer classic:

  loader: 'desvg-loader/react!svg-loader'
},
// ...

Usage

See low-level API docs for more implementation details.

React

import React from 'react'
import WarningIcon from './icon.svg'

export default function () {
  return (
    <div>
      <WarningIcon fill='yellow' width='32px' />
      Warning, this is a warning!
    </div>
  )
}

Preact

import { h } from 'preact'
import WarningIcon from './icon.svg'

export default function () {
  return (
    <div>
      <WarningIcon fill='yellow' width='32px' />
      Warning, this is a warning!
    </div>
  )
}

Related

License

MIT Β© Sasha Koss

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].