pub fn SpinButton<T>(props: SpinButtonProps<T>) -> impl IntoViewExpand description
SpinButton are used to allow numerical input bounded between minimum and maximum values with buttons to increment and decrement the input value.
Note: SpinButton is a generic component, so the type must be specified. Example: <SpinButton<i32> step_page=1/>.
Related issue
§Required Props
- step_page:
impl Into<Signal<T>>- Large difference between two values. This should be greater than step and is used when users hit the Page Up or Page Down keys.
§Optional Props
- class:
impl Into<MaybeProp<String>> - id:
impl Into<MaybeProp<String>> - name:
impl Into<MaybeProp<String>>- A string specifying a name for the input control. This name is submitted along with the control’s value when the form data is submitted.
- rules:
impl Into<Vec<SpinButtonRule<T>>>- The rules to validate Field.
- value:
impl Into<Model<T>>- Current value of the control.
- min:
impl Into<Signal<T>>- The minimum number that the input value can take.
- max:
impl Into<Signal<T>>- The maximum number that the input value can take.
- placeholder:
impl Into<MaybeProp<String>>- Placeholder of input number.
- disabled:
impl Into<Signal<bool>>- Whether the input is disabled.
- size:
impl Into<Signal<SpinButtonSize>>- Size of the input.
- parser: [
impl Into<OptionalProp<BoxOneCallback<String, Option<T>>>>](OptionalProp<BoxOneCallback<String, Option>>) - Modifies the user input before assigning it to the value.
- format: [
impl Into<OptionalProp<BoxOneCallback<T, String>>>](OptionalProp<BoxOneCallback<T, String>>)- Formats the value to be shown to the user.