Text is a general purpose typography component. Castle UI also exports semantic components for headings.
Typography
import { Text, H1, H2, H3, H4, Title } from '@passfort/castle'content_copyCopy
Titles
Title XXL
Title XL
Headings
Heading 1
Heading 2
Heading 3
Heading 4
Content
Body text
Small
Data
content_copyCopy
live example
Bold
content_copyCopy
live example
Lists
content_copyCopy
live example
Overflow
If contents of the Text are overflowing, you can set textOverflow as tooltip, to show the text truncated with ellipsis, and show full contents in a popover tooltip.
content_copyCopy
live example
Accessibility
using the as prop allows visual styling to differ from semantic structure,
which can be important for screen readers.
content_copyCopy
live example