Oddmash UI
所有组件

文章正文

无需选择解析器即可为已渲染的 Markdown 设置样式。

用法

使用 Prose 或 om-prose 包裹可信的已渲染文章。在宽表外使用 ProseScroll。Markdown 渲染器由使用方选择。

无障碍

保留原生标题、列表、表格和链接。设置文档语言,并为可聚焦的滚动区域命名。代码保留空白。

属性类型默认值
childrenReactNodeNone
langstringInherited
classNamestringNone
<Prose>
  <h3>Usage guide</h3>
  <p>Learn how to use the library.</p>
  <ul><li>Install the package.</li></ul>
  <pre tabIndex={0} role="region" aria-label="Terminal code"><code>pnpm add @oddmash/ui</code></pre>
  <ProseScroll tabIndex={0} role="region" aria-label="Example options table">
    <table>
      <thead><tr><th scope="col">Name</th><th scope="col">Type</th></tr></thead>
      <tbody><tr><td>href</td><td>string</td></tr></tbody>
    </table>
  </ProseScroll>
</Prose>

交互式文档