# Input Stepper
`lion-input-stepper` enables the user to increase and decrease a numeric value by predefined range. It is a combination of two buttons and a number input field with an optional slot `after` to suffix the extra information.
```js script
import { html } from 'lit-html';
import '@lion/form/lion-form.js';
import './lion-input-stepper.js';
export default {
title: 'Forms/Input Stepper',
};
```
```js preview-story
export const main = () => html`
Max. 5 guests
`;
```
## Features
- Based on [lion-input](?path=/docs/forms-input--main#input).
- Set `min` and `max` value to define the range.
- Set `step` value in integer or decimal to increase and decrease the value.
- Use `ArrowUp` or `ArrowDown` to update the value.
## How to use
### Installation
```bash
npm i --save @lion/input-stepper
```
```js
import { LionInputStepper } from '@lion/input-stepper';
// or
import '@lion/input-stepper/lion-input-stepper.js';
```
### Usage
```html
Max. 5 guests
```
### Examples
#### Default with no specification
When no range or step is defined, it can go infinite with default step value as `1`. You can also specify prefix content using `after` slot.
```js preview-story
export const defaultMode = () => html`
In Billion Years
`;
```
#### Step and Value
Use `step` attribute to specify the incrementor or decrementor difference and `value` to set the default value.
```js preview-story
export const steps = () => html`
Min: 100, Value: 200, Step: 100
`;
```
#### Range
Use `min` and `max` attribute to specify range.
```js preview-story
export const range = () => html`
Min: 200, Max: 500, Step: 100
`;
```
#### Validation
Only numbers are allowed in the field.
```js preview-story
export const validation = () => html`