Link
Underlined text in the link colour that opens a URL or acts on a click.
Basic
ui.add(Link::new("fastframe on GitHub").href("https://github.com/crmne/fastframe"));
if ui
.add(Link::new(format!("Clicked {} times", state.clicks)))
.clicked()
{
state.clicks += 1;
}
ui.add(Link::new("Disabled").disabled(true));
In a sentence
ui.spacing_mut().item_spacing.x = 4.0;
ui.label("Read the");
ui.add(Link::new("getting started guide").href("https://github.com/crmne/fastframe"));
ui.label("before you install.");
Truncated
ui.add(Link::new("A very long link that is cut short to fit its room").truncate());
The story above is gallery/src/stories/link.rs, running in your browser. Every snippet on this page is cut from it.