Docs

Blog

Gallery

Resources

Learn

Components

API Reference

Onboarding

Library

/

Chakra

/

Typography

/

Text

The text component displays a paragraph of text.

Hello World!

rx.chakra.text("Hello World!", font_size="2em")

The text element can be visually modified using the as_ prop.

Hello World!Hello World!Hello World!Hello World!
rx.chakra.vstack(
    rx.chakra.text("Hello World!", as_="i"),
    rx.chakra.text("Hello World!", as_="s"),
    rx.chakra.text("Hello World!", as_="mark"),
    rx.chakra.text("Hello World!", as_="sub"),
)

Render a paragraph of text.

PropTypeDescriptionValues
as_str

Override the tag. The default tag is <p>.

no_of_linesint

Truncate text after a specific number of lines. It will render an ellipsis when the text exceeds the width of the viewport or max_width prop.

Event Triggers

No component specific event triggers

Did you find this useful?

HomeGalleryChangelogIntroductionHosting