Search and jump to any tool. Type to filter; use arrow keys to move and Enter to select.
Wraps an SVG in a named React component so it can be imported like any other icon.
Wraps an SVG in a named React component so it can be imported like any other icon. You choose the component name and toggle TypeScript typing, prop spreading, dimension stripping, currentColor, memo and a default export, and the code updates as you type. The SVG is transformed as text and is never inserted into the page.
Component name: minus-icon Root attributes: width="24" height="24" viewBox="0 0 24 24" stroke="#000" stroke-width="2" Toggles on: Remove width & height, Use currentColor
An exported function named MinusIcon whose root svg carries viewBox="0 0 24 24" stroke="currentColor" strokeWidth="2" and the spread props. Inner attributes such as stroke-linecap become strokeLinecap.
Good to know. Remove width & height only affects the root svg, so inner shapes keep their own sizes. Attribute conversion follows the same rules as the HTML to JSX tool, which means inline event handler strings stay strings.
Converted to PascalCase — the component will be named StarIcon.
Type the props as SVGProps<SVGSVGElement>.
Forward incoming props onto the root <svg>.
Let CSS size the icon instead.
Replace literal fill and stroke colors.
Export a React.memo-wrapped component.
Export the component as default too.