Skip to content

React Native - Text/Emoji is not vertically aligning in view #32198

@Parveshdhull

Description

@Parveshdhull

Description

I tried several configurations, but I am unable to vertically center Text/Emoji inside a view

React Native version:

0.65
I tested on "https://reactnative.dev/docs/text"

Steps To Reproduce

This is the code I am using:

import React, { useState } from "react";
import { View, Text } from "react-native";

const TextInANest = () => {
  return (
    <View style={{width: 200, height: 200, backgroundColor: "red", justifyContent: "center", alignContent: "center"}}>
    <Text style = {{fontSize: 100, textAlign: "center", backgroundColor: "black"}}>
    🥺
    </Text>
    </View>
  );
};
export default TextInANest;

Expected Results

Emoji should be in center

Current Result (See gap above and below emoji)

image

Snack, code example, screenshot, or link to a repository:

Related stack overflow question: https://stackoverflow.com/questions/69167282/react-native-text-emoji-is-not-vertically-aligning-in-view

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Triage 🔍StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions