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
Attribute | Type | Accepted values | Description | Default |
---|---|---|---|---|
borderColor | ThemeColor | ThemeColor | Border color of the element | accents4 |
color | ThemeColor | ThemeColor | Text color in current text | text |
error | boolean | true false | Show error variant | - |
max | number | Number | Set max value | - |
maxOverflow | function | () => void | Trigger when it reaches the maximum value | - |
min | number | Number | Set min value | - |
minOverflow | function | () => void | Trigger when it reaches the minimum value | - |
onChange | function | (current: number) => void | Trigger when a value is increased or decreased | - |
onDecrease | function | (current: number) => void | Trigger when a press decrease button | - |
onIncrease | function | (current: number) => void | Trigger when a press increase button | - |
style | object | StyleProp<ViewStyle> | Style for container | - |
textError | string | Text | Message error, used with error prop | - |
value | number | Number | Value for the controller | - |
width | number | Number | Width 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!
DiscordGithubContributing:
PR's on @redshank/native are always welcome, please see our contribution guidelines to learn how you can contribute to this project.