@acodez/select 中文文档教程
@acodez/select
使用多选选项反应选择组件。
Installation
npm install @acodez/select
Props API
Property | Type | Required | Description |
---|---|---|---|
placeholder | string | yes | Placeholder/Default label |
options | array | yes | add value as an array under this |
multiple | string | no | add multiselect option |
Usage
import Select from "@acodez/select";
示例 - 基本
<Select
placeholder="Pick one"
options={[
{ value: 'Rock' },
{ value: 'Paper' },
{ value: 'Scissors' }
]}
/>
示例- 多个
<Select
placeholder="Pick as much as you want!"
multiple
options={[
{ value: 'Rock' },
{ value: 'Paper' },
{ value: 'Scissors' }
]}
/>
@acodez/select
React select component with option for multi-select.
Installation
npm install @acodez/select
Props API
Property | Type | Required | Description |
---|---|---|---|
placeholder | string | yes | Placeholder/Default label |
options | array | yes | add value as an array under this |
multiple | string | no | add multiselect option |
Usage
import Select from "@acodez/select";
Example - Basic
<Select
placeholder="Pick one"
options={[
{ value: 'Rock' },
{ value: 'Paper' },
{ value: 'Scissors' }
]}
/>
Example - Multiple
<Select
placeholder="Pick as much as you want!"
multiple
options={[
{ value: 'Rock' },
{ value: 'Paper' },
{ value: 'Scissors' }
]}
/>