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

searcher-library

v2.0.5

Published

Una librería de componentes para Next.js

Readme

Searcher Library

Descripción

Una librería de componentes para Next.js diseñada para integrarse fácilmente en proyectos con la estructura src/app.

Instalación

Para instalar el componente, usa el siguiente comando:

pnpm dlx searcher-library add searcher

Uso

Una vez que el componente esté instalado y configurado, puedes utilizarlo en tu proyecto Next.js. Aquí hay un ejemplo básico de cómo usar el componente Searcher:

Configurar postcss

En el archivo postcss.config.mjs configurar de la siguiente manera

const config = {
   plugins: {
      "tailwindcss/nesting": {},
      tailwindcss: {},
      autoprefixer: {},
   },
};

Configurar tailwind

En el archivo tailwind.config.ts configurar los colores primary y secondary que son los colores base que usa el componente y la fuente poppins.

content: [
   ...,
   "./src/searcher/**/*.{js,ts,jsx,tsx,mdx}",
],
theme: {
   extend: {
      colors: {
         primary: {
            DEFAULT: "#0061a9",
         },
         secondary: {
            DEFAULT: "#f29d19",
         },
      },
      fontFamily: {
         poppins: ["var(--font-poppins)"],
      },
   },
},

Importar el componente

import { Searcher } from '../src/searcher/components/Searcher';

Uso en un componente

El componente recibe los siguientes props para su correcto funcionamiento:

interface Props {
   urlGlobal: string;
   labelDeparture: string;
   labelArrival: string;
   labelStartDate: string;
   labelEndDate: string;
   textSearchDeparture: string;
   textSearchArrival: string;
   textSearchStartDate: string;
   textSearchEndDate: string;
   textSelectedDeparture: string;
   textSelectedArrival: string;
   textSelectedStartDate: string;
   textSelectedEndDate: string;
   noResultsMessage: string;
   langCurrent?: string;
   textSearch: string;
}

Ejemplo basico del componente:

const MyComponent = () => (
  <div>
    <Searcher
        // URL
        urlGlobal="https://websales.futuranet.com"
        // TEXTS DEPARTURE
        labelDeparture="Origen"
        textSearchDeparture="Buscar origen..."
        textSelectedDeparture="Seleccione un origen"
        // TEXTS ARRIVAL
        labelArrival="Destino"
        textSearchArrival="Buscar destino..."
        textSelectedArrival="Seleccione un destino"
        // TEXTS START DATE
        labelStartDate="Fecha de ida"
        textSearchStartDate="Buscar fecha..."
        textSelectedStartDate="Seleccione una fecha"
        // TEXTS END DATE
        labelEndDate="Fecha de regreso"
        textSearchEndDate="Buscar fecha..."
        textSelectedEndDate="Seleccione una fecha"
        // TEXTS NO RESULTS
        noResultsMessage="No se encontraron resultados"
        // LANGUAGE
        langCurrent="es"
        // TEXTS SEARCH
        textSearch="Buscar"
      />
  </div>
);

export default MyComponent;

Dependencias

Esta librería requiere las siguientes dependencias, que se instalarán automáticamente:

@hookform/resolvers @radix-ui/react-dialog @radix-ui/react-label @radix-ui/react-popover @radix-ui/react-slot class-variance-authority clsx cmdk date-fns lucide-react react-hook-form tailwind-merge tailwindcss-animate zod zustand