Skip to content

Commit 0c701d5

Browse files
committed
docs
1 parent d7f97c1 commit 0c701d5

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
99

1010
### Added
1111

12-
- Added a 'stream' layout, which is a lot like vertical but with fewer supported rules (which is why it is faster)
12+
- Added a 'stream' layout, which is a lot like vertical but with fewer supported rules (which is why it is faster), will remain undocumented for now. https://github.com/Textualize/textual/pull/6013
1313

1414
## [5.1.1] - 2025-07-21
1515

src/textual/layouts/stream.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,18 @@
1313
class StreamLayout(Layout):
1414
"""A cut down version of the vertical layout.
1515
16-
Faster, but with fewer supported "features".
16+
The stream layout is faster, but has a few limitations compared to the vertical layout.
17+
18+
- All widgets are the full width (as if their widget is `1fr`).
19+
- All widgets have an effective height of `auto`.
20+
- `max-height` is supported, but only if it is a units value, all other extrema rules are ignored.
21+
- No absolute positioning.
22+
- No overlay: screen.
23+
- Layers are ignored.
24+
25+
The primary use of `layout: stream` is for a long list of widgets in a scrolling container, such as
26+
what you might expect from a LLM chat-bot. The speed improvement will only be significant with a lot of
27+
child widgets, so stick to vertical layouts unless you see any slowdown.
1728
1829
"""
1930

0 commit comments

Comments
 (0)