🚀 DAY 3 OF LAUNCH WEEK: Introducing Webhook Events for Pull Request Scans.Learn more →
Socket
Book a DemoInstallSign in
Socket

@minutemailer/select

Package Overview
Dependencies
Maintainers
0
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@minutemailer/select

Headless select box for React with fuzzy search and keyboard navigation

latest
Source
npmnpm
Version
0.0.17
Version published
Maintainers
0
Created
Source

Headless select box for React

A powerful, headless select box component for React that allows you to build your own select box UI.

Installation

npm i @minutemailer/select

Usage

import { useState } from 'react';
import { Select } from '@minutemailer/select';

const options = [
  { value: '1', label: 'One' },
  { value: '2', label: 'Two' },
  { value: '3', label: 'Three' },
];

function SelectBox() {
    const options = useSelector((state) => state.options);
    const { q, search } = useSearch();
    const { onKeyUp, onKeyDown } = useKeyboard();
    
    return ...;
}

function App() {
    const [value, setValue] = useState('1');
    
    return (
        <Select options={options} value={value} onChange={setState}><SelectBox /></Select>
    );
};

Keywords

javascript

FAQs

Package last updated on 20 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts