Skip to content
Native Animation
Base Animated Icon animation previewBase Animated Icon animation preview

This preview uses fictional demo content. See the props below for the customization options available in this component.

npx nativeanimation add base-animated-icon

Base Animated Icon

React Native Animated Icon Component

Animated stroke icons that ring, draw, and turn, with configurable icon, size, color, and stroke width.

Native Animation Base · Free · MIT

Add to your project

Copy the component and its assets into your app with the Native Animation CLI, or paste the agent prompt into Claude Code, Codex or Cursor once the MCP server is connected.

About this component

Animated stroke icons that ring, draw, and turn, with configurable icon, size, color, and stroke width.

How it works

  1. Each icon is drawn with react-native-svg from Lucide's paths.
  2. Changing trigger plays its motion once: the bell swings (0 → 20° → −10° … in 900 ms) while its clapper sways, the trend line draws itself and its arrow pops in, the refresh arrow turns 45° and back on a spring, the double check draws its two strokes in turn.
  3. Stroke drawing animates strokeDashoffset with precomputed path lengths.
  4. Size, color and stroke width match Lucide's API so it sits next to regular lucide-react-native icons.

Install

npx nativeanimation add base-animated-icon

The CLI also copies base-theme. Dependencies, if you copy by hand:

npx expo install react-native-reanimated react-native-worklets react-native-svg

Usage

import { BaseAnimatedIcon } from './base-animated-icon';

const [ring, setRing] = useState(0);
<Pressable onPress={() => setRing((n) => n + 1)} accessibilityLabel="Notifications">
  <BaseAnimatedIcon name="bell" trigger={ring} size={20} />
</Pressable>

Inside a button, playing on each sync:

<BaseButton variant="outline" onPress={sync} leading={<BaseAnimatedIcon name="refresh-cw" size={16} trigger={syncs} />}>
  Sync now
</BaseButton>

Wrap your app in BaseThemeProvider (from base-theme) to choose light/dark and an accent; without it, pieces use the light neutral theme. Every piece also takes a theme prop that wins over the provider.

Props

PropTypeDefaultDescription
name'bell' | 'trending-up' | 'refresh-cw' | 'check-check'—Which icon.
triggernumber0Change it to play the motion once.
animateOnMountbooleanfalsePlays once when it appears.
sizenumber20Width and height.
colorstringforegroundStroke color.
strokeWidthnumber2Stroke width on Lucide's 24 grid.
accessibilityLabelstring—Set it when the icon carries meaning on its own.
themeBaseThemeproviderOverrides the theme from BaseThemeProvider.
testIDstring—Test identifier on the root view.

Compatibility

Expo SDK 58 · React Native 0.88 · Reanimated 4.7 · react-native-worklets 0.13. Runs on iOS, Android and web, in Expo Go and in development builds. Part of Native Animation Base, a free family that shares one theme: install base-theme once (the CLI does it for you) and every Base piece picks it up.

Accessibility

Decorative by default (hidden from screen readers unless you pass accessibilityLabel). With Reduce Motion on, the icon stays still.

Source code

Loading public source…