Ads by ProfitSence
Close

Text Align right an element in React Native Code Example

Last Updated on Wednesday 5th Oct 2022

react native text align

React Native can make it difficult to align a component correctly. text-align:right. You can use flexbox to right-align an element on a View Component.

Use flexDirection: 'row' and justifyContent: 'flex-end' on the View

			
					export default () => {
  return (
    <View
      style={{
        flexDirection: "row",
        justifyContent: "flex-end"
      }}
    >
      <Button
        title="Tap Me"
        onPress={() => console.log("Congrats You Clicked !")}
      />
    </View>
  )
}

			
	

Use alignItems: 'flex-end' on the View

			
					export default () => {
  return (
    <View
      style={{
        alignItems : "flex-end"
      }}
    >
      <Button
        title="Tap Me"
        onPress={() => console.log("Congrats You Clicked !")}
      />
    </View>
  )
}

			
	
react align right
react native align right
react native right align
react native text align
react native text align right
align right react native
react right align
align right react
text align react native
align item right react native
react native view align right
text align right react native
react text align right
react native align left