You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The honest answer: thesvg ships SVG files, not a Tailwind plugin (yet). But integration is straightforward depending on whether you want full-color brand marks or monochrome icons that pick up Tailwind text colors.
Full-color brand mark (most common):
import{Github}from'@thesvg/react';<divclassName="flex items-center gap-2"><GithubclassName="h-6 w-6"/><span>Sign in with GitHub</span></div>
The brand color is baked into the SVG, so Tailwind utilities like text-red-500 won't override it (which is what you want for a brand mark).
If you'd find a proper @thesvg/tailwind plugin useful (something like <i class="i-thesvg:github" />), open an issue. It's on the roadmap but priority depends on demand.
documentationImprovements or additions to documentationpackagesnpm packages (icons, cli, react, mcp)
1 participant
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
The honest answer: thesvg ships SVG files, not a Tailwind plugin (yet). But integration is straightforward depending on whether you want full-color brand marks or monochrome icons that pick up Tailwind text colors.
Full-color brand mark (most common):
The brand color is baked into the SVG, so Tailwind utilities like
text-red-500won't override it (which is what you want for a brand mark).Monochrome icon that adapts to Tailwind colors:
Use the
monovariant. Most brands ship one:The mono variants use
currentColorfor fill, so any Tailwind text-color utility cascades through.No React, just
<img>:Tailwind's
h-andw-utilities work since the SVGs no longer carry fixedwidth/heightattributes after the v2.3.0 cleanup.Dark mode:
For brands with
lightanddarkvariants (Adobe family, Granola, Dracula, NVIDIA, etc.), pick at runtime:If you'd find a proper
@thesvg/tailwindplugin useful (something like<i class="i-thesvg:github" />), open an issue. It's on the roadmap but priority depends on demand.Beta Was this translation helpful? Give feedback.
All reactions