---
nav-title: "stack-layout How-To"
title: "stack-layout"
environment: nativescript
description: "Examples for using stack-layout"
previous_url: /ApiReference/ui/layouts/stack-layout/HOW-TO
---
# StackLayout
Using a StackLayout requires the StackLayout module.
{%snippet stack-layout-require%}

### Declaring a StackLayout.
``` XML
<Page>
  <StackLayout orientation="horizontal">
    <Label text="This is Label 1" />
  </StackLayout>
</Page>
```

## Create StackLayout
{%snippet stack-layout-new%}

## Add child view to layout
{%snippet stack-layout-addchild%}

## Remove child view from layout
{%snippet stack-layout-remove%}

## Change layout orientation to Horizontal
{%snippet stack-layout-horizontal%}

