--- title: Button description: Displays a button or a component that looks like a button. featured: true component: true --- ## Installation CLI Manual ```bash npx shadcn@latest add button ``` Install the following dependencies: ```bash npm install @radix-ui/react-slot ``` Copy and paste the following code into your project. Update the import paths to match your project setup. ## Usage ```tsx import { Button } from "@/components/ui/button" ``` ```tsx ``` ## Link You can use the `asChild` prop to make another component look like a button. Here's an example of a link that looks like a button. ```tsx showLineNumbers import { Link } from "next/link" import { Button } from "@/components/ui/button" export function LinkAsButton() { return ( ) } ``` ## Examples ### Default ### Secondary ### Destructive ### Outline ### Ghost ### Link ### Icon ### With Icon ### Loading