Components

Text

Typography component with text style presets and semantic HTML support

Overview

A component for rendering text. Uses text style presets from @illog/themes to provide consistent typography.

Text Styles

Heading (24px)

Subheading (20px)

Body Base (16px)

Body Strong (16px)

Body Small (14px)

Caption (12px)

StyleSizeWeightLine HeightUse Case
title48pxbold1.2Page title
subtitle32pxsemiBold1.2Section heading
heading24pxsemiBold1.2Content heading
subheading20pxregular1.2Subheading
bodyBase16pxregular1.4Default body text
bodyStrong16pxsemiBold1.4Emphasized body text
bodySmall14pxregular1.4Small body text
bodySmallStrong14pxsemiBold1.4Small emphasized body text
caption12pxregular1.4Caption, label
captionStrong12pxsemiBold1.4Emphasized caption

Colors

Default

Secondary

Brand

Danger

Disabled

Props

PropTypeDefaultRequiredDescription
textStyle'title' | 'subtitle' | 'heading' | 'subheading' | 'bodyBase' | 'bodyStrong' | 'bodySmall' | 'bodySmallStrong' | 'caption' | 'captionStrong' | 'singleLineBodyBase' | 'singleLineCaption''bodyBase'NoType style (size, weight, line height)
asElementType'p'NoElement to render
colorTextColorToken-NoText color token. Use secondary for supporting text, not tertiary
alignCSSProperties['textAlign']-NoText alignment
truncate'true'-NoCuts a single line with an ellipsis
lineClamp'1' | '2' | '3'-NoCuts after this many lines with an ellipsis
childrenReactNode-NoContent

Usage

Page title

One line only: this long sentence is cut with an ellipsis at the end.

Two lines at most: this longer paragraph keeps going so that it needs more than two lines and gets cut.

Specification

base

상태요소속성값
enabledrootcolor$color.text.default.default

textStyle=title

상태요소속성값
enabledroottypography$text.title

textStyle=subtitle

상태요소속성값
enabledroottypography$text.subtitle

textStyle=heading

상태요소속성값
enabledroottypography$text.heading

textStyle=subheading

상태요소속성값
enabledroottypography$text.subheading

textStyle=bodyBase

상태요소속성값
enabledroottypography$text.bodyBase

textStyle=bodyStrong

상태요소속성값
enabledroottypography$text.bodyStrong

textStyle=bodySmall

상태요소속성값
enabledroottypography$text.bodySmall

textStyle=bodySmallStrong

상태요소속성값
enabledroottypography$text.bodySmallStrong

textStyle=caption

상태요소속성값
enabledroottypography$text.caption

textStyle=captionStrong

상태요소속성값
enabledroottypography$text.captionStrong

textStyle=singleLineBodyBase

상태요소속성값
enabledroottypography$text.singleLine.bodyBase

textStyle=singleLineCaption

상태요소속성값
enabledroottypography$text.singleLine.caption