Default Image

Controller

Controller component.

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

When To Use

  • Used for change values for steps in cards or shopping car.

Examples

Default

Default controller element.

Max and Min

Max and Min values for the controller.

Customize

Customize colors.

APIs

Space Props

Api props extends from View

AttributeTypeAccepted valuesDescriptionDefault
borderColorThemeColorThemeColorBorder color of the elementaccents4
colorThemeColorThemeColorText color in current texttext
errorbooleantrue falseShow error variant-
maxnumberNumberSet max value-
maxOverflowfunction() => voidTrigger when it reaches the maximum value-
minnumberNumberSet min value-
minOverflowfunction() => voidTrigger when it reaches the minimum value-
onChangefunction(current: number) => voidTrigger when a value is increased or decreased-
onDecreasefunction(current: number) => voidTrigger when a press decrease button-
onIncreasefunction(current: number) => voidTrigger when a press increase button-
styleobjectStyleProp<ViewStyle>Style for container-
textErrorstringTextMessage error, used with error prop-
valuenumberNumberValue for the controller-
widthnumberNumberWidth of the 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.