@bithero/react-bs-selectbox
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

react-bs-selectbox

React component for a bootstrap-styled selectbox

License

This project is licensed under AGPL-3.0. See the LICENSE file for more informations.

Usage

import { BsSelectbox, ISelectBoxOption } from '@bithero/react-bs-selectbox';

const MySelectbox = () => {
    const options: ISelectBoxOption[] = [
        { value: 'red', label: 'Rot' },
        { value: 'blue', label: 'Blau' },
    ];

    return (<BsSelectbox options={options} multiple/>);
}

Props

Prop Type Comment
multiple boolean If true, the selectbox allow multi-select
options ISelectBoxOption[] An array of options this selectbox should have available
isLoading boolean If true, shows a simple loading spinner
disabled boolean If true, the component disallows any input
selection ISelectBoxOption[] Provides an array of options that are currently selected; in single mode this should only contain one element
onSelectionChange (ISelectBoxOption[]): void Called when the selection of the component is about to change
placeholderText ?string If set, this replaces the 'Please select an option' text
className string React-className; forwarded to the most outer component (the dropdown)
styles CSSProperties React-styles; forwarded to the most outer component (the dropdown)

Package Sidebar

Install

npm i @bithero/react-bs-selectbox

Weekly Downloads

9

Version

1.2.1

License

AGPL-3.0-or-later

Unpacked Size

44.8 kB

Total Files

10

Last publish

Collaborators

  • mai-lapyst