---
title: Text
description: "`Text` is a component that represents a paragraph of text. By default, it renders a `p` element."
links:
- style: https://github.com/yamada-ui/yamada-ui/tree/main/packages/react/src/components/text/text.style.ts
- source: https://github.com/yamada-ui/yamada-ui/tree/main/packages/react/src/components/text
- storybook: https://yamada-ui.github.io/yamada-ui?path=/story/components-text--basic
---
# Text
`Text` is a component that represents a paragraph of text. By default, it renders a `p` element.
```tsx
私の戦闘力は530000です。ですがもちろんフルパワーであなたと戦う気はありませんからご心配なく……
```
## Usage
```tsx
import { Text } from "@yamada-ui/react"
```
```tsx
import { Text } from "@/components/ui"
```
```tsx
import { Text } from "@workspaces/ui"
```
```tsx
```
:::tip
If you need a hyperlink, use [Link](https://yamada-ui.com/docs/components/link.md).
:::
### Change Size
```tsx
{(fontSize) => (
私の戦闘力は530000です。ですがもちろんフルパワーであなたと戦う気はありませんからご心配なく……
)}
```
### Render a different element
By passing `as`, you can render it as a different element.
```tsx
{(as) => (
へっ!きたねぇ花火だ
)}
```
### Truncate Text
If you want to truncate text after a certain number of lines, specify the number of lines with `lineClamp`. If the text exceeds the specified number of lines, an ellipsis will be displayed.
```tsx
{(lineClamp) => (
『ドラゴンボール』(DRAGON
BALL)は、鳥山明による日本の漫画作品。『週刊少年ジャンプ』(集英社)にて1984年51号から1995年25号まで連載された。世界中に散らばった七つの球をすべて集めると、どんな願いも一つだけ叶えられるという秘宝・ドラゴンボールと、主人公・孫悟空(そん・ごくう)を中心に展開する、「冒険」「夢」「バトル」「友情」などを描いた長編漫画。
)}
```
### Add Gradient
```tsx
やるじゃねえかサタン!おめえはホントに世界の救世主かもな!
```
## Props
| Prop | Default | Type | Description |
| ------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------ |
| `as` | - | `As` | The HTML element to render. |
| `asChild` | - | `boolean` | Merges its props onto its immediate child. |
| `css` | - | `CSSObject \| CSSObject[]` | The CSS object. |
| `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. |
| `align` | - | `"-khtml-center" \| "-khtml-left" \| "-khtml-right" \| "-moz-center" \| "-moz-initial" \| "-moz-left" \| "-moz-right" \| "-webkit-center" \| "-webkit-left" \| "-webkit-match-parent" ...` | The CSS `text-align` property. |
| `casing` | - | `"-moz-initial" \| "capitalize" \| "full-size-kana" \| "full-width" \| "inherit" \| "initial" \| "lowercase" \| "math-auto" \| "none" \| "revert-layer" ...` | The CSS `text-transform` property. |
| `decoration` | - | `"-moz-initial" \| "AccentColor" \| "AccentColorText" \| "ActiveBorder" \| "ActiveCaption" \| "ActiveText" \| "aliceblue" \| "antiquewhite" \| "AppWorkspace" \| "aqua" ...` | The CSS `text-decoration` property. |
## Similar Components
- [Blockquote](https://yamada-ui.com/docs/components/blockquote.md): `Blockquote` is a component that represents a quotation. By default, it renders a `blockquote` element.
- [Code](https://yamada-ui.com/docs/components/code.md): `Code` is a component that represents a code block. By default, it renders a `code` element.
- [Em](https://yamada-ui.com/docs/components/em.md): `Em` is a component that represents emphasized text. By default, it renders a `em` element.
- [Heading](https://yamada-ui.com/docs/components/heading.md): `Heading` is a component that represents section headings. By default, it renders an `h1` element.
- [Highlight](https://yamada-ui.com/docs/components/highlight.md): `Highlight` is a component that highlights specified strings within text. By default, it renders a `p` element.
- [Kbd](https://yamada-ui.com/docs/components/kbd.md): `Kbd` is a component that represents keyboard input.
- [Mark](https://yamada-ui.com/docs/components/mark.md): `Mark` is a component that emphasizes a specific part of the text.
- [Prose](https://yamada-ui.com/docs/components/prose.md): `Prose` is a component that styles HTML content.
## Used By Components & Hooks
- [Highlight](https://yamada-ui.com/docs/components/highlight.md): `Highlight` is a component that highlights specified strings within text. By default, it renders a `p` element.
- [Loading](https://yamada-ui.com/docs/components/loading.md): `Loading` is a component displayed during waiting times, such as when data is being loaded.