Center

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.
Installation
API Reference
This is an illustration of Center component.
<Center bg="$primary500" h={200} w={300}>
<Text color="$text0" fontWeight="$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.
Edit this page on GitHub