When you need to center-align content, the Center component comes in handy. It is a layout component that can be used with other components to create complex layouts and positioning.
API Reference
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>


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.


It inherits all the properties of React Native's View component.
Edit this page on GitHub