Skip to main content

Layout

Layout is a themed container component meant to be the root view of a screen. It applies the Eva background color based on the level prop, making it easy to create layered screen designs.

Import

import { Layout } from '@ui-kitten/components';

Basic Usage

import React from 'react';
import { Layout, Text } from '@ui-kitten/components';

const HomeScreen = () => (
<Layout style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Text category="h1">Home</Text>
</Layout>
);

Props

PropertyTypeDefaultDescription
level'1' | '2' | '3' | '4''1'Background color depth level. Higher values produce darker backgrounds.
styleViewStyle-Additional styles applied to the container.
childrenReactNode-Content rendered inside the layout.

Layout also accepts all standard React Native View props.

Storybook

Live examples coming soon via Storybook.