Skip to content

The documentation website for the @usefui/svgjsx Command-Line Interface.

foundation-ui/svgjsx.dev

Repository files navigation

SVGJSX

Documentation of the Open Source Command Line Interface @usefui/svgjsx.

npm version

Quick Start

# Generate JSX components from SVGs
pnpx @usefui/svgjsx generate

# With custom directories
pnpx @usefui/svgjsx --source ./assets/icons --output ./src/components/icons

Examples

This example shows basic usage of the SVGJSX CLI.

Setup

  1. Add SVG files to the svg/ directory
  2. Run generation script: pnpx @usefui/svgjsx generate
  3. Import and use components from src/icons/

Usage

import { Icon } from "./src/icons";

function App() {
  return (
    <Icon>
      <Icon.MyIcon />
    </Icon>
  );
}

License

MIT © Nicolas Nunes

About

The documentation website for the @usefui/svgjsx Command-Line Interface.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published