Paragraph
Paragraph is the standard widget for longer text.
Smallest example
let body = Paragraph::new("Ansiq keeps a retained UI tree.")
.wrap(Wrap { trim: true })
.build();Use Paragraph when
- text may wrap
- alignment matters
- you want a
Blockaround the text - vertical or horizontal scroll offsets matter
Key builder methods
Paragraph::new(...).wrap(...).alignment(...).scroll((y, x)).block(...).style(...)
Common combinations
Paragraph + Blockfor docs-like panelsParagraph + ScrollViewfor long help text
Where to see it in examples
- Scroll Sync: long content inside
ScrollView - Activity Monitor: summary panels
- OpenAPI Explorer: long detail regions
Last updated on
