PU-Input Component

A customizable input component with icon support and enhanced interaction features

Usage

Basic Usage

PropTypeRequiredDefaultDescription
modelValuestring | number | nullYes-Input value (v-model support)
disabledbooleanNofalseDisables the input field
placeholderstringNo''Input placeholder text
idstringNoundefinedUnique identifier for the input
iconLeftstringNoundefinedLeft icon name
iconRightstringNoundefinedRight icon name
EventDescriptionPayload
update:modelValueEmits on input change, blur or Enter keystring | number | null
blurTriggers on field blurEvent
keydown.enterTriggers on Enter key pressKeyboardEvent
  • Uses font-patrick font family
  • Base styles applied with Tailwind utilities:
    .pu-input {
      @apply relative flex items-center gap-2 w-full p-2;
      @apply border-2 border-primary-light-500 rounded-lg;
      @apply transition-all duration-150 ease-in-out;
    }
    
    .pu-input--default {
      @apply text-gray-800 text-base w-full;
      @apply focus:outline-none;
    }
    
  • Focus state increases border width:
  .pu-input:focus {
    @apply border-8;
  }

Custom placeholder styling:

  .pu-input::placeholder {
    @apply text-primary-light-300 text-sm;
  }
  • Requires PUIcon component for icon display
  • Built with Tailwind CSS utility classes