代码

Code 组件用于显示内联代码。


安装

上述命令仅用于单独安装。如果 @heroui/react 已全局安装,则可以跳过此步骤。

导入

用法

尺寸

颜色

API

Code 组件属性

属性类型默认值
children
ReactNode
size
sm | md | lg
"sm"
color
default | primary | secondary | success | warning | danger
"default"
radius
none | sm | md | lg | full
"sm"