Fork of @o7/icon published for SimplyPrint as @simplyprint/icon.
This fork intentionally renders each icon as inline SVG paths instead of using o7's hidden
SVG sprite plus <use href="#..."> output. The sprite approach is smaller, but it proved
fragile in production modal/portal lifecycles where the referenced definition can be
missing or fail to paint on first mount. Inline SVG output is slightly more verbose and
more predictable.
The Vite import-rewrite plugin continues to work for both @simplyprint/icon and
@o7/icon imports, so downstream code can migrate mechanically.
Work done on branch main.
Published as @simplyprint/icon.
A Svelte icon library forked from o7 Icon,
rendering icon paths inline for predictable production behavior.
<script>
import { UserPlus } from '@simplyprint/icon/lucide';
</script>
<UserPlus />Icons render as ordinary inline SVG:
<svg class="🟃i" viewBox="0 0 24 24">
<g class="🟃l">
<path d="..." />
</g>
</svg>If you don't use the Vite plugin, dev mode will be MUCH slower because Vite has to parse every icon when you import one.
Usage:
Add the plugin to your vite.config.ts:
import { o7Icon } from '@simplyprint/icon/vite';
export default defineConfig({
plugins: [o7Icon()]
});This automatically rewrites imports behind the scenes:
import { UserPlus } from '@simplyprint/icon/lucide';
// ↓
import UserPlus from '@simplyprint/icon/lucide/UserPlus';- Lucide (
@simplyprint/icon/lucide) - Heroicons (
@simplyprint/icon/heroicons,@simplyprint/icon/heroicons/solid) - Material Design (
@simplyprint/icon/material,@simplyprint/icon/material/solid) - Remix Icon (
@simplyprint/icon/remix,@simplyprint/icon/remix/solid)
(icons are automatically updated daily as the source repos are updated)
- Update to Vite 8
- Fix regression that broke previews on hover
- Fix heroicons/outline
- Add Vite plugin
- Slightly shrink install size
- Fix icons not working when unmounted and remounted
- Add RemixIcon
- Add material icons
