How to change the font family of a native base input?

Viewed 1278

I'm able to modify the font family of a native-base input label like this:

<Input style={{fontFamily: 'Termina-Bold'}}/>

But I don't find how to modify the font family of the text entered by the user.

How can I achieve this?

2 Answers

Link add fonts like this

create react-native.config.js file on root folder and add this

module.exports = {
    project: {
      ios: {},
      android: {}, // grouped into "project"
    },
    assets: ["./src/assets/fonts/"], // src/assets/fonts/ replace with your fonts location folder path
  };

enter image description here

enter image description here

enter image description here

Its Working fine :-)

no fontFamily

 <Input placeholder="Underline Textbox" style={{ textAlign: "center", marginTop: 15,backgroundColor:'pink' }} />

Example:

enter image description here enter image description here

Poppins-SemiBold

 <Input placeholder="Underline Textbox" style={{ fontFamily: "Poppins-SemiBold", textAlign: "center", marginTop: 15,backgroundColor:'pink' }} />

enter image description here enter image description here

Poppins-Regular

<Input placeholder="Underline Textbox" style={{ fontFamily: "Poppins-Regular", textAlign: "center", marginTop: 15,backgroundColor:'pink' }} />

enter image description here

Related