@minutemailer/select

0.0.15 • Public • Published

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>
    );
};

/@minutemailer/select/

    Package Sidebar

    Install

    npm i @minutemailer/select

    Weekly Downloads

    52

    Version

    0.0.15

    License

    MIT

    Unpacked Size

    56.3 kB

    Total Files

    6

    Last publish

    Collaborators

    • tbleckert