Skip to content

Adding Icons

Wrap your icon components with iconWithClassName to add a class name to the icon.

Create a file for each icon in ~/lib/icons/

For each icon you want to add, create a new file in the ~/lib/icons/ directory with the name of the LucideIcon.

In each file:

  • Import the Icon from LucideIcon
  • Import the iconWithClassName function
  • Call the iconWithClassName function and pass the icon as its argument
  • Export the Icon as a named export

Example

~/lib/icons/Copy
import { Copy } from 'lucide-react-native';
import { iconWithClassName } from './iconWithClassName';
iconWithClassName(Copy);
export { Copy };