React Native Single Select可定制单选组件

可定制组件的选择器里,react-native-single-select算是用起来比较顺手的一个。安装简单,支持暗黑/浅色主题,还有内置搜索和动画效果,基本常用功能都涵盖了。

支持文字输入图片展示,而且你可以塞自定义组件进去,比如改掉默认的图片或文字样式,完全没压力。你要是对样式有点追求,这点还蛮实用的。

交互上挺流畅,选中效果、切换状态都做得比较细腻。动画也不是那种乱跳型的,还是比较克制,用户体验不错。用在设置页或者内容筛选那类场景,合适。

唯一要注意的就是它对react-native-spinkit有依赖,装的时候别忘了顺手加上:

npm i @freakycoder/react-native-single-select
npx pod-install
npm i react-native-spinkit

用法也不复杂,核心组件是RNSingleSelect,数据格式用ISingleSelectDataType,定义好数据就能直接用:

import RNSingleSelect, { ISingleSelectDataType } from "@freakycoder/react-native-single-select";

如果你在做项目时想找个好上手、可定制的单选控件,不妨试试它。嗯,UI 轻盈、功能全,省心不少。

zip
react-native-single-select-master.zip 预估大小:88个文件
folder
react-native-single-select-master 文件夹
folder
example 文件夹
folder
ios 文件夹
folder
example 文件夹
file
main.m 200B
file
LaunchScreen.storyboard 6KB
file
AppDelegate.h 196B
file
AppDelegate.m 3KB
folder
Images.xcassets 文件夹
folder
AppIcon.appiconset 文件夹
file
Contents.json 586B
file
Contents.json 63B
file
Info.plist 2KB
folder
exampleTests 文件夹
file
exampleTests.m 2KB
file
Info.plist 733B
folder
example.xcodeproj 文件夹
file
project.pbxproj 36KB
folder
xcshareddata 文件夹
folder
xcschemes 文件夹
file
example-tvOS.xcscheme 3KB
file
example.xcscheme 3KB
file
Podfile 616B
file
Podfile.lock 17KB
folder
example-tvOSTests 文件夹
file
Info.plist 765B
folder
example-tvOS 文件夹
file
Info.plist 1KB
folder
example.xcworkspace 文件夹
file
contents.xcworkspacedata 225B
folder
xcshareddata 文件夹
file
IDEWorkspaceChecks.plist 238B
file
index.js 183B
file
.watchmanconfig 2B
folder
android 文件夹
file
gradlew.bat 3KB
file
gradlew 6KB
file
gradle.properties 1KB
folder
app 文件夹
file
proguard-rules.pro 435B
file
debug.keystore 2KB
file
build_defs.bzl 602B
folder
src 文件夹
folder
main 文件夹
folder
res 文件夹
folder
mipmap-xxxhdpi 文件夹
file
ic_launcher.png 9KB
file
ic_launcher_round.png 15KB
folder
mipmap-hdpi 文件夹
file
ic_launcher.png 3KB
file
ic_launcher_round.png 5KB
folder
values 文件夹
file
strings.xml 70B
file
styles.xml 246B
folder
mipmap-xxhdpi 文件夹
file
ic_launcher.png 6KB
file
ic_launcher_round.png 10KB
folder
mipmap-mdpi 文件夹
file
ic_launcher.png 2KB
file
ic_launcher_round.png 3KB
folder
mipmap-xhdpi 文件夹
file
ic_launcher.png 4KB
file
ic_launcher_round.png 7KB
folder
java 文件夹
folder
com 文件夹
folder
example 文件夹
file
MainActivity.java 341B
file
MainApplication.java 3KB
file
AndroidManifest.xml 1016B
folder
debug 文件夹
folder
java 文件夹
folder
com 文件夹
folder
example 文件夹
file
ReactNativeFlipper.java 3KB
file
AndroidManifest.xml 368B
file
_BUCK 1KB
file
build.gradle 8KB
folder
gradle 文件夹
folder
wrapper 文件夹
file
gradle-wrapper.jar 54KB
file
gradle-wrapper.properties 200B
file
settings.gradle 191B
file
build.gradle 1002B
file
package.json 1KB
folder
__tests__ 文件夹
file
App-test.tsx 266B
file
import-png.d.ts 74B
folder
assets 文件夹
file
food-and-restaurant.png 14KB
file
party.png 12KB
file
beer.png 11KB
file
guitar.png 13KB
file
abstract-1.png 948KB
file
abstract-2.png 1.19MB
file
money.png 15KB
file
app.json 51B
file
.eslintrc.js 148B
file
tsconfig.json 5KB
file
.gitignore 846B
file
App.tsx 2KB
file
.buckconfig 114B
file
yarn.lock 300KB
file
metro.config.js 300B
file
.gitattributes 16B
file
babel.config.js 77B
file
package.json 2KB
folder
assets 文件夹
folder
Screenshots 文件夹
file
React-Native-Single-Select-Light-Theme.gif 19.68MB
file
React-Native-Single-Select-Dark-Theme.gif 19.61MB
file
logo.png 15KB
file
.npmignore 85B
file
.eslintrc.js 791B
file
tsconfig.json 812B
file
.gitignore 826B
folder
lib 文件夹
file
import-png.d.ts 74B
file
RNSingleSelect.tsx 8KB
file
RNSingleSelect.style.ts 2KB
folder
components 文件夹
file
down-arrow-dark.png 1KB
file
down-arrow-light.png 845B
file
Icon.tsx 1KB
file
theme.ts 690B
file
.prettierrc.js 150B
file
README.md 9KB
file
yarn.lock 89KB
file
.gitattributes 16B
...
zip 文件大小:41.55MB