Skip to main content

text

Function text 

Source
pub fn text<'a, Theme>(text: impl IntoFragment<'a>) -> Text<'a, Theme>
where Theme: Catalog + 'a,
Expand description

Creates a new Text widget with the provided content.

§Example

ⓘ
use iced_selection::text;

enum Message {
    // ...
}

fn view(state: &State) -> impl Widget<'_, Message> {
    text("Hello, this is iced!")
        .size(20)
        .into()
}