Button link
A link that looks exactly like a button, for actions that go somewhere.
npx shadcn@latest add @silicon-ui/button-linkInstallation
With the shadcn CLI
npx shadcn@latest add @silicon-ui/button-linkManually
Copy these files into your project. Shared files are skipped if you already have them.
components/silicon-ui/button-link/button-link.tsxcomponents/silicon-ui/button-link/button-link.module.css
Install the foundation once per app for the design and motion tokens:
npx shadcn@latest add @silicon-ui/silicon-foundation
Usage
Source codetsx
API reference
| Prop | Type | Default |
|---|---|---|
href* | string | — |
children* | ReactNode | — |
variant | ButtonVariant
| "primary" |
size | ButtonSize
| "md" |
asThe element to render instead of <a>, such as next/link. | ComponentType<AnchorHTMLAttributes<HTMLAnchorElement> & { href: string }> | — |
Also accepts the props of AnchorHTMLAttributes<HTMLAnchorElement>.
Dependencies
- npm
- None
- Registry
- button