npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

native-dropdown-widget

v1.0.3

Published

An npm package with fully customizable options

Downloads

18

Readme

native-dropdown-widget

React Native Dropown Widget is a library which have the capability to provides a variety of options to customize the dropdown to match the design and functionality of your application.

App gif

Screenshots

Badges

MIT License

Features

  • Easy to use
  • Single or Multiselect option for items
  • Responsive for Cross platform
  • Have wast option for customization
  • Implemented with typescript
Nothing is pleasanter than exploring a library. Give us rate If you like this library :-)

Getting started

npm install native-dropdown-widget --save

or

yarn add native-dropdown-widget

and voilà!!

Dropdown Props

| Props | Params | isRequire | Description | | -------------------------- | ---------------------- | --------- | -------------------------------------------------------------------------- | | data | Array | Yes | Plain array containing dropdown options. | | selectedItem | any[] | Yes | Array containing selected items. | | setSelectedItem | (items: any[]) => void | Yes | Function to set selected items. | | style | Object | No | Style object for the dropdown component. | | containerStyle | Object | No | Style object for the dropdown container. | | innerContainerStyle | Object | No | Style object for the inner container of the dropdown. | | innerContentContainerStyle | Object | No | Style object for the inner content container. | | listStyle | Object | No | Style object for the dropdown list. | | listTextStyle | Object | No | Style object for the text within the dropdown list. | | placeholder | String | No | Placeholder text when no option is selected. | | placeholderStyle | Object | No | Style object for the placeholder text. | | leftIcon | string | No | Icon to be displayed on the left side. | | leftIconStyle | object | No | Style object for the left icon. | | dropDownIcon | Component | No | Custom component to be used as the dropdown icon. | | scrollEnabled | Boolean | No | Enable/disable scrolling in the dropdown list. | | cardContainerStyle | Object | No | Style object for the card container (if used). | | cardStyle | Object | No | Style object for the card component (if used). | | cardTextStyle | Object | No | Style object for the text within the card (if used). | | cardIcon | Component | No | Custom component to be used as the card icon (if used). | | cardIconView | Component | No | Custom component to wrap the card icon (if used). | | isInverted | boolean | No | Boolean indicating if the table is inverted. | | isOverLay | boolean | No | Boolean indicating if the table is overlayed or overlap on behind content. | | singleSelection | boolean | No | Boolean indicating single selection mode or want only one selection. |

Examples Array - 1

const ExpArray = () => [
  "vvlgray",
  "vlgray",
  "lgray",
  "gray",
  "sgray",
  "vsgray",
];

Call the library directly or Import by copying this below -

import DropDownComponent from "native-dropdown-widget";

Usage/Examples 1 - Basic

const [selectedItem, setSelectedItem] = useState(null);

function App() {
  return (
    <DropDownComponent
      data={ExpArray()}
      placeholder={"gray"}
      scrollEnabled={true}
      isOverLay={false}
      selectedItem={selectedItem}
      setSelectedItem={setSelectedItem}
      dropDownIcon={<></>}
    />
  );
}

Usage/Examples 2 - Inverted list With Icons

(Note - You can use any JSX.Element)

const [selectedItem, setSelectedItem] = useState(null);

function App() {
  return (
    <DropDownComponent
      data={ExpArray()}
      placeholder={"gray"}
      scrollEnabled={true}
      isOverLay={false}
      selectedItem={selectedItem}
      setSelectedItem={setSelectedItem}
      leftIcon={<Text>{"❄"}</Text>}
      isInverted
    />
  );
}

Author

License

MIT