# Aligning Widgets

![align.rs - horizontal-align](/examples/align-horizontal.png)

## Align a widget to the left

```rust,no_run,no_playground
{{#include ../guide-examples/examples/align.rs:align-left}}
```

## Align a widget to the left, with padding

```rust,no_run,no_playground
{{#include ../guide-examples/examples/align.rs:align-left-pad}}
```

## Align a widget to the center

```rust,no_run,no_playground
{{#include ../guide-examples/examples/align.rs:centered}}
```

## Align a widget to the right, with padding

```rust,no_run,no_playground
{{#include ../guide-examples/examples/align.rs:align-right-pad}}
```

## Align a widget to the right

```rust,no_run,no_playground
{{#include ../guide-examples/examples/align.rs:align-right}}
```
