text_elements.py 698 B

123456789101112131415161718192021222324252627
  1. from nicegui import ui
  2. from ..model import SectionDocumentation
  3. from ..more.label_documentation import LabelDocumentation
  4. from ..tools import load_demo
  5. name = 'text_elements'
  6. title = 'Text Elements'
  7. description = '''
  8. Elements like `ui.label`, `ui.markdown` and `ui.html` can be used to display text and other content.
  9. '''
  10. def content() -> None:
  11. load_demo(ui.label)
  12. load_demo(ui.link)
  13. load_demo(ui.chat_message)
  14. load_demo(ui.element)
  15. load_demo(ui.markdown)
  16. load_demo(ui.mermaid)
  17. load_demo(ui.html)
  18. class TextElementsDocumentation(SectionDocumentation, title='Text Elements'):
  19. def content(self) -> None:
  20. self.add_element_intro(LabelDocumentation())