LinkButton

PreviousNext

Displays a link styled as a button or a component that looks like a link button.

Component link-button-demo not found in registry.

Installation

pnpm dlx shadcn@latest add link-button

Usage

import * as LinkButton from "@/components/ui/link-button"
<LinkButton.Root variant="primary">Link Button</LinkButton.Root>

Examples

Primary Variant

Component link-button-primary not found in registry.

Secondary Variant

Component link-button-secondary not found in registry.

Error Variant

Component link-button-error not found in registry.

Sizes

Component link-button-sizes not found in registry.

With Icon

Component link-button-with-icon not found in registry.

Disabled

Component link-button-disabled not found in registry.

As Child

Component link-button-as-child not found in registry.

Props

LinkButton.Root

This component is based on the <button> element and supports all of its props.

Prop

Type

Default

variant
primary
secondary
error
primary
size
sm
md
lg
md
asChild
boolean
false
className
string
-
children
ReactNode
-

LinkButton.Icon

This component is a wrapper for icons inside the link button. It inherits the variant and size from the parent LinkButton.Root.

Prop

Type

Default

as
ElementType
div
className
string
-