Docs
Storybook Docs

标题

Watch a video tutorial

Title 块作为文档条目的主要标题。它通常用于提供组件或页面名称。

¥The Title block serves as the primary heading for your docs entry. It is typically used to provide the component or page name.

Screenshot of Title block

{/* ButtonDocs.mdx */}
 
import { Title } from '@storybook/blocks';
 
<Title>This is the title</Title>

标题

¥Title

import { Title } from '@storybook/blocks';

Title 配置了以下属性:

¥Title is configured with the following props:

children

类型:JSX.Element | string

¥Type: JSX.Element | string

提供内容。回退到 attached CSF 文件中 title 的值(或从 autotitle 派生的值),修剪到最后一段。例如,如果标题值为 'path/to/components/Button',则默认内容为 'Button'

¥Provides the content. Falls back to value of title in an attached CSF file (or value derived from autotitle), trimmed to the last segment. For example, if the title value is 'path/to/components/Button', the default content is 'Button'.

of

类型:CSF 文件导出

¥Type: CSF file exports

指定显示哪个元的标题。

¥Specifies which meta's title is displayed.