logo

Custom Fonts with React-Native

Working on an app in react-native and want to import you own fonts? Here's how to set it up.

  1. Add your font files to your project. I'll use ./assets/fonts/
  2. Create a react-native.config.js at the project root.

    module.exports = {
     project: {
       ios: {},
       android: {},
     },
     assets: ['./assets/fonts/'],
    }
  3. Use the fonts in your styles.

    title: {
    textAlign: 'center',
    fontSize: 18,
    fontFamily: 'Nunito Sans, sans-serif',
    fontWeight: 'bold',
    marginBottom: 10,
    },
©2023