Sometimes, we want to add border bottom in React Native.
In this article, we’ll look at how to add border bottom in React Native.
How to add border bottom in React Native?
To add border bottom in React Native, we can add border bottom on the View
.
For instance, we write:
import * as React from 'react';
import { View, Text } from 'react-native';
import Constants from 'expo-constants';
import { Card } from 'react-native-paper';
export default function App() {
return (
<View style={{ borderBottom: '1px solid blue' }}>
<Text>foo</Text>
</View>
);
}
to set borderBottom
to '1px solid blue'
on the View
.
Now we see a bottom border on below the text and it’s blue.
Conclusion
To add border bottom in React Native, we can add border bottom on the View
.