---
title: Text
description: "`Text`は、テキストの段落を表すコンポーネントです。デフォルトでは、`p`要素をレンダリングします。"
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
---
```tsx
私の戦闘力は530000です。ですがもちろんフルパワーであなたと戦う気はありませんからご心配なく……
```
## 使い方
```tsx
import { Text } from "@yamada-ui/react"
```
```tsx
import { Text } from "@/components/ui"
```
```tsx
import { Text } from "@workspaces/ui"
```
```tsx
```
### サイズを変更する
```tsx
{(fontSize) => (
私の戦闘力は530000です。ですがもちろんフルパワーであなたと戦う気はありませんからご心配なく……
)}
```
### 異なる要素としてレンダリングする
`as`を渡すことで、異なる要素としてレンダリングすることができます。
```tsx
{(as) => (
へっ!きたねぇ花火だ
)}
```
### テキストを切り詰める
特定の行数以降のテキストを切り詰めたい場合は、`lineClamp`に行数を指定します。指定した行数を超えた場合は、省略記号が表示されます。
```tsx
{(lineClamp) => (
『ドラゴンボール』(DRAGON
BALL)は、鳥山明による日本の漫画作品。『週刊少年ジャンプ』(集英社)にて1984年51号から1995年25号まで連載された。世界中に散らばった七つの球をすべて集めると、どんな願いも一つだけ叶えられるという秘宝・ドラゴンボールと、主人公・孫悟空(そん・ごくう)を中心に展開する、「冒険」「夢」「バトル」「友情」などを描いた長編漫画。
)}
```
### グラデーションを追加する
```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` | - | `"-moz-initial" \| "-webkit-match-parent" \| "center" \| "end" \| "inherit" \| "initial" \| "justify" \| "left" \| "match-parent" \| "revert-layer" ...` | The CSS `text-align` property. |
| `casing` | - | `"-moz-initial" \| "capitalize" \| "full-size-kana" \| "full-width" \| "inherit" \| "initial" \| "lowercase" \| "none" \| "revert-layer" \| "revert" ...` | The CSS `text-transform` property. |
| `decoration` | - | `"-moz-initial" \| "ActiveBorder" \| "ActiveCaption" \| "aliceblue" \| "antiquewhite" \| "AppWorkspace" \| "aqua" \| "aquamarine" \| "auto" \| "azure" ...` | The CSS `text-decoration` property. |