Skip to content

minutemailer/select

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Aug 20, 2024
850a912 · Aug 20, 2024

History

40 Commits
Jul 10, 2024
Aug 20, 2024
Apr 17, 2023
Apr 17, 2023
Apr 21, 2023
May 1, 2023
Aug 20, 2024
Aug 20, 2024

Repository files navigation

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

About

Headless select box for React

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published