Fusuma

Components / Basics

paragraph

A paragraph.

Try it

This is the Foundations page of the gallery, running in your browser: paragraph is on it, and it is the real widget. Press Run, then use it.

Live: Foundations, where paragraph is usedOpen full size

Also on this pagesectionwrapgridcardradio

A paragraph.

It wraps at the width its parent gives it, breaks a word that is too long, and follows the text direction. The text is 'static: for text that changes use text_fmt or a field.

Signature

pub const fn paragraph(text: &'static str) -> Paragraph

Methods

  • .caption() -> Self — In the small, quiet type of a caption or a hint, which wraps where text(..).caption() is cut off.

Example

use fusuma::{column, paragraph};
let view = column((paragraph("A paragraph wraps at the width it is given, and grows as tall as it needs.").caption(),));
let built = fusuma::doc::built::<(), _>(&view);
assert_eq!(built.nodes(), 2);

All components · Source