npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-nitro-sfsymbols

v2.0.0

Published

Render Apple SF Symbols natively in React Native via Nitro Modules. Type-safe, accessible, tree-shakable.

Downloads

208

Readme

react-native-nitro-sfsymbols ✨

🍎 Render Apple SF Symbols natively in React Native via Nitro Modules. Type-safe, accessible, tree-shakable.

npm npm downloads License: MIT TypeScript Nitro Modules PRs welcome


📚 Table of Contents


✨ Highlights

  • 🎯 Native rendering through UIImage(systemName:) — no bridge overhead.
  • 🎨 All four rendering modes: monochrome, hierarchical, palette, multicolor.
  • 💫 iOS 17+ symbol effects: bounce, pulse, scale, rotate, appear, disappear, replace, variableColor.
  • 🚀 Per-instance image cache keeps list scrolling allocation-free.
  • 🌳 Tree-shakable: the icon catalog is opt-in via a subpath export — the core ships at ~1.5 KB.
  • WCAG 2.2 AA-friendly: decorative-by-default, Dynamic Type support, Reduce Motion respected, Increase Contrast aware.
  • 🛡️ Strict TypeScript 6: literal-union types, as const constants, full IDE autocomplete.

| Platform | Support | Minimum | |----------|---------|---------| | 🍎 iOS | full | 16.0 | | 💻 macOS / 📺 tvOS / 🥽 visionOS | full | latest | | 🤖 Android | empty placeholder (logs a single warning) | — |


📦 Install

yarn add react-native-nitro-sfsymbols react-native-nitro-modules
cd ios && pod install

ℹ️ react-native-nitro-modules >= 0.35 is required.


🚀 Usage

import { SFSymbolView, SFSymbolWeight } from 'react-native-nitro-sfsymbols';

export function FavoriteButton({ active }: { active: boolean }) {
  return (
    <SFSymbolView
      name={active ? 'heart.fill' : 'heart'}
      size={28}
      weight={SFSymbolWeight.SEMIBOLD}
      tintColor={active ? '#FF3B30' : '#8E8E93'}
      animation={active ? { type: 'bounce' } : undefined}
      accessibilityLabel={active ? 'Remove favorite' : 'Add favorite'}
      accessibilityRole="button"
    />
  );
}

📂 Optional curated catalog

For autocomplete on the most-used symbols, import from the /icons subpath:

import { SFIcons } from 'react-native-nitro-sfsymbols/icons';

<SFSymbolView name={SFIcons.HEART_FILL} />;

The catalog is opt-in — consumers who pass arbitrary strings pay zero catalog cost in their bundle.

🎨 Hierarchical / palette colors

<SFSymbolView
  name="cloud.sun.fill"
  renderingMode="hierarchical"
  hierarchical={{ primary: '#FFB300' }}
/>

<SFSymbolView
  name="cloud.bolt.rain.fill"
  renderingMode="palette"
  palette={{ primary: '#2196F3', secondary: '#FFB300', tertiary: '#90CAF9' }}
/>

💫 Animations (iOS 17+)

<SFSymbolView name="bell.fill" animation={{ type: 'bounce', repeating: false }} />

🧘 Animations are silently skipped when Reduce Motion is enabled (WCAG 2.3.3).


♿ Accessibility

SFSymbolView is decorative by default — without an accessibilityLabel it's hidden from VoiceOver and TalkBack (WCAG 1.1.1 Non-text Content). Pass either of:

  • accessibilityLabel="Add to favorites" — explicit label.
  • accessibilityAutoLabel — derive a label from the symbol name ("heart.fill""Heart").

For icon-only pressables, spread minTouchTargetStyle onto the wrapping Pressable to meet Apple HIG / WCAG 2.5.8 (minimum 44×44 hit area):

import { Pressable } from 'react-native';
import { SFSymbolView, minTouchTargetStyle } from 'react-native-nitro-sfsymbols';

<Pressable style={minTouchTargetStyle} onPress={onTap}>
  <SFSymbolView name="ellipsis" accessibilityLabel="More options" accessibilityRole="button" />
</Pressable>;

size honors the user's Dynamic Type setting by default (capped at 2× via maxFontSizeMultiplier). When the user enables Increase Contrast, an omitted tintColor falls back to the system label color for guaranteed contrast.


📖 API

| Prop | Type | Default | |------|------|---------| | name | string (or SFIcon from /icons) | required | | fallbackName | string | undefined | | size | number | 24 | | weight | SFSymbolWeight | 'regular' | | scale | SFSymbolScale | 'medium' | | tintColor | string (hex #RRGGBB / #RGB / #RRGGBBAA) | system label | | renderingMode | SFSymbolRenderingMode | 'monochrome' | | hierarchical | { primary; secondary?; tertiary? } | — | | palette | { primary; secondary?; tertiary? } | — | | animation | { type; repeating? } | — | | opacity | number (01) | 1 | | allowFontScaling | boolean | true | | maxFontSizeMultiplier | number | 2 | | accessibilityAutoLabel | boolean | false |

Standard accessibilityLabel, accessibilityHint, accessibilityRole, testID, style, etc. are forwarded.


⏫ Migrating from 1.x

  1. Bump react-native-nitro-modules to >= 0.35.
  2. Imports: SFIcons moved to a subpath:
    - import { SFIcons } from 'react-native-nitro-sfsymbols';
    + import { SFIcons } from 'react-native-nitro-sfsymbols/icons';
  3. Removed runtime helpers (use the constants directly):
    • isValidSFIcon, getAllSFIcons, camelCaseToSFSymbol, searchSFIcon
    • isValidColor, normalizeColor, clampOpacity, validateConfig, applyDefaults, optimizeProps, createHierarchicalConfig, createPaletteConfig, dimensionToSymbolSize, getPresetSize
  4. Constants are now plain objects (no longer enums). Member access is identical (SFSymbolWeight.BOLD); the type is a string-literal union.
  5. Color config keys: primaryColorprimary, secondaryColorsecondary, etc.
    - hierarchical={{ primaryColor: '#FF5722' }}
    + hierarchical={{ primary: '#FF5722' }}
  6. SFSymbolTheme was a duplicate of SFSymbolRenderingMode — removed. Use SFSymbolRenderingMode.
  7. tintColor is now string (hex). Pass '#RRGGBB', '#RGB', or '#RRGGBBAA'. Numeric/processColor values were silently dropped before — switching to a string keeps the type honest.
  8. variableColor boolean prop removed. Use animation={{ type: 'variableColor' }} instead, which is the actual iOS 17+ symbol effect.
  9. The icon catalog is now curated. Some 1.x entries were removed or renamed (e.g. TOGGLE_POWERPOWER). If TypeScript reports an unknown member, look up the symbol on Apple's SF Symbols app and pass its name as a plain string — every prop accepts arbitrary strings, so missing catalog entries are never blocking.
  10. iOS 16+ minimum.

The full release notes live in CHANGELOG.md.


⚡ Performance notes

  • 🧠 The native side caches resolved UIImage instances per configuration with an 8 MB NSCache. Repeated re-renders with identical props are zero-allocation.
  • 🔁 Property updates within a single React commit are coalesced into one render pass via the run loop.
  • 🎨 The hex color parser keeps a 32-entry LRU cache.
  • 📦 The catalog is shipped behind a subpath export — only consumers that import 'react-native-nitro-sfsymbols/icons' pay for it.

🤝 Contributing

Contributions are very welcome! Please read CONTRIBUTING.md for the development workflow, and our Code of Conduct to keep the project a safe and inclusive space.

Quick start:

git clone https://github.com/mCodex/react-native-nitro-sfsymbols.git
cd react-native-nitro-sfsymbols
yarn
yarn typecheck && yarn lint && yarn test

To run the example app:

cd example && yarn ios

💬 Support


🙏 Acknowledgments


📄 License

MIT © Mateus Andrade