Center

RSC
Helps center-align content and can create complex layouts easily.
Installation
API Reference
Important Note
This is the documentation for gluestack-ui v2 (beta). For @gluestack-ui/themed (stable) documentation, refer to gluestack-ui v1.
This is an illustration of Center component.
<Center className="bg-primary-500 h-[200px] w-[300px]">
<Text className="text-typography-0 font-bold">This is the center.</Text>
</Center>

Installation

Run the following command:

npx gluestack-ui add center

API Reference

To use this component in your project, include the following import statement in your file.
import { Center } from "@/components/ui/center"
export default () => <Center />

Component Props

This section provides a comprehensive reference list for the component props, detailing descriptions, properties, types, and default behavior for easy project integration.

Center

It inherits all the properties of React Native's View component.