@impulse-ui-native/icon
v2.9.0
Published
A typed icon library for ImpulseUI Native applications.
Maintainers
Readme
@impulse-ui-native/icon
A React Native SVG icon library with a common renderer and six visual weights.
Installation
pnpm add @impulse-ui-native/icon react-native-svgMain exports
Iconnormalizes icon size, color, and rendering.- Named wrapper icons such as
HeartIconselect a visual weight through thevariantprop. - Available weights are
bold,duotone,fill,light,regular, andthin. IconProps,IconWrapperProps,IconVariant, andIconStylesupport typed composition.
Usage
import { Icon } from "@impulse-ui-native/icon/components/icon";
import { HeartIcon } from "@impulse-ui-native/icon/icons/heart";
<Icon icon={HeartIcon} variant="duotone" size="large" color="#6d5dfc" />;You can also render a named wrapper directly when you want to control the SVG dimensions yourself.
<HeartIcon variant="regular" width={24} height={24} fill="#111827" />Wrapper names use the {Name}Icon form. Import wrappers through their per-icon
entrypoints so Metro only includes the icons used by the application:
import { HeartIcon } from "@impulse-ui-native/icon/icons/heart";