@chainplatform/dropdown
v0.4.1
Published
@chainplatform/dropdown is a React Native library that provides a Dropdown component for react-native and react-native-web.
Maintainers
Readme
React Native Dropdown
@chainplatform/dropdown is a React Native library that provides a Dropdown component for react-native and react-native-web.
Install
npm install @chainplatform/dropdown --saveor
yarn add @chainplatform/dropdownUsage
import React from 'react';
import {StyleSheet} from 'react-native';
import CheckBox from '@chainplatform/dropdown';
class App extends React.Component {
constructor(props) {
super(props);
this.state = {
lists: [{label: "the First"}],
open: false,
idefaultIdex: -1,
};
this.exchangeRef = React.createRef(null);
}
onSelectExchange(index, item) {
console.log("onSelectExchange ", index, item);
}
render() {
return (
<View style={{flex:1}}>
<Dropdown
ref={this.exchangeRef}
disabled={false}
placeholder={"search"}
containerStyle={{
width: "100%",
borderRadius: 4,
borderColor: "#DDD",
borderWidth: 1,
flexDirection: "row",
alignItems: "center"
}}
textStyle={{
fontSize: 13,
textAlign: "left",
padding: 11.5
}}
stickerStyle={{
marginRight: 8,
justifyContent: "center",
alignItems: "center",
width: 20,
height: 20,
color: "#DDD"
}}
dropdownContainerStyle={{
width: "100%",
maxHeight: 165,
maxWidth: 430,
borderColor: "#DDD",
borderWidth: 1,
}}
defaultIndex={this.state.idefaultIdex}
data={this.state.lists}
onSelect={(selected, item) => this.onSelectExchange(selected, item)}
/>
</View>
);
}
}🪪 License
MIT © 2025 Chain Platform
💖 Support & Donate
If you find this package helpful, consider supporting the development:
| Cryptocurrency | Address |
|----------------|----------|
| Bitcoin (BTC) | 17grbSNSEcEybS1nHh4TGYVodBwT16cWtc |
| Ethereum (ETH) | 0xa2fd119a619908d53928e5848b49bf1cc15689d4 |
| Tron (TRX) | TYL8p2PLCLDfq3CgGBp58WdUvvg9zsJ8pd |
| DOGE (DOGE) | DDfKN2ys4frNaUkvPKcAdfL6SiVss5Bm19 |
| USDT (SOLANA) | cPUZsb7T9tMfiZFqXbWbRvrUktxgZQXQ2Ni1HiVXgFm |
Your contribution helps maintain open-source development under the Chain Platform ecosystem 🚀
