Skip to content

Integrate shadcn-style CVA button component as hero page CTA - #6

Draft
Nebulazer123 with Copilot wants to merge 2 commits into
mainfrom
copilot/integrate-react-component
Draft

Integrate shadcn-style CVA button component as hero page CTA#6
Nebulazer123 with Copilot wants to merge 2 commits into
mainfrom
copilot/integrate-react-component

Conversation

Copilot AI commented Mar 7, 2026

Copy link
Copy Markdown

Adds a full-featured button-1.tsx component built on class-variance-authority and Radix UI Slot, and wires it up as the primary "Get Started" CTA on the hero page.

New dependencies

  • class-variance-authority — variant management via cva()
  • radix-uiSlot primitive enabling asChild polymorphic rendering
  • tw-animate-css — animation utilities imported into global styles

Component (src/components/ui/button-1.tsx)

Full CVA-based button with:

  • Variants: primary, mono, destructive, secondary, outline, dashed, ghost, dim, foreground, inverse
  • Modes: default, icon, link, input
  • Sizes: sm, md, lg, icon with optional autoHeight
  • Shapes: default, circle
  • ButtonArrow companion component accepting any Lucide icon
  • asChild support via Radix Slot for polymorphic rendering

CSS (src/app/globals.css)

@import "tw-animate-css";

@theme inline {
  --color-destructive-foreground: var(--destructive-foreground);
}

:root { --destructive-foreground: oklch(1 0 0); }
.dark { --destructive-foreground: oklch(1 0 0); }

Hero page (src/app/page.tsx)

Replaced the previous Button (from Button.tsx) with HeroButton (from button-1.tsx) for the primary CTA, renamed to "Get Started". The secondary "Upload Statement" button retains the existing component.

import { Button as HeroButton } from "@/components/ui/button-1";

<HeroButton size="lg" className="gap-2 pl-6 pr-5 bg-white text-black hover:bg-zinc-200 rounded-full" onClick={handleDemo}>
  <PlayCircle className="h-4 w-4" />
  Get Started
</HeroButton>

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • fonts.googleapis.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/MoneyMap/MoneyMap/moneymap-v2/node_modules/.bin/next build src/components/dashboard/MinigameModal.tsx (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

You are given a task to integrate an existing React component in the codebase for the get started hero page button

The codebase should support:

  • shadcn project structure
  • Tailwind CSS
  • Typescript

If it doesn't, provide instructions on how to setup project via shadcn CLI, install Tailwind or Typescript.

Determine the default path for components and styles.
If default path for components is not /components/ui, provide instructions on why it's important to create this folder
Copy-paste this component to /components/ui folder:

button-1.tsx
import * as React from 'react';
import { cva, type VariantProps } from 'class-variance-authority';
import { ChevronDown, LucideIcon } from 'lucide-react';
import { Slot as SlotPrimitive } from 'radix-ui';
import { cn } from '@/lib/utils';

const buttonVariants = cva(
  'cursor-pointer group whitespace-nowrap focus-visible:outline-hidden inline-flex items-center justify-center has-data-[arrow=true]:justify-between whitespace-nowrap text-sm font-medium ring-offset-background transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-60 [&_svg]:shrink-0',
  {
    variants: {
      variant: {
        primary: 'bg-primary text-primary-foreground hover:bg-primary/90 data-[state=open]:bg-primary/90',
        mono: 'bg-zinc-950 text-white dark:bg-zinc-300 dark:text-black hover:bg-zinc-950/90 dark:hover:bg-zinc-300/90 data-[state=open]:bg-zinc-950/90 dark:data-[state=open]:bg-zinc-300/90',
        destructive:
          'bg-destructive text-destructive-foreground hover:bg-destructive/90 data-[state=open]:bg-destructive/90',
        secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/90 data-[state=open]:bg-secondary/90',
        outline: 'bg-background text-accent-foreground border border-input hover:bg-accent data-[state=open]:bg-accent',
        dashed:
          'text-accent-foreground border border-input border-dashed bg-background hover:bg-accent hover:text-accent-foreground data-[state=open]:text-accent-foreground',
        ghost:
          'text-accent-foreground hover:bg-accent hover:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground',
        dim: 'text-muted-foreground hover:text-foreground data-[state=open]:text-foreground',
        foreground: '',
        inverse: '',
      },
      appearance: {
        default: '',
        ghost: '',
      },
      underline: {
        solid: '',
        dashed: '',
      },
      underlined: {
        solid: '',
        dashed: '',
      },
      size: {
        lg: 'h-10 rounded-md px-4 text-sm gap-1.5 [&_svg:not([class*=size-])]:size-4',
        md: 'h-8.5 rounded-md px-3 gap-1.5 text-[0.8125rem] leading-(--text-sm--line-height) [&_svg:not([class*=size-])]:size-4',
        sm: 'h-7 rounded-md px-2.5 gap-1.25 text-xs [&_svg:not([class*=size-])]:size-3.5',
        icon: 'size-8.5 rounded-md [&_svg:not([class*=size-])]:size-4 shrink-0',
      },
      autoHeight: {
        true: '',
        false: '',
      },
      shape: {
        default: '',
        circle: 'rounded-full',
      },
      mode: {
        default: 'focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2',
        icon: 'focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2',
        link: 'text-primary h-auto p-0 bg-transparent rounded-none hover:bg-transparent data-[state=open]:bg-transparent',
        input: `
            justify-start font-normal hover:bg-background [&_svg]:transition-colors [&_svg]:hover:text-foreground data-[state=open]:bg-background 
            focus-visible:border-ring focus-visible:outline-hidden focus-visible:ring-[3px] focus-visible:ring-ring/30 
            [[data-state=open]>&]:border-ring [[data-state=open]>&]:outline-hidden [[data-state=open]>&]:ring-[3px] 
            [[data-state=open]>&]:ring-ring/30 
            aria-invalid:border-destructive/60 aria-invalid:ring-destructive/10 dark:aria-invalid:border-destructive dark:aria-invalid:ring-destructive/20
            in-data-[invalid=true]:border-destructive/60 in-data-[invalid=true]:ring-destructive/10  dark:in-data-[invalid=true]:border-destructive dark:in-data-[invalid=true]:ring-destructive/20
          `,
      },
      placeholder: {
        true: 'text-muted-foreground',
        false: '',
      },
    },
    compoundVariants: [
      // Icons opacity for default mode
      {
        variant: 'ghost',
        mode: 'default',
        className: '[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60',
      },
      {
        variant: 'outline',
        mode: 'default',
        className: '[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60',
      },
      {
        variant: 'dashed',
        mode: 'default',
        className: '[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60',
      },
      {
        variant: 'secondary',
        mode: 'default',
        className: '[&_...

</details>



<!-- START COPILOT CODING AGENT TIPS -->
---

 Let Copilot coding agent [set things up for you](https://github.com/Nebulazer123/MoneyMap/issues/new?title=+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo.

@vercel

vercel Bot commented Mar 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
money-map Error Error Mar 7, 2026 4:56am

Co-authored-by: Nebulazer123 <17994269+Nebulazer123@users.noreply.github.com>
Copilot AI changed the title [WIP] Integrate React component for get started hero page button Integrate shadcn-style CVA button component as hero page CTA Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants