PU-Button Component

A customizable button component with multiple variants, icons, and interactive states.

Usage

Basic Usage

All Variants

PropTypeRequiredDefaultDescription
disabledbooleanNofalseDisables interactive state
flavornormal | outlined | ghostNonormalVisual style variant
shaperounded | circleNoroundedBorder radius style
sizesmall | medium | largeNomediumButton dimensions
customClassstringNo''Additional CSS classes
iconLeftstringNoundefinedLeft icon name
iconRightstringNoundefinedRight icon name
VariantClassesDescription
normal`pu-button--normal`Solid background with white text (Default)
outlined`pu-button--outlined`Transparent background with border
ghost`pu-button--ghost`Minimal style with no background/border
SizeClassesDescription
small`pu-button--small`Compact padding: px-2 py-1
medium`pu-button--medium`Standard padding: px-4 py-2 (Default)
large`pu-button--large`Large padding: px-6 py-3
ShapeClassesDescription
rounded`pu-button--rounded`Standard border radius (Default)
circle`pu-button--circle`Fully rounded edges
  • Uses font-patrick font family class
  • Base styles applied with utility-first CSS:
    .pu-button {
      @apply py-2 shadow-md transition duration-200 ease-in-out flex justify-center gap-1;
    }
    .pu-button:not(:disabled):hover {
      @apply shadow-primary-light-500/50 font-bold;
    }
    
  • Icon colors adapt automatically to flavor
  • State management for disabled/hover states
  • Customizable through CSS classes or style overrides
  • Requires PUIcon component for icon support
  • Built with Tailwind CSS utility classes