Skip to content

Create reusable Button component with variants (primary, secondary, loading) #3

Description

@Akshola00

Description

Build a flexible, reusable Button component that can be used throughout the application with different visual variants.

Create a Button component in src/components/ that supports primary, secondary, and loading states.

Relevant files:

  • frontend/src/components/Button.tsx (new)

Acceptance Criteria

  • Button component supports primary and secondary variants
  • Button component supports loading state that disables interaction and shows spinner
  • Button component accepts standard HTML button attributes (disabled, type, onClick, etc.)
  • Component is TypeScript-typed and exports proper props interface
  • Component includes basic Tailwind CSS styling
  • Storybook or demo page shows all button variants
  • Frontend code builds successfully
  • Frontend code is properly formatted and passes linting

Dependencies

None

Additional Notes

  • Use Tailwind CSS for styling (already in the project)
  • Consider accessibility: proper focus states, keyboard support
  • Make it easily extendable for future variants (e.g., danger, success)

Metadata

Metadata

Assignees

No one assigned

    Labels

    GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaigncomponentsComponent developmententry-levelEntry-level difficultyfrontendFrontend (Next.js/TypeScript)

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions