![]() ![]() If you want to give it a different name, go to Preferences after step 5 and change the name there before downloading. The default name of the font file is icomoon.ttf. import CustomIcon from './components/CustomIcon.js' That's it! To use a font simply import the file as a React component and pass the icon name and size (optional) or even style. Import icoMoonConfig from './selection.json' Įxport default createIconSetFromIcoMoon(icoMoonConfig) Put the font file (.ttf) in the resources/fonts folder and add the following script to the package.json: "rnpm": from 'react-native-vector-icons' Remove the current set (if there is one) and create a new empty set and give your preferred name (remember to give the same name everywhere). Now we need to get the TTF file and place it in the resources/fonts folder that we just created. This will set up the vector icons framework for you. The steps for the configuration are as follows:Ĭreate a resources folder where we will keep our custom font file (.ttf).ĭo react-native link react-native-vector-icons. It is a front end only app and does not upload your icons anywhere, so there will be no privacy concerns! Icomoon is a free and open source application which lets you convert a set of SVG icons to fonts. We will use IcoMoon to support custom icons/fonts. npm install -save react-native-vector-iconsĬonfiguring your project to support custom icon sets. Install the npm module using npm or Yarn. We used IcoMoon to convert our SVGs to a config which is readable by the library. It supports Fontello and IcoMoon to create custom fonts. ![]() React-native-vector-icons supports using custom icon sets if you do not want to use the icons which come bundled with it or if you want to add your own icons. SVG Icons using react-native-vector-icons □ Speed up development with some and ES7 features □ Creating basic components and writing platform-specific codeĮSLint: The guardian of code conventions ⚔️ ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |