跳到正文

ButterIX v1 已发布:多版本、多语言、Ask AI 与站点 MCP 服务器全部内置。 →

打开控制台

按钮

<Button> 与 <ButtonGroup> 链接按钮或纯展示按钮。

链接按钮(设置 href)或纯展示按钮:

<ButtonGroup>
  <Button intent="primary" href="/guides/get-started/quickstart" rightIcon="lucide:arrow-right">快速开始</Button>
  <Button outlined href="/api-reference" icon="lucide:code">API 参考</Button>
  <Button minimal href="https://github.com" >GitHub</Button>
</ButtonGroup>

更多样式:

<Button intent="success" small>成功</Button>
<Button intent="warning" rounded>警告</Button>
<Button intent="danger" outlined>危险</Button>
<Button mono>biti deploy</Button>
<Button disabled>不可用</Button>
intentnone | primary | success | warning | danger
颜色。不设置时为中性色。
hrefurl
设置后渲染为链接按钮。
targetstring
链接目标,外部链接默认 _blank。
textstring
按钮文字(也可以写在子内容中)。
icon / rightIconicon
左侧 / 右侧图标。
outlinedboolean默认值 false
描边样式。
minimalboolean默认值 false
透明背景。
small / largeboolean默认值 false
尺寸。
roundedboolean默认值 false
完全圆角。
monoboolean默认值 false
等宽字体。
fullboolean默认值 false
占满整行。
activeboolean默认值 false
按下态。
disabledboolean默认值 false
禁用。

<ButtonGroup> 把多个按钮排成一行,空间不足时换行。