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 🙏

© 2025 – Pkg Stats / Ryan Hefner

planit-components

v0.0.779

Published

Este repositório contém componentes React personalizados para uso em projetos.

Readme

Planit Components

Introdução

Este repositório contém componentes React personalizados para uso em projetos.

Componentes

SearchSelect é um componente de dropdown com busca integrado, altamente personalizável, desenvolvido com React e projetado para fazer parte da biblioteca planit-components.

Instalação

npm install planit-components
# ou
yarn add planit-components

Importação

import { SearchSelect } from 'planit-components';

Uso Básico

const options = [
  { label: 'Option 1', value: '1' },
  { label: 'Option 2', value: '2' },
];

<SearchSelect
  name="example"
  options={options}
  onChange={(value) => console.log(value)}
/>

Props

| Nome | Tipo | Padrão | Descrição | |---------------------|--------------------------------------------|----------------------------|---------------------------------------------------------------------------| | options | { label: string; value: string }[] | obrigatório | Lista de opções a serem exibidas. | | value | string | "" | Valor selecionado. | | name | string | obrigatório | Nome do campo para uso em formulários. | | onChange | (value: string \| null) => void | obrigatório | Callback chamado ao selecionar um item. | | placeholder | string | "Select your value..." | Texto exibido quando nenhum valor está selecionado. | | searchPlaceholder | string | "Search..." | Texto do campo de busca. | | notFoundPlaceholder | string | "Not found" | Texto exibido quando nenhuma opção é encontrada. | | colors | string[] | ['', '', '', ''] | Cores personalizadas para select, search, input e opções. | | icons | string[] | ['none', 'ChevronDown', 'Search'] | Ícones exibidos na esquerda, direita e na busca. | | classIcons | string[] | ['', '', '', ''] | Classes personalizadas para os ícones. | | borders | string[] | ['', '', '', ''] | Bordas personalizadas para select, busca, input e opções. | | spaces | string[] | ['', '', '', ''] | Espaçamentos personalizados. | | sizes | string[] | ['', '', '', ''] | Larguras/alturas customizadas. | | align | string[] | ['', '', '', ''] | Alinhamentos opcionais (não usado diretamente). | | bgSearch | string | '' | Classe de background para o campo de busca. | | colorPlaceholder | string | '' | Classe para a cor do placeholder no input de busca. |

Personalização

Você pode passar arrays com classes Tailwind (ou outras) para estilizar o componente:

<SearchSelect
  name="my-select"
  options={options}
  onChange={(v) => console.log(v)}
  colors={['bg-white', 'bg-slate-100', '', 'text-blue-600']}
  borders={['rounded-md', 'rounded-sm', '', 'rounded']}
  spaces={['px-4', 'px-2', '', 'px-3']}
  sizes={['w-64', 'w-full', '', 'h-12']}
  icons={['Search', 'ChevronDown', 'Search']}
  classIcons={['w-8', 'w-6', 'w-6']}
  bgSearch="bg-slate-200"
  colorPlaceholder="placeholder-slate-500"
/>

Ícones

Os ícones são importados da lib react-bootstrap-icons. Você pode passar o nome do ícone como string, ex: 'Search', 'ChevronDown', etc. Use 'none' para esconder.

Licença

MIT


Desenvolvido por Planit Components.