Border Radius Generator
Shape corners individually, including the elliptical slash syntax.
Turn an SVG into a React component with the attributes React expects.
The SVG to JSX converter fixes the hyphenated presentation attributes and the case-sensitive viewBox that silently break an inlined icon, then makes the result useful by spreading props and offering currentColor.
SVG has more hyphenated attributes than HTML, and every one of them is a JSX error waiting to happen: stroke-width, stroke-linecap, fill-rule, clip-path, and the case-sensitive viewBox that a lowercase viewbox silently breaks.
This converts all of them, wraps the result in a component, and makes it useful rather than merely valid. Props are spread onto the root element so the icon can take a className or a size from wherever it is used, and fill or stroke can be switched to currentColor in one option — which is what makes an icon inherit the text colour around it instead of being stuck at whatever the designer exported.
A lowercase viewbox is ignored entirely and nothing warns you — which is why the icon scales wrongly and the cause is so hard to find.
stroke-width, stroke-linecap, fill-rule, clip-path and the rest, each camelCased the way React expects.
Switch fill or stroke to currentColor and the icon follows the surrounding text colour, including on hover.
So the component can take a className, a size or an aria-label where it is used rather than being fixed at export time.
The output is a complete named export, not a fragment you have to wrap yourself.
Straight from a design tool, an icon set or a file.
Something like ChevronIcon; the export is named for it.
Switch fill or stroke to currentColor so the icon follows the surrounding text.
Paste it into a file and use it like any other component.
Because SVG attributes are case-sensitive and JSX passes them through as written. A lowercase viewbox is ignored entirely, which is why the icon scales wrongly and nothing warns you.
It makes the shape take the CSS color value of its context, so an icon inside a link turns the link colour on hover automatically. It is the single most useful change to make to an exported icon.
So the component can be given a className, a width, an aria-label or an event handler where it is used, rather than being fixed at whatever the export produced.
Inline when you need to style it — colour, hover states, animation. An img tag when it is a fixed illustration, since that keeps it out of your bundle and lets the browser cache it separately.
What people who use the SVG to JSX think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the SVG to JSX. It takes half a minute and no account.
Write the first reviewShape corners individually, including the elliptical slash syntax.
Generate deterministic UUIDs from a namespace and a name.
Turn text into a block-letter ASCII banner for a README or a CLI.
Check a JWT signature against a secret or a public key, and see why it fails.
Build CSS keyframe animations and watch them run as you edit.
Learn and generate flexbox layouts with a live, interactive preview.
Convert internationalised domain names to punycode and back.
Generate plausible addresses in the format each country actually uses.