--- title: Button Link description: 用按钮样式呈现链接操作的内容组件。 icon: lucide:external-link badges: - value: Docus to: https://docus.dev/api/components#buttonlink target: _blank - value: Source icon: lucide:code to: https://github.com/ZTL-UwU/shadcn-docs-nuxt/blob/main/components/content/ButtonLink.vue target: _blank - value: 0.6.5 --- ## Usage ::stack ::div{class="p-3 flex gap-4"} ::button-link{right-icon="lucide:arrow-up-right" color="secondary" to="/docs/简单文档" target="_blank"} Get Started :: ::button-link{left-icon="lucide:github" variant="outline" to="https://github.com/ZTL-UwU/shadcn-docs-nuxt" target="_blank"} GitHub :: ::button-link{left-icon="lucide:ghost" variant="ghost" href="https://github.com/ZTL-UwU/shadcn-docs-nuxt" blank} Ghost :: :: ```mdc ::button-link{right-icon="lucide:arrow-up-right" color="secondary" to="/docs/简单文档" target="_blank"} Get Started :: ::button-link{left-icon="lucide:github" variant="outline" to="https://github.com/ZTL-UwU/shadcn-docs-nuxt" target="_blank"} GitHub :: ::button-link{left-icon="lucide:ghost" variant="ghost" href="https://github.com/ZTL-UwU/shadcn-docs-nuxt" blank} Ghost :: ``` :: ## Props ::field-group :field{name="variant" type="'solid' | 'outline' | 'ghost' | 'link' | 'soft'" default-value="'solid'"} :field{name="size" type="'xs' | 'sm' | 'md' | 'lg' | 'xl'" default-value="'md'"} :field{name="color" type="'primary' | 'secondary' | 'neutral' | 'success' | 'info' | 'warning' | 'error'" default-value="'primary'"} :field{name="leftIcon" type="string"}[Icon on the left] :field{name="rightIcon" type="string"}[Icon on the right] :field{name="to" type="string"}[Link URL] :field{name="href" type="string"}[Alias to `to`] :field{name="target" type="Target"}[A `target` attribute value to apply on the link] :field{name="blank" type="boolean"}[Alias to `target='_blank'`] ::