Custom Components
Button Displays a button or a component that looks like a button.
Preview Code
< div >
< Button >Click me</ Button >
</ div >
You can use buttonVariants to create a link that looks like a button.
import { buttonVariants } from "@/components/loomui/button" ;
< Link href = "/login" className = { buttonVariants ({ variant: "secondary" })}>
Sign in
</ Link >
You can also use the asChild prop to render a child component as a button.
< Button asChild >
< Link href = "/login" >Sign in</ Link >
</ Button >
You can use the variant prop to change the appearance of the button. Below is a list of all the variants available. You can create your own variants too!!
Preview Code
< div >
< Button >Click me</ Button >
</ div >
Preview Code
< div >
< Button variant = "secondary" >Click me</ Button >
</ div >
Preview Code
< div >
< Button variant = "destructive" >Click me</ Button >
</ div >
Preview Code
< div >
< Button variant = "outline" >Click me</ Button >
</ div >
Preview Code
< div >
< Button variant = "ghost" >Click me</ Button >
</ div >
Preview Code
< div >
< Button variant = "link" >Click me</ Button >
</ div >