iced

Iced Docs

Source-verified docs generated from /src/content.

Reference

Family - Scrollable

Unified reference for the Scrollable widget family across module, constructor, and element APIs.

Version: latest | Last updated: 2026-02-19

Family - Scrollable

This page unifies related iced::widget APIs for the Scrollable family.

# API surfaces

# Surface summaries

# Module

Scrollables let users navigate an endless amount of content with a scrollbar.

# Constructor

Creates a new Scrollable with the provided content.

# Element

A widget that can vertically display an infinite amount of content with a scrollbar.

# Verified constructor signature

rust
pub fn scrollable<'a, Message, Theme, Renderer>(
    content: impl Into<Element<'a, Message, Theme, Renderer>>,
) -> Scrollable<'a, Message, Theme, Renderer>
where
    Theme: Catalog + 'a,
    Renderer: Renderer,

# Verified element declaration

rust
pub struct Scrollable<'a, Message, Theme = Theme, Renderer = Renderer<Renderer, Renderer>>
where
    Theme: Catalog,
    Renderer: Renderer,{ /* private fields */ }

# Example References

  • ref/examples/table/src/main.rs
  • ref/examples/combo_box/src/main.rs
  • ref/examples/todos/src/main.rs
  • ref/examples/layout/src/main.rs
  • ref/examples/delineate/src/main.rs
  • ref/examples/geometry/src/main.rs

# Inline Examples (from rustdoc)

# Constructor example

rust
use iced::widget::{column, scrollable, space};

enum Message {
    // ...
}

fn view(state: &State) -> Element<'_, Message> {
    scrollable(column![
        "Scroll me!",
        space().height(3000),
        "You did it!",
    ]).into()
}

# Element example

rust
use iced::widget::{column, scrollable, space};

enum Message {
    // ...
}

fn view(state: &State) -> Element<'_, Message> {
    scrollable(column![
        "Scroll me!",
        space().height(3000),
        "You did it!",
    ]).into()
}

# Use this when...

  • You want one page that links module, constructor, and element surfaces.
  • You are deciding which API surface to start from.
  • You need a practical map for this widget domain.

# Minimal example

rust
// Typical flow:
// 1) Start with constructor usage.
// 2) Move to module docs for style/state details.
// 3) Use element docs for type-level control.

# How it works

Family pages connect related docs so you do not miss capabilities that are split across constructor/module/element pages.

# Common patterns

rust
// Build with constructor APIs first,
// then refine behavior/styles through related module and element docs.

# Gotchas / tips

  • Family routes normalize naming; module/function/struct names may differ slightly.
  • Prefer this page as your entrypoint when learning unfamiliar widgets.
  • Follow example references here before inventing integration patterns.