Codync
A free, open-source 1:1 alternative to Grok Bot and Muse. Message Claude Code, Codex, Cursor and 40+ coding agents as persistent bots from your iPhone, Mac or Linux desktop. Group chats, threads, appr
The smallest and fastest SVG to React + Tailwind converter, purpose-built for icons with zero runtime dependencies.
Developer toolsTypeScript · MDXGitHub @Deshmukh-AyushOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗Quick Start (Copy & Run):
import { convert } from "@everywhereayush/str-s";
const svg = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M5 12h14M12 5l7 7-7 7"/>
</svg>`;
const reactCode = convert(svg, {
componentName: "ArrowRightIcon",
tailwindMapping: "loose", // "strict" | "loose" | "off"
typescript: true,
componentStyle: "arrow", // "arrow" | "function"
});
console.log(reactCode);
Output:
import * as React from "react";
export const ArrowRightIcon = (props: React.SVGProps<SVGSVGElement>) => (
<svg viewBox="0 0 24 24" className="w-6 h-6 stroke-current stroke-2" fill="none" {...props}>
<path d="M5 12h14M12 5l7 7-7 7" />
</svg>
);
STR is the smallest and fastest SVG → React + Tailwind converter, purpose-built for icons and simple graphics.
It is not trying to be the most feature-complete converter for every exotic SVG edge case (gradients-heavy illustrations, embedded raster data, complex masks) — for those, use SVGR.
STR's pitch is:
llms.txt)Benchmarked across representative real-world icon fixture sets (Feather, Heroicons, Lucide, Figma exports) using tinybench.
| Tool | Ops / sec (Batch 5) | Latency (avg per icon) | Runtime Deps | Bundle Size (gzip) |
|---|---|---|---|---|
str-s (STR) | 7,114 | 0.043 ms (43 µs) | 0 (zero) | 3.04 kB |
@svgr/core | 78 | 3.061 ms | 58+ (Babel + AST) | ~1,200 kB |
svg-to-jsx | 842 | 0.326 ms | 3 | ~15 kB |
svg-to-react-cli | CLI / JSDOM | Process spawn overhead | 4+ (jsdom) | >5,000 kB |
Verdict: STR converts icons ~70x faster than SVGR with less than 0.3% of the bundle footprint and zero Babel overhead.
All ecosystem wrappers are thin layers that import the str-s core package directly:
str-s/
├── packages/
│ ├── core/ # Core npm package: str-s (<=5kb gzip, 0 deps)
│ │ ├── src/
│ │ │ ├── parse.ts # Lightweight single-pass SVG tokenizer
│ │ │ ├── attrs.ts # Kebab -> camelCase attribute lookup map
│ │ │ ├── tailwind.ts # Style/attr -> Tailwind class mapping
│ │ │ ├── emit.ts # JSX component generator
│ │ │ └── index.ts # Public API
│ │ ├── test/fixtures/ # 19 real-world SVG fixtures & edge cases
│ │ ├── bench/ # Tinybench benchmark suite
│ │ └── llms.txt # Machine-readable usage doc for AI agents
│ ├── vscode-extension/ # VS Code & Cursor extension (Marketplace + OpenVSX)
│ ├── raycast-extension/ # Raycast commands (Clipboard + Selection)
│ └── mcp-server/ # Model Context Protocol server for Claude / Cursor
├── package.json # pnpm workspaces root
└── README.md
None of the wrappers re-implement conversion logic. All four surfaces automatically stay in sync.
str-s)pnpm add @everywhereayush/str-s
# or
npm install @everywhereayush/str-s
import { convert, isConvertibleSvg } from "@everywhereayush/str-s";
// Fast pre-check (<0.01ms) to bail early if string is not an SVG
if (isConvertibleSvg(input)) {
const jsx = convert(input, {
componentName: "MyIcon",
tailwindMapping: "loose", // "strict" | "loose" | "off"
typescript: true, // true (TSX) | false (JSX)
componentStyle: "arrow", // "arrow" | "function"
});
}
loose (default): Maps exact scales (e.g. width="24" → w-6), and falls back to arbitrary values (e.g. width="13" → w-[13px], fill="#3b82f6" → fill-[#3b82f6]).strict: Only maps standard Tailwind scale values. Non-standard dimensions/colors are preserved as raw attributes.off: No Tailwind classes are generated. Preserves attributes and emits style={{ ... }} objects for inline styles.packages/vscode-extension)Works in VS Code, Cursor, Windsurf, and VSCodium.
.tsx, .jsx, .ts, and .js files and replaces them with clean React components.Cmd+Z / Ctrl+Z to revert the entire paste in one step.STR: Convert Selection: Converts selected SVG text in the editor.STR: Convert Clipboard: Converts clipboard SVG into the current editor or back to clipboard.str.tailwindMapping, str.componentStyle, str.typescript, str.autoConvertOnPaste.Publishable to both VS Code Marketplace and OpenVSX (which Cursor, VSCodium, and Gitpod pull from):
# Package VSIX
pnpm --filter str-vscode package:vsce
pnpm --filter str-vscode package:ovsx
# Publish
pnpm --filter str-vscode publish:vsce
pnpm --filter str-vscode publish:ovsx
packages/raycast-extension) (Coming Soon)Convert SVGs directly from macOS menu bar or hotkey into your clipboard.
Status: Support is planned — local implementation tested via
ray develop, store submission pending macOS hardware testing.
convert(), copies the React component back, and alerts via toast.cd packages/raycast-extension
pnpm build
# or run with ray develop
ray develop
packages/mcp-server)Exposes STR directly to AI agents (Claude Code, Cursor, Windsurf) as a Model Context Protocol tool.
convert_svg_to_reactsvg (string), options (optional object)claude_desktop_config.json):{
"mcpServers": {
"str": {
"command": "npx",
"args": ["-y", "str-s-mcp"]
}
}
}
~/.cursor/mcp.json or Project MCP settings):{
"mcpServers": {
"str": {
"command": "node",
"args": ["<path-to-repo>/packages/mcp-server/dist/index.js"]
}
}
}
llms.txt)For AI assistants and agentic workflows, STR provides a dedicated, machine-readable documentation file at packages/core/llms.txt. It contains the complete function signatures, examples, and boundary conditions for automated code generation.
# Clone the repository
git clone https://github.com/Deshmukh-Ayush/str-s.git
cd str-s
# Install dependencies
pnpm install
# Run all tests
pnpm test
# Verify <=5kb gzip size budget
pnpm size
# Run benchmark suite
pnpm bench
# Build all packages
pnpm build
MIT © STR Contributors