🎉Paper UI v2.0 is here!
See what's new

PUSearch Component

A hand-drawn style search component with suggestions, loading states, and smooth animations

Usage

Basic Usage

With Suggestions

Loading State

Different Sizes

Disabled State

Props

PropTypeRequiredDefaultDescription
modelValuestringNo''Search input value
placeholderstringNoSearch...Input placeholder text
suggestionsSearchSuggestion[]No[]Array of search suggestions
loadingbooleanNofalseLoading state
disabledbooleanNofalseDisabled state
sizesmall | medium | largeNomediumSearch input size
showClearbooleanNotrueShow clear button
customClassstringNo''Custom CSS classes

Events

EventPayloadDescription
update:modelValuestringEmitted when input value changes
searchstringEmitted when Enter is pressed
suggestion-selectSearchSuggestionEmitted when suggestion is selected
clear-Emitted when clear button is clicked

Types

TypePropertiesDescription
SearchSuggestiontext: string, value: string, icon?: anySearch suggestion interface

Features

  • Hand-drawn style input with organic shadows
  • Search icon and clear button
  • Loading spinner animation
  • Dropdown suggestions with keyboard navigation
  • Smooth animations and transitions
  • Multiple sizes for different use cases
  • Disabled state support
  • Optional icons for suggestions
  • Dark mode support
  • Responsive design

Dependencies

  • Tailwind CSS for styling
  • Vue 3 Composition API