Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

Commit

Permalink
feat(docs): add RangeInput section
Browse files Browse the repository at this point in the history
  • Loading branch information
samouss committed Oct 20, 2017
1 parent cbc1e1b commit 483583a
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
50 changes: 50 additions & 0 deletions docs/src/components/range-input.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: Range input
mainTitle: Components
layout: main.pug
category: Components
withHeadings: true
navWeight: 13
editable: true
githubSource: docs/src/components/range-input.md
---

A component that lets users filter results based on a given minimum and maximum value.

## Usage

Basic usage:

```html
<ais-range-input
attribute-name="price"
/>
```

## Props

| Name | Required | Type | Default | Description |
|:-------------------|:---------|:-------------------------------|:---------|:-----------------------------------------------------------------------------------------------------------------------------|
| attribute-name | true | `string` | | The attribute to filter on. |
| default-refinement | false | `{ min: number, max: number }` | | Default state of the widget containing the start and the end of the range. |
| min | false | `number` | | Minimum value. When this isn’t set, the minimum value will be automatically computed by Algolia using the data in the index. |
| max | false | `number` | | Maximum value. When this isn’t set, the maximum value will be automatically computed by Algolia using the data in the index. |
| precision | false | `number` | `0` | Number of digits after decimal point to use. |

## Slots

| Name | Props | Default | Description |
|:----------|:------|:--------|:---------------------------------------------------|
| header | | | Add content to the top of the component. |
| separator | | `to` | Text displayed between the 'min' and 'max' inputs. |
| submit | | `ok` | Text displayed inside the submit button. |
| footer | | | Add content to the bottom of the component. |

## CSS Classes

| ClassName | Description |
|:-----------------------------------|:-------------------------------------------------|
| `ais-range-input` | Container class. |
| `ais-range-input__input` | Min and max input element's class. |
| `ais-range-input__input--from` | Min input element's class. |
| `ais-range-input__input--to` | Max input element's class. |
1 change: 1 addition & 0 deletions docs/src/getting-started/using-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ You can try most of them out in our playground.
* [Stats](components/stats.html)
* [Powered By](components/powered-by.html)
* [Price Range](components/price-range.html)
* [Range Input](components/range-input.html)
* [Results per Page Selector](components/results-per-page-selector.html)
* [Sort by Selector](components/sort-by-selector.html)
* [Rating](components/rating.html)
Expand Down

0 comments on commit 483583a

Please sign in to comment.