npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@phila/phila-ui-search

v1.2.1

Published

a search bar

Readme

Phila Search Component

Component Status

| Component | Status | | ----------------- | ----------------------------------------------------------- | | Search | Stable | | SearchSuggestions | Stable |

A search bar component built with Vue 3 and TypeScript, implementing the Philadelphia Design System. Combines the TextField and Button components to create a complete search interface.

Features

  • 🔍 Built-in search icon button using Button component
  • 📝 TextField integration with custom styling
  • 🎯 TypeScript support with full type definitions
  • 💅 Design system integration: Uses Core package styles
  • 🔽 Optional keyboard-navigable suggestions dropdown

Suggestions Dropdown

<Search> renders a keyboard-navigable suggestions dropdown when you pass the suggestions prop:

<Search v-model="query" :suggestions="mySuggestions" @select="handlePick" @search="handleSearch" />

The dropdown supports ArrowDown/ArrowUp navigation, Enter to select, Escape to dismiss. The source of mySuggestions is up to you.

For Philadelphia address autocomplete, pair with useAisAddressSuggestions from @phila/phila-ui-map-core:

import { useAisAddressSuggestions } from "@phila/phila-ui-map-core";
const query = ref("");
const { searchSuggestions, dismissSuggestions } = useAisAddressSuggestions(query);

Then bind searchSuggestions to <Search :suggestions> and call dismissSuggestions() from your @select handler before triggering your search.

If you don't need <Search>'s built-in rendering, SearchSuggestions is also exported for custom layouts.

Installation

npm install @phila/phila-ui-search @phila/phila-ui-core @phila/phila-ui-text-field @phila/phila-ui-button
# or
pnpm add @phila/phila-ui-search @phila/phila-ui-core @phila/phila-ui-text-field @phila/phila-ui-button

Import core styles in your main entry file (e.g., main.js|ts):

import "@phila/phila-ui-core/styles/template-light.css";

Usage

Basic Usage

<script setup lang="ts">
import { Search } from "@phila/phila-ui-search";
</script>

<template>
  <Search />
</template>

With Custom Class

<script setup lang="ts">
import { Search } from "@phila/phila-ui-search";
</script>

<template>
  <Search class-name="custom-search" />
</template>

Props

| Prop | Type | Default | Description | | ------------- | ---------- | ------------------------------ | -------------------------------------------------------------------------- | | modelValue | string | undefined | The v-model value for the search input. | | placeholder | string | "Search by title or keyword" | Placeholder text for the search input. | | suggestions | string[] | [] | Suggestions to display in the dropdown beneath the input. | | elevated | boolean | false | Applies an elevation shadow to the search input (for floating over a map). | | className | string | undefined | Additional CSS classes |

Events

| Event | Payload | Description | | ------------------- | -------- | ---------------------------------------------------------------- | | update:modelValue | string | Emitted on input, and when a suggestion is selected (v-model). | | search | — | Enter pressed in the input, or the search button clicked. | | select | string | A suggestion was picked from the dropdown. | | dismiss | — | The suggestions dropdown was dismissed (e.g. Escape). |

Exposed

Access via a template ref on Search:

| Method | Type | Description | | ------- | ------------ | ---------------------------------- | | focus | () => void | Focuses the underlying text input. |

Component Structure

The Search component is composed of:

  • TextField: For text input with built-in clear functionality, using the trailing-action slot for the search button
  • Button: Icon-only button using IconMagnifyingGlass from @phila/phila-ui-core/icons

Both sub-components use the @phila/phila-ui-* packages for consistency with the design system.

Development

Install Dependencies

pnpm install

Run Demo

pnpm dev

Build Library

pnpm build

Run lint

pnpm lint

Type Check

pnpm type-check

Publishing to NPM

Follow the release instructions using changesets.

License

MIT