LazyColumn
LazyColumn is the virtualized list primitive in Fission.
It is designed for long vertical lists where building every item on every frame would be wasteful. Instead of lowering the entire list, it lowers only the visible slice plus spacer regions above and below that slice.
Use LazyColumn when you have many items with a uniform item height. Do not use it for short lists, highly irregular item heights, or one-off scrollable forms. In those cases, a normal Scroll containing a Column is usually simpler.
Example
use std::sync::Arc;
use fission::core::ui::{LazyColumn, Text};
let node = LazyColumn {
children: Arc::new(
(0..500)
.map(|i| Text::new(format!("Row {i}")).into_node())
.collect(),
),
item_height: 40.0,
..Default::default()
}
.into_node();
Field table
| Field | Type | Meaning | Notes / default behavior |
|---|---|---|---|
id | Option<NodeId> | Stable node identity used for scroll tracking. | Defaults to None. |
children | Arc<Vec<Node>> | All list items. | Required. Only the visible slice is lowered each frame when virtualization is active. |
item_height | f32 | Uniform height for each item. | Required for virtualization. If item_height <= 0.0, virtualization is disabled. |
How it differs from Scroll
A Scroll always lowers its entire child subtree. A LazyColumn lowers only the visible range of items and represents the rest with spacer boxes.
That makes LazyColumn the right choice for large lists, but only when the list can honestly be treated as uniform-height rows. If your items vary greatly in height, the simplification that makes virtualization efficient also makes it less accurate.
Specific advice
Be realistic about item_height. If the value is wrong, scroll math and perceived visibility can feel off. For lists with mixed content heights, prefer a normal scroll container until the framework offers a list model that matches that complexity.
Another important detail is that LazyColumn already owns vertical scrolling. Do not wrap it in another vertical Scroll unless you intentionally want nested scrolling behavior.