---
title: UI 9-slice design
description: UI 9-slice design lets you create UI elements of varying sizes without distorting the borders or corners.
---
When creating UI with custom borders and corners, you'll often need to render elements at different aspect ratios and visually surround [localized text](../production/localization/index.md) or other contents of unknown dimensions.
This lets you create UI elements of varying sizes without distorting the borders or corners.
| Sub-image | Scaling |
|---|---|
| 1 3 7 9 (corners) | none |
| 2 8 (top/bottom edges) | horizontal |
| 4 6 (left/right edges) | vertical |
| 5 (center) | horizontal + vertical |
1. Set the **ScaleType** property to **Slice**.
1. Click on the **SliceCenter** property that appears, then click on the **…** within the row.
1. In the window that opens, 4 red lines overlay the image, representing the edges of the slices. The source image size is also displayed.
### Set offsets
In Studio, drag the red lines to set the **offsets** from the left, right, top,
and bottom edges of the image.
As you reposition the dragger lines, the UI element automatically updates to show the result.