Text
Text is a foundational element for communication, conveying information to users. It serves various purposes, including displaying content, headings, links, and other text-based elements.
Import
import { Text } from '@vortex-kit/vortex';
import type { TextProps } from '@vortex-kit/vortex';
Display
<Text size='body-md-desktop'>Design Engineer</Text>
Design Engineer
Title Text Sizes
Text supports responsive sizing with different variants for mobile and desktop. The size prop accepts responsive objects to provide different sizes at different breakpoints.
Loading...
Show Code
Body Text Sizes
Body text sizes are optimized for readability across different contexts.
Loading...
Show Code
Link Text Sizes
Link text sizes are specifically designed for interactive elements.
Loading...
Show Code
Color
Text supports a comprehensive range of colors including semantic colors for different contexts and states.
Loading...
Show Code
Inverse Color
Inverse color is designed for use on dark backgrounds.
Loading...
Show Code
Inherit Color
The inherit color allows text to inherit the color from its parent element.
Loading...
Show Code
Weight
Text supports multiple font weights to create visual hierarchy and emphasis.
Loading...
Show Code
Decoration
Text supports text decoration for special formatting needs.
Loading...
Show Code
Wrap
Text supports text wrapping with balance for better typography.
Loading...
Show Code
Max Lines
Text can be truncated to a specific number of lines using the maxLines prop.
Loading...
Show Code
Align
Text supports text alignment with responsive options.
Loading...
Show Code
Accessibility
Text component provides semantic HTML structure and supports accessibility attributes.
Key | Description |
---|---|
⬢ | If as prop is omitted, it defaults to span. |
⬢ | Use semantic HTML elements with the as prop for better accessibility (e.g., as="p", as="h1"). |
⬢ | Text supports custom attributes for additional accessibility features. |
⬢ | Use appropriate color contrast ratios for text readability. |