check
Code copied to clipboard.
close
menu

Text

The Text component, like the paragraph and heading, is an inscrutible relic that should never have been attempted. Just use an actual text element.

Example Instance

<Text fontClass="display1" tag="footer" color="primary">
  Hello World
</Text>
content_copy
warning
Note: The above snippet omits import statements and surrounding markup. It's assumed you'd be pasting this inside the return block of an existing functional component.

Installation

Next.js

Note: Other React frameworks are not currently supported, but they might still work. Try at your own risk.

Method Instructions
LiftKit CLI
From any Next.js project, run the following command in your terminal.
npm run add text
content_copy
Github open_in_new View on Github

Props

Unique

Props unique to this component.

Name Required Type Description Default Val
className no string Optional CSS class name (controlled rendering order) undefined
color no LkColor Color of the text element undefined
content no string Text content to render inside the element undefined
fontClass no LkFontClass Font style class to apply undefined
tag no LkSemanticTag Semantic tag to render (e.g. h1, p, div, etc.) undefined

Common

Props with globally-defined behavior that are used in multiple components.

Common PropsStatus
{children}Supported
Native HTML attributesSupported