Default Image

Select

Select component.

import { Select } from '@redshank/native';

When To Use

  • A dropdown menu for displaying choices - an elegant alternative to the native select element.
  • Utilizing Radio is recommended when there are fewer total options (less than 5).

Examples

Default

Default select element.

Sizes

Sizes select element.

APIs

Select Props

Api props extends from RNPickerSelect

AttributeTypeAccepted valuesDescriptionDefault
backgroundThemeColorThemeColorBackground color of the elementinputColor
borderInputColorThemeColorThemeColorBorder color of the elementborder
colorThemeColorThemeColorColor of the element selectedaccents2
disabledbooleantrue falseDisabled or enable component-
errorbooleantrue falseShow error variant-
itemsSelectItem[]SelectItemRequired list of the options-
onChangefunction(value, index) => voidOn change function trigger-
sizeSizeTypesmall middle largeSize of the select inputmiddle
typeRadioTypecircle squareCircle or square variantcircle
valuestringTextValue of the select input-

SelectItem

AttributeTypeAccepted valuesDescriptionDefault
keystring numberText NumberOptional key for identify the option-
labelstringTextText for show in the spinner-
valuestringTextValue for the select element-

Community:

We're excited to see the community adopt @redshank/native, raise issues, and provide feedback. Whether it's a feature request, bug report, or a project to showcase, please get involved!

DiscordGithub

Contributing:

PR's on @redshank/native are always welcome, please see our contribution guidelines to learn how you can contribute to this project.

Copyright © 2023 @redshank.