Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions docs / reference / containers /index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Containers

Containers are layout widgets used to arrange other widgets.

---

## Container

A simple container widget with vertical layout.

### Default Behavior

- Expands to fill available width and height.
- Uses vertical layout.
- Hides overflow on both axes.

### Default CSS

```css
Container {
width: 1fr;
height: 1fr;
layout: vertical;
overflow: hidden hidden;
}
```
--------

## Vertical
An expanding container with vertical layout and no scrollbars.

### Default Behavior
Expands to fill available space.

Arranges children top-to-bottom.

No scrollbars.

### Default CSS

```css
Vertical {
width: 1fr;
height: 1fr;
layout: vertical;
overflow: hidden hidden;
}
```
----

## Horizontal
An expanding container with horizontal layout and no scrollbars.

### Default Behavior
Expands to fill available space.

Arranges children left-to-right.

No scrollbars.

Default CSS

```css
Horizontal {
width: 1fr;
height: 1fr;
layout: horizontal;
overflow: hidden hidden;
}
```
----

---
72 changes: 72 additions & 0 deletions docs/reference/containers/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Containers

Containers are layout widgets used to arrange other widgets.

---

## Container

A simple container widget with vertical layout.

### Default Behavior

- Expands to fill available width and height.
- Uses vertical layout.
- Hides overflow on both axes.

### Default CSS

```css
Container {
width: 1fr;
height: 1fr;
layout: vertical;
overflow: hidden hidden;
}
```

----

## Vertical
An expanding container with vertical layout and no scrollbars.

Default Behavior
Expands to fill available space.

Arranges children top-to-bottom.

No scrollbars.

### Default CSS

```css
Vertical {
width: 1fr;
height: 1fr;
layout: vertical;
overflow: hidden hidden;
}
```

-----

## Horizontal
An expanding container with horizontal layout and no scrollbars.

Default Behavior
Expands to fill available space.

Arranges children left-to-right.

No scrollbars.

### Default CSS

```css
Horizontal {
width: 1fr;
height: 1fr;
layout: horizontal;
overflow: hidden hidden;
}
```
9 changes: 9 additions & 0 deletions docs/reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ Welcome to the Textual Reference.
How to use the many widgets builtin to Textual.

:octicons-arrow-right-24: [Widgets Reference](../widgets/index.md)


- :octicons-book-16:{ .lg .middle } __Containers__

---

Layout and alignment containers for arranging widgets.

:octicons-arrow-right-24: [Containers Reference](containers/index.md)



Expand Down