Source: packages/shared/components/ui/button.tsx
Primitives: @radix-ui/react-slot, class-variance-authority
import { Button } from " @prosper/shared/components/ui/button " ;
Preview
Primary Secondary Tertiary Destructive Ghost Link
Variants
Variant Class Description Usage primaryBlue background, white text, subtle border Default CTA — forms, dialogs secondaryGray background, dark text Lower-emphasis actions tertiaryWhite background, dark text, gray border Outline-style buttons (e.g. “Save as Draft”) destructiveRed background, white text Delete, cancel ghostTransparent, hover reveals accent bg Toolbar icons, inline actions linkNo background, underline on hover Inline text links
Code
< Button variant = " primary " > Publish Job </ Button >
< Button variant = " secondary " > Cancel </ Button >
< Button variant = " tertiary " > Save as Draft </ Button >
< Button variant = " destructive " > Delete </ Button >
< Button variant = " ghost " > Menu Item </ Button >
< Button variant = " link " > Learn more </ Button >
Sizes
Size Class Height defaulth-10 px-4 py-240px smh-7 px-2.528px lgh-12 px-648px iconsize-1040×40px
< Button size = " sm " > Small </ Button >
< Button size = " default " > Default </ Button >
< Button size = " lg " > Large </ Button >
< Button size = " icon " >< PlusIcon /></ Button >
Props
Prop Type Default Description variant"primary" | "secondary" | "tertiary" | "destructive" | "ghost" | "link""primary"Visual style size"default" | "sm" | "lg" | "icon""default"Button size asChildbooleanfalseRender as child element (e.g. wrapping a <Link>) via Radix Slot disabledbooleanfalseDisables interaction, reduces opacity classNamestring— Additional Tailwind classes
Plus all standard <button> HTML attributes.
Usage in the Codebase
Admin — LoginPage
< Button type = " submit " className = " w-full " disabled = { isLoading } >
< Loader2 className = " w-4 h-4 mr-2 animate-spin " />
< Button type = " button " variant = " tertiary " onClick = { handleSaveAsDraft } >
< Save className = " w-4 h-4 mr-2 " />
< FileText className = " w-4 h-4 mr-2 " />
Landing — ContactPage
< Button type = " submit " disabled = { isSubmitting } className = " w-full sm:w-auto px-8 " >
{ isSubmitting ? " Submitting... " : " Submit " }
Notes
The buttonVariants function is also exported for use with non-button elements (e.g. styled links).
Icons placed inside buttons are automatically sized to 16px via the [&_svg:not([class*='size-'])]:size-4 utility.
Override in Admin LoginPage: className="w-full" stretches the button to full width inside the login card.
Override in Admin ApplicantList: variant="ghost" className="mb-4" adds bottom margin for the back-navigation button.
Override in Landing ContactPage: className="w-full sm:w-auto px-8" makes the submit button full-width on mobile and auto-width with extra horizontal padding on larger screens.