Socket
Socket
Sign inDemoInstall

@lendi-ui/dropdown

Package Overview
Dependencies
10
Maintainers
47
Versions
67
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @lendi-ui/dropdown

A <Dropdown> component.


Version published
Weekly downloads
187
decreased by-35.74%
Maintainers
47
Created
Weekly downloads
 

Readme

Source

@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>

FAQs

Last updated on 01 Mar 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc