# 链接按钮

编辑 Starlight MDX 文档中的链接按钮、目标地址、变体与图标。

import ContentEditor from '@/components/editor/ContentEditor.astro';

使用 Prosefly 的 MDX 组件编辑器编辑 Starlight 链接按钮，同时保留 MDX 中的目标地址和支持的属性。

## 支持的配置

同一个编辑器支持 [Astro](/zh-cn/frameworks/astro/)、[Starlight](/zh-cn/frameworks/starlight/)、[Fumadocs](/zh-cn/frameworks/fumadocs/) 和 [Prosefly](/zh-cn/frameworks/lotus/) 配置。选择与你的网站匹配的配置，即可查看该集成支持的组件语法和编辑控件。

## 可视化编辑

选中按钮后打开控件，在组件中修改按钮文字，通过属性面板修改目标地址、样式和受支持的图标位置。图标选择器可以更换图标。修改链接时，不会离开当前文档。

<ContentEditor content="link-button" />

## 源码示例

```mdx
import { LinkButton } from '@astrojs/starlight/components';

## 继续阅读指南

<LinkButton
  href="/docs/zh-cn/getting-started/"
  variant="primary"
  icon="right-arrow"
  iconPlacement="end"
>
  开始使用
</LinkButton>
```

## 支持范围

链接按钮是 Starlight 配置中的专用功能，支持的样式包括 `primary`、`secondary` 和 `minimal`。Prosefly 和 Fumadocs 配置没有这个组件的专用编辑界面。

不需要强调入口时，可以使用普通 Markdown 链接。自定义按钮组件仍可在源码模式中编辑。发布前，请通过网站预览检查目标地址和显示效果。

## 相关 MDX 指南

继续阅读：[卡片](/docs/zh-cn/editor/components/card/) · [徽标](/docs/zh-cn/editor/components/badge/) · [图标](/docs/zh-cn/editor/components/icon/).
