Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for lucide icons #1630

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Examples/IconExplorer/ios/IconExplorer/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
<string>FontAwesome5_Solid.ttf</string>
<string>Foundation.ttf</string>
<string>Ionicons.ttf</string>
<string>Lucide.ttf</string>
<string>MaterialCommunityIcons.ttf</string>
<string>MaterialIcons.ttf</string>
<string>Octicons.ttf</string>
Expand Down
4 changes: 4 additions & 0 deletions Examples/IconExplorer/src/icon-sets.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import FontAwesome5 from 'react-native-vector-icons/FontAwesome5';
import Fontisto from 'react-native-vector-icons/Fontisto';
import Foundation from 'react-native-vector-icons/Foundation';
import Ionicons from 'react-native-vector-icons/Ionicons';
import Lucide from 'react-native-vector-icons/Lucide';
import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
import Octicons from 'react-native-vector-icons/Octicons';
Expand All @@ -22,6 +23,7 @@ import FontAwesome5Glyphs from 'react-native-vector-icons/glyphmaps/FontAwesome5
import FontistoGlyphs from 'react-native-vector-icons/glyphmaps/Fontisto.json';
import FoundationGlyphs from 'react-native-vector-icons/glyphmaps/Foundation.json';
import IoniconsGlyphs from 'react-native-vector-icons/glyphmaps/Ionicons.json';
import LucideGlyphs from 'react-native-vector-icons/glyphmaps/Lucide.json';
import MaterialIconsGlyphs from 'react-native-vector-icons/glyphmaps/MaterialIcons.json';
import MaterialCommunityIconsGlyphs from 'react-native-vector-icons/glyphmaps/MaterialCommunityIcons.json';
import OcticonsGlyphs from 'react-native-vector-icons/glyphmaps/Octicons.json';
Expand All @@ -38,6 +40,7 @@ const GLYPH_MAPS = {
Fontisto: FontistoGlyphs,
Foundation: FoundationGlyphs,
Ionicons: IoniconsGlyphs,
Lucide: LucideGlyphs,
MaterialIcons: MaterialIconsGlyphs,
MaterialCommunityIcons: MaterialCommunityIconsGlyphs,
Octicons: OcticonsGlyphs,
Expand All @@ -55,6 +58,7 @@ const ICON_SETS = {
Fontisto,
Foundation,
Ionicons,
Lucide,
MaterialIcons,
MaterialCommunityIcons,
Octicons,
Expand Down
Binary file added Fonts/Lucide.ttf
Binary file not shown.
17 changes: 17 additions & 0 deletions Lucide.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* Lucide icon set component.
* Usage: <Lucide name="icon-name" size={20} color="#4F8EF7" />
*/

import createIconSet from './lib/create-icon-set';
import glyphMap from './glyphmaps/Lucide.json';

const iconSet = createIconSet(glyphMap, 'Lucide', 'Lucide.ttf');

export default iconSet;
export const {
Button,
getImageSource,
getImageSourceSync,
} = iconSet;

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Should you find this library beneficial, kindly contemplate the option of [spons
- [`Fontisto`](https://github.com/kenangundogan/fontisto) created by Kenan Gündoğan (v3.0.4 featuring *615* icons)
- [`Foundation`](http://zurb.com/playground/foundation-icon-fonts-3) by ZURB, Inc. (v3.0 with *283* icons)
- [`Ionicons`](https://ionicons.com/) crafted by Ionic (v7.1.0 containing *1338* icons)
- [`Lucide`](https://lucide.dev/) crafted by Eric Fennis, Karsa Rigó, Jakob Guddas (v0.395.0 containing *1468* icons)
- [`MaterialIcons`](https://fonts.google.com/icons/) by Google, Inc. (v4.0.0 featuring *2189* icons)
- [`MaterialCommunityIcons`](https://materialdesignicons.com/) from MaterialDesignIcons.com (v6.5.95 including *6596* icons)
- [`Octicons`](http://octicons.github.com) designed by Github, Inc. (v16.3.1 with *250* icons)
Expand Down Expand Up @@ -94,6 +95,7 @@ To use the bundled icons on iOS, follow these steps:
<string>FontAwesome6_Solid.ttf</string>
<string>Foundation.ttf</string>
<string>Ionicons.ttf</string>
<string>Lucide.ttf</string>
<string>MaterialIcons.ttf</string>
<string>MaterialCommunityIcons.ttf</string>
<string>SimpleLineIcons.ttf</string>
Expand Down
Loading