# react-nice-select-tsx

> React Nice Select TSX is a customizable, lightweight, and easy-to-use dropdown select component for React and Next.js applications.

Latest version **1.0.0** (published 2024-02-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-nice-select-tsx
pnpm add react-nice-select-tsx
yarn add react-nice-select-tsx
bun add react-nice-select-tsx
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2024-02-02 |
| First published | 2024-02-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 9.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Jerald Tonmoy Dias |
| Maintainers | jerald-tonmoy-dias |
| Keywords | react-nice-select, react-nice-select-tsx, react js, next js, tsx, typescript, select, dropdown, select option, nice select |

## Links

- npm: https://www.npmjs.com/package/react-nice-select-tsx
- Repository: https://github.com/Jerald-tonmoy-dias/react-nice-select-tsx
- Homepage: https://github.com/Jerald-tonmoy-dias/react-nice-select-tsx#readme
- Issues: https://github.com/Jerald-tonmoy-dias/react-nice-select-tsx/issues
- npm.io page: https://npm.io/package/react-nice-select-tsx

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2024-02-02

## README

# React Nice Select TSX

React Nice Select TSX is a customizable, lightweight, and easy-to-use dropdown select component for React and Next.js. It is inspired by the jQuery Nice Selector but built specifically for React/next js Typscript applications. This component removes any dependencies on jQuery and offers a simple and clean alternative for creating select dropdowns in your React projects.

# Installation

To use React NiceSelect in your project, you can install it via npm :

     npm install react-nice-select-tsx

**Make sure to also import the required stylesheet `nice-select.css` into your project.**

    @import  'react-nice-select-tsx/nice-select.css';
    @import  NiceSelect from "react-nice-select-tsx/NiceSelect";

# Usage

    import React from 'react';
    import NiceSelect from "react-nice-select-tsx/NiceSelect";
    import "react-nice-select-tsx/nice-select.css";

    const YourComponent: React.FC = () => {
      const options: Option[] = [
        { value: 'chocolate', label: 'Chocolate' },
        { value: 'strawberry', label: 'Strawberry' },
        { value: 'vanilla', label: 'Vanilla' },
      ];

      const handleChange = (value: string) => {
        // Handle the selected value
        console.log(value);
      };

      return (
        <NiceSelect
          options={options}
          onChange={handleChange}
          // other optional props
        />
      );
    };

    export default YourComponent;

# Props

- `options`: An array of objects with `value` and `label` properties representing the dropdown options.
- `defaultValue`: The default selected option for the dropdown.
- `onChange`: A callback function triggered when an option is selected.
- `wrapperClass`: Additional CSS classes for the select wrapper.

Feel free to customize the component further based on your project's needs.

# Inspired by

This package is inspired by the jQuery Nice Selector.

---
_Source: https://npm.io/package/react-nice-select-tsx · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
