obra-icons-react
v1.25.0
Published
Obra Icons for [React](https://react.dev/).
Readme
obra-icons-react
Obra Icons for React.
A simple, consistent set of icons, perfect for user interfaces. Obra Icons consists of more than 950 icons.
Installation
npm install obra-icons-reactImporting an icon
import { IconAdd } from 'obra-icons-react';Every icon is also available on its own subpath, which skips the barrel entirely and keeps dev servers from processing all ~1000 icon components:
import IconAdd from 'obra-icons-react/icons/Add';Subpath imports give you the component under its bare name (Add) rather than
the prefixed barrel export (IconAdd), so name the local binding yourself.
Customizing an icon
Use the size, color and strokeWidth props to customize the icon.
<IconAdd size={24} color="red" strokeWidth={1} />Targeting with CSS
Every SVG contains an obra-icon class on the top level SVG element, that you can target with CSS.
Next to this, the inner elements are also targetable, with the following class names:
oi-fill: Fill layersoi-vector: Vector layersoi-ellipse: Ellipse layersoi-box: Box layersoi-triangle: Triangle layersoi-incomplete-triangle: Incomplete triangle layersoi-mini-square: Mini square layersoi-line: Line layersoi-mini-dot: Mini dotsoi-medium-dot: Medium dotsoi-dot: Regular dots
Which icons are available?
For a full reference, see the list at Obra Icons website.
