The Flutter package. Icons ship as precompiled vector_graphics bytecode, so there's no SVG parsing at runtime, and each icon has a typed accessor on OpenbaseIcons.
What you can do:
- Render any icon with
OpenbaseIcons.<name>() - Switch weight and appearance with
IconWeightandIconAppearance - Morph any icon into any other with
MorphIconfrompackage:openbase_icons/morph.dart - Tint from the ambient
IconTheme, like Material icons
Installation
Add the package as a git dependency (pub.dev release coming), then run flutter pub get.
dependencies:
openbase_icons:
git:
url: https://github.com/Try-Openbase/icons.git
ref: main # pin a tag in real projects
path: packages/icons_flutterBasic usage
import 'package:openbase_icons/openbase_icons.dart';
Row(
children: [
OpenbaseIcons.home(), // outline, 24px
OpenbaseIcons.bell(weight: IconWeight.filled),
OpenbaseIcons.heart(
appearance: IconAppearance.raised,
size: 32,
color: const Color(0xFFE11D48),
),
],
)color, icons use IconTheme.of(context).color, then Theme.of(context).colorScheme.onSurface, so they tint correctly inside app bars, list tiles and buttons.Props
Every OpenbaseIcons.<name>() accessor takes the same named arguments.
| Prop | Type | Default | Description |
|---|---|---|---|
| weight | IconWeight | IconWeight.outline | outline or filled |
| appearance | IconAppearance | IconAppearance.flat | flat, raised or drawn |
| size | double | 24.0 | Width and height in logical pixels |
| color | Color? | IconTheme colour | Tint; falls back to IconTheme, then onSurface |
| semanticLabel | String? | null | Announced by screen readers when set |
| key | Key? | null | Widget key |
OpenbaseIconBase (what the accessors return) also takes raisedStyle: RaisedStyle? to change the raised appearance's edge colours.
Icon 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"
OpenbaseIcons.home() // outline (default)
OpenbaseIcons.home(weight: IconWeight.filled)Appearances
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"
OpenbaseIcons.heart() // flat (default)
OpenbaseIcons.heart(appearance: IconAppearance.raised)
OpenbaseIcons.heart(appearance: IconAppearance.drawn, weight: IconWeight.filled)Morphing
MorphIcon animates from one icon to any other with spring physics. Morph data lives on OpenbaseMorphIcons: home, homeFilled, homeDrawn and homeFilledDrawn.
Outline
Heart ↔ Star
Filled, raised
raised
Plus ↔ X
rotation from geometry
import 'package:openbase_icons/morph.dart';
// 1. Change the icon: it animates
MorphIcon(icon: open ? OpenbaseMorphIcons.x : OpenbaseMorphIcons.plus, raised: true)
// 2. Drive the progress yourself (drags, scroll)
MorphIcon.controlled(from: OpenbaseMorphIcons.home, icon: OpenbaseMorphIcons.homeFilled, progress: t)
// 3. Imperative
final key = GlobalKey<MorphIconState>();
MorphIcon(key: key, icon: OpenbaseMorphIcons.sun);
key.currentState?.morphTo(OpenbaseMorphIcons.moonFilled);
// Pairs, and lookup by file name
OpenbaseMorphIcons.plus.morphTo(OpenbaseMorphIcons.x).icon(progress: t);
MorphIcon(icon: OpenbaseMorphIcons.byName['arrow-left']!.filled)Options: spring (SpringPreset.snappy default, .smooth, .bouncy), size, color, raised, semanticLabel, reducedMotion (MorphReducedMotion.never default, .user, .always).
Styling & colour
Pass color, or let icons pick it up from the theme:
IconTheme(
data: const IconThemeData(color: Colors.indigo),
child: OpenbaseIcons.home(), // indigo
)
// The raised appearance's edge colours
OpenbaseIconBase(
name: 'heart',
appearance: IconAppearance.raised,
raisedStyle: const RaisedStyle(highlight: Color(0xE6FFFFFF), edge: Color(0x66000000)),
)Raised picks RaisedStyle.light or RaisedStyle.dark from the theme brightness by default.
Accessibility
Icons are excluded from semantics unless you give them a semanticLabel. Give one to icons that carry meaning on their own, such as an icon-only button's icon.
OpenbaseIcons.home(semanticLabel: 'Go home')
MorphIcon(
icon: OpenbaseMorphIcons.heart,
semanticLabel: 'Like',
reducedMotion: MorphReducedMotion.user, // honour "remove animations"
)Performance
- Icons are precompiled
.vgbytecode: no XML parsing at runtime, and small assets. - Raised paints a few extra layers per icon; it's cheap at icon sizes, but avoid animating hundreds at once.
OpenbaseMorphIcons.byNamereferences every icon's morph data; prefer the named fields (OpenbaseMorphIcons.heart) so unused data can be dropped.
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
- Icons don't take my colour. Pass
color, or wrap them in anIconTheme. - Assets aren't found. Run
flutter pub getafter adding the dependency, and keeppath: packages/icons_flutter. - 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).