PU-Checkbox Component

A customizable checkbox component with multiple states and interactive features

Usage

Basic Usage

Sample Label
Strike Example
Normal
Outlined
PropTypeRequiredDefaultDescription
modelValuebooleanYes-Current state (v-model support)
disabledbooleanNofalseDisables interaction
labelstringNo''Checkbox label text
flavornormal | outlinedNonormalVisual style variant
strikeOnFalsebooleanNofalseAdds strikethrough to label when unchecked
EventDescriptionPayload
update:modelValueEmits when state changesboolean
checkedEmits when checked-
uncheckedEmits when state unchecked-
  • Base styling with Tailwind:
    .pu-checkbox {
      @apply flex items-center justify-center w-5 h-5 
            border-2 border-primary-light-500 rounded 
            transition-all;
    }
    
  • Interactive states:
    .active\:animate-bounce:active {
      animation: bounce 0.3s ease-in-out;
    }
    
    @keyframes bounce {
      0%, 100% { transform: scale(1); }
      50% { transform: scale(1.2); }
    }
    
  • Clickable label area
  • Visual feedback on interaction
  • Clear disabled state styling
  • Keyboard focusable
  • PUIcon component for checkmark display
  • Tailwind CSS for styling
  • Vue 3 Composition API