Skip to content
The same icons and brand marks for React Native and Expo, drawn with react-native-svg, following light and dark mode.
Installation#
bunx --bun expo install @fabricator-ui/icons-react-native react-native-svg
Outside Expo, install both packages with your package manager.
Usage#
import { HouseIcon, IconProvider } from "@fabricator-ui/icons-react-native"
import { GithubIcon } from "@fabricator-ui/icons-react-native/brands"
export function TabBar() {
return (
<IconProvider size={22} strokeWidth={1.75}>
<HouseIcon />
<GithubIcon color="brand" />
</IconProvider>
)
}Names and props match @fabricator-ui/icons.
Colour#
React Native has no colour inheritance, so an icon's colour comes from, in order:
- its
colorprop, - the nearest
IconProvider'scolor, - Fabricator's foreground for the colour scheme:
#171717in light,#f5f5f5in dark.
Icons follow light and dark mode with no setup. Brand marks with color="brand" pick their light or dark colour from the same scheme.
IconProvider#
| Prop | Type | Description |
|---|---|---|
color | string | Default colour for every icon below it. |
size | number | Default size. Icons fall back to 24. |
strokeWidth | number | Default stroke width. Icons fall back to 2. |
absoluteStrokeWidth | boolean | Keeps the stroke's pixel width at any size. |
colorScheme | "light" | "dark" | Overrides the device scheme, for apps that pick their own theme. |
Providers nest: an inner provider overrides only the props it sets.
Accessibility#
Icons are aria-hidden unless you label them. On a pressable icon, put accessibilityLabel on the Pressable, not the icon.