@lendi-ui/dropdown
TypeScript icon, indicating that this package has built-in type declarations

5.2.0 • Public • Published

@lendi-ui/dropdown

A component.

Installation

yarn add @lendi-ui/dropdown

Usage

import { NativeSelect, Select } from '@lendi-ui/dropdown';
(items = [
  {
    value: '1',
    label: '5 years',
  },
  {
    value: '2',
    label: '10 years',
  },
  {
    value: '3',
    label: '15 years',
  },
  {
    value: '4',
    label: '20 years',
  },
  {
    value: '5',
    label: '25 years',
  },
]),
      <NativeSelect
        size={{mobile:'sm', tablet:'md', desktop:'lg'}}
        items={this.state.items}
        isFullWidth={true}
        value={this.state.value}
        onChange={(value) => {this.setState({value})
          }}
      />
      <Select
          size="sm"
          options={items}
          placeholder="Size SM"
          hideSelectedOptions={false}
          isAutoFocus
        />

***Dropdown also support default select props like autoFocus, disabled, onFocus, onChange, name and all AriaAttributes.

Properties

<PropTable>
  <PropTable.Entry name="className" defaultValue=""type="string" description="The custom style for Dropdown."/>
  <PropTable.Entry name="isDisabled" type={'"true | false"'} defaultValue="false" description="Whether the dropdown is disabled."/>
  <PropTable.Entry name="isError" type={'"true | false"'} defaultValue="false" description="Whether the dropdown is not selected."/>
  <PropTable.Entry name="isFullWidth" type={'"true | false"'} defaultValue="true" description="the dropdown is intended to use the full width of the container"/>
  <PropTable.Entry name="isLoading" type={'"true | false"'} defaultValue="false" description="Whether the dropdown icon is Spinner or ChevronDown."/>
  <PropTable.Entry name="items" required type="[{value: string, label: string}]" description="An object array with 'value' and 'label' that display in this component"/>
  <PropTable.Entry name="size" type={'"lg" | "md" | "sm"'} defaultValue="md" description="The inline-dropdown size"/>
</PropTable>

Readme

Keywords

none

Package Sidebar

Install

npm i @lendi-ui/dropdown

Weekly Downloads

255

Version

5.2.0

License

ISC

Unpacked Size

954 kB

Total Files

15

Last publish

Collaborators

  • joshua-derbe-lendi
  • michaelhuttonlendi
  • simon_lau_lendi
  • benjamintan
  • oliverfrance
  • kjartan.johansen
  • dapovey
  • nooshines
  • fernandogontijo_
  • sean-elliott-lendi
  • nghiato
  • sunny.niu
  • mfarshadmehr
  • jannes.mingram.lendi
  • antoine_lendi
  • bchiong
  • lendi-owner
  • andrealin
  • malkyfaith
  • brianduan
  • yihan_lu_lendi
  • nodemacross
  • samnevers
  • boris.gordon
  • leo.wei
  • bharadwajsampath
  • luissilvalendi
  • thomaslendi
  • dimitrioslendi
  • le-kang-lendi
  • yupeili