iced::widget

Module scrollable

Source
Expand description

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()
}

Structs§

AbsoluteOffset
The amount of absolute offset in each direction of a Scrollable.
Id
The identifier of a Scrollable.
Rail
The appearance of the scrollbar of a scrollable.
RelativeOffset
The amount of relative offset in each direction of a Scrollable.
Scrollable
A widget that can vertically display an infinite amount of content with a scrollbar.
Scrollbar
A scrollbar within a Scrollable.
Scroller
The appearance of the scroller of a scrollable.
Style
The appearance of a scrollable.
Viewport
The current Viewport of the Scrollable.

Enums§

Anchor
The anchor of the scroller of the Scrollable relative to its Viewport on a given axis.
Direction
The direction of Scrollable.
Status
The possible status of a Scrollable.

Traits§

Catalog
The theme catalog of a Scrollable.

Functions§

default
The default style of a Scrollable.
scroll_by
Produces a Task that scrolls the Scrollable with the given Id by the provided AbsoluteOffset.
scroll_to
Produces a Task that scrolls the Scrollable with the given Id to the provided AbsoluteOffset.
snap_to
Produces a Task that snaps the Scrollable with the given Id to the provided RelativeOffset.

Type Aliases§

StyleFn
A styling function for a Scrollable.