npm package '@tamagui/lucide-icons'

Popularity: Low
Description: React Native components for Lucide icons - native and web
Installation: npm install @tamagui/lucide-icons
Last version: 1.2.3 (Download)
Size: 10,439.5 kB
License: MIT

Activity

Last modified: February 2, 2023 9:55 AM (8 months ago)
Versions released in one year: 106
Weekly downloads: 10,706
10/02/202201/08/202303/26/202306/11/202304,0008,00012,00016,0000481216released versions / week
  • Versions released
  • Weekly downloads

Readme

React Native Lucide Icons

Simply beautiful SVG icons as React Native SVG components.

This repository is a copy of the React Feather project.

The main difference between them is that this project outputs React Native SVG components that will render on React Native platforms.

Installation

npm install @tamagui/lucide-icons --save

You will also need to ensure you have installed React Native SVG into your project.

Usage

import { Camera } from '@tamagui/lucide-icons';

class MyClass extends React.Component {
  render() {
    return <Camera />
  }
}

If you are using WebPack, you can import only one icon.

import Camera from '@tamagui/lucide-icons/dist/icons/camera';

class MyClass extends React.Component {
  render() {
    return <Camera />
  }
}

If you can't use ES6 imports, it's possible to include icons from the compiled folder ./dist.

var Camera = require('@tamagui/lucide-icons/dist/icons/camera').default;

var MyComponent = React.createClass({
  render: function () {
    return (
      <Camera />
    );
  }
});

You can also include the whole icon pack:

import * as Icon from '@tamagui/lucide-icons';

class MyClass extends React.Component {
  render() {
    return <Icon.Camera />
  }
}

Icons can be configured with inline props:

<Icon.AlertCircle color="red" size={48} />