VaneUI

VaneUI

Typography Components

Text

The primary component for rendering all text content. It provides props to control typographic properties like size, weight, color, and alignment.

SourceEdit this page

The primary component for rendering all text content. It provides props to control typographic properties like size, weight, color, and alignment.

Basic Text

Default paragraph text styling.

Build beautiful user interfaces with VaneUI components. Text provides consistent typography across your application.

react-icon
<Text>Build beautiful user interfaces with VaneUI components. Text provides consistent typography across your application.</Text>

Text Sizes

Text comes in different sizes: xs, sm, md (default), lg, xl.

Extra small text

Small text for captions

Medium text (default)

Large text for emphasis

Extra large text

react-icon
<Col>
<Text xs>Extra small text</Text>
<Text sm>Small text for captions</Text>
<Text>Medium text (default)</Text>
<Text lg>Large text for emphasis</Text>
<Text xl>Extra large text</Text>
</Col>

Inherit Appearance (Default)

Text defaults to the inherit appearance — it picks up its color from the parent via CSS cascade instead of applying its own. Set an explicit appearance to override.

Inherited Primary

This text inherits primary from the Card.

Inherited Success

Inherits success color automatically.

Explicit danger overrides inherit.

react-icon
<Row flexWrap>
<Card primary filled>
<Text bold>Inherited Primary</Text>
<Text>This text inherits primary from the Card.</Text>
</Card>
<Card success filled>
<Text bold>Inherited Success</Text>
<Text>Inherits success color automatically.</Text>
<Text danger>Explicit danger overrides inherit.</Text>
</Card>
</Row>

Text Appearances

Text supports explicit color appearances: primary, brand, accent, secondary, tertiary, success, danger, warning, info, link. Use these to override the default inherit behavior.

Primary text for important content

Brand text for brand-colored content

Accent text for highlights

Secondary text for supporting content

Tertiary text for muted content

Success text for positive feedback

Danger text for errors or warnings

Warning text for cautionary messages

Info text for informational content

Link-colored text for clickable content

react-icon
<Col>
<Text primary>Primary text for important content</Text>
<Text brand>Brand text for brand-colored content</Text>
<Text accent>Accent text for highlights</Text>
<Text secondary>Secondary text for supporting content</Text>
<Text tertiary>Tertiary text for muted content</Text>
<Text success>Success text for positive feedback</Text>
<Text danger>Danger text for errors or warnings</Text>
<Text warning>Warning text for cautionary messages</Text>
<Text info>Info text for informational content</Text>
<Text link>Link-colored text for clickable content</Text>
</Col>

Font Weights

Control weight with thin, extralight, light, normal, medium, semibold, bold, extrabold, black.

Thin weight

Light weight

Normal weight

Medium weight

Semibold weight

Bold weight

Extra bold weight

Black weight

react-icon
<Col>
<Text thin>Thin weight</Text>
<Text light>Light weight</Text>
<Text normal>Normal weight</Text>
<Text medium>Medium weight</Text>
<Text semibold>Semibold weight</Text>
<Text bold>Bold weight</Text>
<Text extrabold>Extra bold weight</Text>
<Text black>Black weight</Text>
</Col>

Font Families

Switch font family with sans (default), serif, mono.

Sans-serif font (default)

Serif font for editorial content

Monospace for code or technical content

react-icon
<Col>
<Text sans>Sans-serif font (default)</Text>
<Text serif>Serif font for editorial content</Text>
<Text mono>Monospace for code or technical content</Text>
</Col>

Italic, Underline, Line-Through

Italic text for quotes or terms

Underlined text for emphasis

Line-through for deleted content

react-icon
<Col>
<Text italic>Italic text for quotes or terms</Text>
<Text underline>Underlined text for emphasis</Text>
<Text lineThrough>Line-through for deleted content</Text>
</Col>

Text Transform

Use uppercase, lowercase, capitalize.

Uppercase for labels

LOWERCASE NORMALIZED

capitalized words example

react-icon
<Col>
<Text uppercase>Uppercase for labels</Text>
<Text lowercase>LOWERCASE NORMALIZED</Text>
<Text capitalize>capitalized words example</Text>
</Col>

Text Alignment

Align text with textLeft (default), textCenter, textRight, textJustify. Text defaults to wFit, so set wFull to see alignment effects across the container.

Left aligned (default)

Center aligned

Right aligned

Justified text spreads to fill the line, distributing extra space between words across the full container width.

react-icon
<Col>
<Text wFull>Left aligned (default)</Text>
<Text wFull textCenter>Center aligned</Text>
<Text wFull textRight>Right aligned</Text>
<Text wFull textJustify>Justified text spreads to fill the line, distributing extra space between words across the full container width.</Text>
</Col>

Truncate and Line Clamp

Use truncate for single-line ellipsis, or lineClamp2/lineClamp3/lineClamp4/lineClamp5 for multi-line clamping.

Truncated single line of text that will be cut off with an ellipsis when it exceeds the container width.

Clamped to two lines. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation.

Clamped to three lines. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

react-icon
<Col>
<Text wFull truncate>Truncated single line of text that will be cut off with an ellipsis when it exceeds the container width.</Text>
<Text wFull lineClamp2>Clamped to two lines. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation.</Text>
<Text wFull lineClamp3>Clamped to three lines. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</Text>
</Col>

Letter Spacing

Control letter spacing with trackingTighter, trackingTight, trackingNormal (default), trackingWide, trackingWider, trackingWidest.

Tighter letter spacing

Tight letter spacing

Normal letter spacing (default)

Wide letter spacing

Wider letter spacing

Widest letter spacing

react-icon
<Col>
<Text trackingTighter>Tighter letter spacing</Text>
<Text trackingTight>Tight letter spacing</Text>
<Text trackingNormal>Normal letter spacing (default)</Text>
<Text trackingWide>Wide letter spacing</Text>
<Text trackingWider>Wider letter spacing</Text>
<Text trackingWidest>Widest letter spacing</Text>
</Col>

Text in Context

Combining text properties for real-world use cases.

Product Title

Category • 4.5 ★ (128 reviews)

High-quality component library for building modern web applications with React and TypeScript.

$99.00

react-icon
<Col>
<Card>
<Text lg bold>Product Title</Text>
<Text secondary>Category • 4.5 ★ (128 reviews)</Text>
<Text>High-quality component library for building modern web applications with React and TypeScript.</Text>
<Text sm primary semibold>$99.00</Text>
</Card>
</Col>

Text Props

PropCategoryDefaultDescription
accent

Appearance

Accent color appearance (rose)

brand

Appearance

Brand color appearance (blue)

danger

Appearance

Danger color appearance (red)

info

Appearance

Info color appearance (cyan)

inherit

Appearance

Inherit appearance from parent — suppresses own data-appearance/data-variant, uses parent's CSS variables

link

Appearance

Link color appearance (blue, for hyperlinks)

primary

Appearance

Primary color appearance (gray)

secondary

Appearance

Secondary color appearance (gray)

success

Appearance

Success color appearance (green)

tertiary

Appearance

Tertiary color appearance

warning

Appearance

Warning color appearance (amber)

heading

Font Family

Heading font family (defaults to sans, independently customizable via --font-heading CSS variable)

mono

Font Family

Monospace font family

sans

Font Family

Sans-serif font family (default)

serif

Font Family

Serif font family

italic

Font Style

Italic font style

notItalic

Font Style

Not italic (normal) font style

black

Font Weight

Black font weight (900)

bold

Font Weight

Bold font weight (700)

extrabold

Font Weight

Extra bold font weight (800)

extralight

Font Weight

Extra light font weight (200)

light

Font Weight

Light font weight (300)

medium

Font Weight

Medium font weight (500)

normal

Font Weight

Normal font weight (400)

semibold

Font Weight

Semibold font weight (600)

thin

Font Weight

Thin font weight (100)

inheritColor

Inherit Color

Inherit text color from parent via CSS variable cascade (suppresses data-appearance emission)

noInheritColor

Inherit Color

Keep own text color; do not inherit from parent

inheritSize

Inherit Size

Inherit font-size and line-height from the nearest parent typography element

noInheritSize

Inherit Size

Keep own font-size; do not inherit from parent

trackingNormal

Letter Spacing

Normal letter spacing (0)

trackingTight

Letter Spacing

Tight letter spacing (-0.025em)

trackingTighter

Letter Spacing

Tighter letter spacing (-0.05em)

trackingWide

Letter Spacing

Wide letter spacing (0.025em)

trackingWider

Letter Spacing

Wider letter spacing (0.05em)

trackingWidest

Letter Spacing

Widest letter spacing (0.1em)

lg

Size

Large size

md

Size

Medium size (default)

sm

Size

Small size

xl

Size

Extra large size

xs

Size

Extra small size

textCenter

Text Align

Align text to center

textJustify

Text Align

Justify text

textLeft

Text Align

Align text to left

textRight

Text Align

Align text to right

lineThrough

Text Decoration

Add strikethrough/line-through decoration across text

noUnderline

Text Decoration

Remove text decoration (no underline, strikethrough, etc.)

overline

Text Decoration

Add overline decoration above text

underline

Text Decoration

Add underline decoration below text

capitalize

Text Transform

Capitalize first letter of each word

lowercase

Text Transform

Transform text to lowercase

normalCase

Text Transform

Normal text case (no transformation)

uppercase

Text Transform

Transform text to uppercase

lineClamp2

Truncate

Truncate at 2 lines with ellipsis

lineClamp3

Truncate

Truncate at 3 lines with ellipsis

lineClamp4

Truncate

Truncate at 4 lines with ellipsis

lineClamp5

Truncate

Truncate at 5 lines with ellipsis

noTruncate

Truncate

Remove truncation

truncate

Truncate

Single line truncation with ellipsis

filled

Variant

Filled variant - solid background with contrasting text color

ghost

Variant

Ghost variant - transparent background, no border, appearance-colored text, tinted hover background

outline

Variant

Outline variant - transparent background with border and colored text (default)

Layout & utility props (gap, padding, hide, items, justify, ...) — documented on Common Props
PropCategoryDefaultDescription
cursorDefault

Cursor

Default cursor - standard arrow

cursorMove

Cursor

Move cursor - indicates draggable element

cursorNone

Cursor

No cursor - hides the cursor

cursorNotAllowed

Cursor

Not-allowed cursor - indicates disabled state

cursorPointer

Cursor

Pointer cursor - indicates clickable element

cursorText

Cursor

Text cursor - indicates selectable text

cursorWait

Cursor

Wait cursor - indicates loading/processing

block

Display

Block display - takes full width, new line

contents

Display

Contents display - element's box is removed, children display as if parent didn't exist

flex

Display

Flex display - flexbox container

grid

Display

Grid display - CSS grid container

hidden

Display

Hidden display - element is not visible

inline

Display

Inline display - flows with text

inlineBlock

Display

Inline-block display - inline but with block properties

inlineFlex

Display

Inline-flex display - inline flexbox container

inlineGrid

Display

Inline-grid display - inline grid container

table

Display

Table display - behaves like table element

tableCell

Display

Table-cell display - behaves like td element

hAuto

Height

Set height to auto

hFit

Height

Set height to fit-content

hFull

Height

Set height to 100%

hScreen

Height

Set height to 100vh (viewport height), removes max-height constraint

desktopHide

Hide

Hide element on desktop devices and below (max-desktop: 80rem)

mobileHide

Hide

Hide element on mobile devices and below (max-mobile: 48rem)

tabletHide

Hide

Hide element on tablet devices and below (max-tablet: 64rem)

itemsBaseline

Items

Align items to baseline

itemsCenter

Items

Align items to center

itemsEnd

Items

Align items to end (bottom/right)

itemsStart

Items

Align items to start (top/left)

itemsStretch

Items

Stretch items to fill container

justifyAround

Justify

Distribute items with space around them

justifyBaseline

Justify

Align items along their baseline on main axis

justifyBetween

Justify

Distribute items with space between them

justifyCenter

Justify

Center items along the main axis

justifyEnd

Justify

Pack items toward the end of the main axis

justifyEvenly

Justify

Distribute items with equal space around them

justifyStart

Justify

Pack items toward the start of the main axis

justifyStretch

Justify

Stretch items to fill the main axis

overflowAuto

Overflow

Auto overflow - show scrollbars if needed

overflowClip

Overflow

Clip overflow - hard clip without scrollbars

overflowHidden

Overflow

Hidden overflow - clip content without scrollbars

overflowScroll

Overflow

Scroll overflow - always show scrollbars

overflowVisible

Overflow

Visible overflow - content extends beyond bounds

overflowXAuto

Overflow

Auto overflow on X-axis only

overflowXClip

Overflow

Clip overflow on X-axis only

overflowXHidden

Overflow

Hidden overflow on X-axis only

overflowXScroll

Overflow

Scroll overflow on X-axis only

overflowXVisible

Overflow

Visible overflow on X-axis only

overflowYAuto

Overflow

Auto overflow on Y-axis only

overflowYClip

Overflow

Clip overflow on Y-axis only

overflowYHidden

Overflow

Hidden overflow on Y-axis only

overflowYScroll

Overflow

Scroll overflow on Y-axis only

overflowYVisible

Overflow

Visible overflow on Y-axis only

absolute

Position

Absolute positioning

fixed

Position

Fixed positioning

relative

Position

Relative positioning

static

Position

Static positioning

sticky

Position

Sticky positioning

responsive

Responsive

Enable responsive sizing - uses breakpoint-specific classes for font size, padding, and gap

wAuto

Width

Set width to auto

wFit

Width

Set width to fit-content

wFull

Width

Set width to 100%

wScreen

Width

Set width to 100vw (viewport width), removes max-width constraint