cosmic::iced_widget

Function scrollable

source
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,
Expand description

Creates a new Scrollable with the provided content.

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

ยงExample

use iced::widget::{column, scrollable, vertical_space};

enum Message {
    // ...
}

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