Paragraph
段落テキストを表示するコンポーネント。
インストール
import { Paragraph } from "@ginga-ui/core";基本的な使い方
シンプルな段落の使用例です。
これは基本的な段落コンポーネントです。テキストコンテンツを表示するために使用します。
paragraph.tsx
paragraph.module.css
import { Paragraph } from "@ginga-ui/core";
import styles from "./paragraph.module.css";
export function BasicExample() {
return (
<Paragraph className={styles.basicParagraph}>
これは基本的な段落コンポーネントです。テキストコンテンツを表示するために使用します。
</Paragraph>
);
}複数の段落
複数の段落を表示します。
最初の段落です。Paragraphコンポーネントは、適切な行間とマージンで読みやすいテキストを表示します。
2つ目の段落です。複数の段落を使用して、情報を整理して表示できます。
3つ目の段落です。各段落は視覚的に分離され、読みやすい構造を作ります。
paragraph.tsx
paragraph.module.css
import { Paragraph } from "@ginga-ui/core";
import styles from "./paragraph.module.css";
export function MultipleExample() {
return (
<div className={styles.multipleParagraphs}>
<Paragraph>
最初の段落です。Paragraphコンポーネントは、適切な行間とマージンで読みやすいテキストを表示します。
</Paragraph>
<Paragraph>
2つ目の段落です。複数の段落を使用して、情報を整理して表示できます。
</Paragraph>
<Paragraph>
3つ目の段落です。各段落は視覚的に分離され、読みやすい構造を作ります。
</Paragraph>
</div>
);
}長文
長い文章を含む段落の例です。
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. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
paragraph.tsx
paragraph.module.css
import { Paragraph } from "@ginga-ui/core";
import styles from "./paragraph.module.css";
export function LongTextExample() {
return (
<Paragraph className={styles.longParagraph}>
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. Duis aute irure dolor in reprehenderit in voluptate
velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id
est laborum.
</Paragraph>
);
}Props
Paragraph
| 名前 | 型 | 既定値 | 説明 |
|---|---|---|---|
render | (props) => ReactElement | - | ルート要素を差し替える関数。受け取った props を渡した要素(next/link など)を返します。 |
上記に加えて、HTML の p(新しいタブで開く) 要素の属性を受け取ります。