No package needed: find an icon on the icons page and copy or download it from its page, or open the playground for gradients, morphs and bulk export.
What you can do:
- Copy an icon as optimized SVG or as a JSX component
- Download it as
.svgor.png, at the size you set - Select several icons and download a zip of SVGs or PNGs, or one React file
- Export a morph between two icons as a GIF, a video or a toggle component
- Share the exact setup as a link
Copying an icon
- Pick an icon, then its weight (outline or filled) and appearance (flat, raised or drawn)
- Set a colour or a gradient, and a size
- Use Export SVG or the export menu for SVG, JSX, PNG or the package snippet
Exports are standalone: a raised icon carries its own gradient and filters, so it looks the same pasted anywhere.
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
<path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.29 1.51 4.04 3 5.5l7 7Z"
stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
</svg>Props
On the site, a setup is described by the playground's link, so you can bookmark or share it. These are its parameters:
| Prop | Type | Default | Description |
|---|---|---|---|
| icon | string | - | The icon's file name, e.g. bell |
| weight | "outline" | "filled" | outline | Icon weight |
| appearance | "flat" | "raised" | "drawn" | flat | Icon appearance |
| color | hex | theme | Ink colour without #, e.g. e11d48 |
| size | 8–512 | 128 | Size in pixels |
/playground?icon=bell&weight=filled&appearance=raised&color=7c3aed&size=48Icon weights
Every icon comes in two weights, drawn on the same 24 grid with the same shapes, so switching weight never moves anything.
Outline
weight="outline"
Filled
weight="filled"
Playground → Weight → Outline / Filled
/playground?icon=home&weight=filledAppearances
Each weight renders three ways:
- Flat: the icon as drawn.
- Raised: glossy, engraved ink: a gradient over the icon's own colour with soft inner edges. Painted at runtime, so it follows
color. - Drawn: the icon redrawn with a seeded hand-drawn pen. Generated from the flat icon, so it always matches.
Flat
appearance="flat"
Raised
appearance="raised"
Drawn
appearance="drawn"
Playground → Appearance → Flat / Raised / Drawn
/playground?icon=heart&appearance=raisedMorphing
In the playground's Morph lab, pick a second icon and play, scrub or loop the morph. Export it as a GIF or a video, or copy a ready-made React or Flutter toggle component.
Outline
Heart ↔ Star
Filled, raised
raised
Plus ↔ X
rotation from geometry
Styling & colour
Icons use currentColor, so without a color they take the text colour of their parent, raised included.
<div style={{ color: '#7c3aed' }}>
<HomeIcon /> {/* purple */}
<BellIcon appearance="raised" /> {/* purple, raised */}
</div>
<HeartIcon color="#e11d48" />
<HeartIcon color="hsl(245 82% 67%)" />
<HeartIcon color="var(--brand)" />Raised on dark surfaces
Two CSS variables set the raised appearance's inner edges: --openbase-raised-highlight (top-left) and --openbase-raised-edge (bottom-right).
.dark {
--openbase-raised-edge: rgb(0 0 0 / 0.4);
}In the playground you can also fill an icon with a linear, radial or angular gradient; SVG exports keep it.
Accessibility
Icons are decorative by default: they render with aria-hidden. Give an icon an aria-label (or aria-labelledby, or a title) when it carries meaning on its own.
// Decorative: the button has text
<button><TrashIcon /> Delete</button>
// Meaningful: an icon-only button
<button aria-label="Delete"><TrashIcon /></button>
// Morphs take a label, and can follow prefers-reduced-motion
<MorphIcon icon={liked ? HeartFilled : Heart} label="Like" reducedMotion="user" />Performance
- Named imports tree-shake:
import { HomeIcon } from '@openbase/icons-react'adds only that icon. - In
@openbase/icons-react/morph, import morph data by name (Heart,HeartFilled).MORPH_ICONSlooks icons up by file name, so it pulls in every icon's data (several megabytes). - Raised uses SVG filters and a mask; they're cheap at icon sizes, but avoid animating hundreds at once.
- Drawn icons are separate paths shipped with each component; flat is the lightest.
Adding icons
Contributing an icon means drawing two SVGs, outline and filled, with the same file name. Everything else is generated: the drawn appearance, React components, Flutter assets, Compose vectors, and morph data for all three packages. Raised needs no files.
# 1. Draw and save both weights
data/icons/outline/rocket.svg
data/icons/filled/rocket.svg
# 2. Generate drawn, React, Flutter, Compose, morph data and the site's list
pnpm run generate:all
# 3. Build and check
pnpm run build:allThe full guide, including the drawing rules, is docs/ADDING_ICONS.md in the repository.
Troubleshooting
- A pasted SVG is black. Flat exports use
currentColor, which follows the surrounding text colour; set a colour before exporting to bake it in. - Two pasted raised icons look the same colour. Exports reuse ids; use the bulk export, which scopes them, when you need several on one page.
- Raised looks flat. It's subtle below 32px by design. Check it at 32px or larger.
- An icon is missing. Search the icons page: names follow the file names (
arrow-up-right→ArrowUpRightIcon,OpenbaseIcons.arrowUpRight).