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 🙏

© 2026 – Pkg Stats / Ryan Hefner

rn-custom-select-dropdown

v1.1.9

Published

A customizable and animated select component for React Native

Readme

rn-custom-select-dropdown

A customizable dropdown select component for React Native, powered by React Native Reanimated, React Native Gesture Handler, and React Native SVG .

Alt text

✨ Features

  • Smooth animations using react-native-reanimated
  • Gesture support with react-native-gesture-handler
  • SVG icons and via react-native-svg
  • Full customization of style and behavior
  • TypeScript support out of the box

📦 Installation

npm install rn-custom-select-dropdown
# or
yarn add rn-custom-select-dropdown

Then install the required peer dependencies:

npm install react-native-reanimated react-native-gesture-handler react-native-svg

Make sure you’ve properly configured:


🚀 Usage

import React, { useState } from "react";
import { GestureHandlerRootView } from "react-native-gesture-handler";
import Select, { ISelectItem } from "rn-custom-select-dropdown";
import { england, france, spain } from "./assets";

const countries: Array<ISelectItem<string>> = [
  {
    label: "France",
    value: "France",
    picture: france,
  },
  {
    label: "England",
    value: "England",
    picture: england,
  },
  {
    label: "Spain",
    value: "Spain",
    picture: spain,
  },
];

export default function App() {
  const [selectedValue, setSelectedValue] =
    useState<ISelectItem<string> | null>(null);

  return (
    <GestureHandlerRootView style={{ flex: 1 }}>
      <Select
        data={countries}
        value={selectedValue}
        onChange={(newValue) => {
          setSelectedValue(newValue);
        }}
      />
    </GestureHandlerRootView>
  );
}

🔧 Props

| Prop | Type | Default | Description | | ----------------------------- | ------------------------------------ | ----------------- | ------------------------------------------------------ | | data | ISelectItem<T>[] | required | List of items to show in the dropdown | | value | ISelectItem<T> \| null | null | The currently selected item | | onChange | (newValue: ISelectItem<T>) => void | undefined | Callback when an item is selected | | placeholder | string | "Select option" | Placeholder text when no value is selected | | label | string | undefined | Optional label displayed above the select field | | isRequired | boolean | false | Whether the field is required | | isError | boolean | false | Indicates error state | | errorMessage | string | undefined | Error message displayed when isError is true | | labelStyle | StyleProp<TextStyle> | undefined | Style for the label text | | containerStyle | StyleProp<ViewStyle> | undefined | Style for the outer container | | inputContainerStyle | StyleProp<ViewStyle> | undefined | Style for the input wrapper | | itemBackgroundColor | string | undefined | Background color for each item | | selectedItemBackgroundColor | string | undefined | Background color for the selected item | | itemLabelColor | string | undefined | Text color for unselected items | | selectedItemLabelColor | string | undefined | Text color for the selected item | | itemLabelStyle | StyleProp<TextStyle> | undefined | Custom text style for item labels | | selectedItemLabelStyle | StyleProp<TextStyle> | undefined | Custom text style for the selected item label | | placeholderStyle | StyleProp<TextStyle> | undefined | Style for the placeholder text | | checkColor | string | undefined | Color of the check icon shown for selected item | | checkSize | number | undefined | Size of the check icon | | arrowColor | string | undefined | Color of the dropdown arrow | | arrowSize | number | undefined | Size of the dropdown arrow | | arrowContainerStyle | StyleProp<ViewStyle> | undefined | Style for the arrow container | | customArrowIcon | React.ReactNode | undefined | Custom arrow icon component | | shouldCloseAfterSelection | boolean | true | Determines whether the dropdown closes after selection | | isArrowShown | boolean | true | Show or hide the arrow icon | | onSelectOpened | () => void | undefined | Callback triggered when the dropdown opens | | onSelectClosed | () => void | undefined | Callback triggered when the dropdown closes | | customDropdownOffset | number | 56 | distance between input and dropdown | | dropdownItemStyle | StyleProp<ViewStyle> | undefined | style for the dropdown item | | customArrowRotation | number | -180 | arrow rotation angle |

📦 ISelectItem<T>

| Prop | Type | Default | Description | | --------- | --------------------- | ------------ | ------------------------------------ | | label | string | required | Text to display for the option | | value | T | required | Value associated with the option | | picture | ImageSourcePropType | undefined | Optional image shown with the option |


📚 Contributing

Issues and pull requests are welcome! Please open an issue first to discuss major changes.

Made with ❤️ by Dhia Ben Hamouda