Skip to content
This repository was archived by the owner on Nov 6, 2025. It is now read-only.

Latest commit

 

History

History
44 lines (29 loc) · 833 Bytes

File metadata and controls

44 lines (29 loc) · 833 Bytes

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