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

Commit

Permalink
doc(menu): add documentation about menu widget
Browse files Browse the repository at this point in the history
  • Loading branch information
iam4x committed Oct 18, 2017
1 parent e7a3a15 commit e8cab73
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
42 changes: 42 additions & 0 deletions docs/src/components/menu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: Menu
mainTitle: Components
layout: main.pug
category: Components
withHeadings: true
navWeight: 6
editable: true
githubSource: docs/src/components/menu.md
---

Create a menu based on a facet. A menu displays facet values and let the user selects only one value at a time. It also displays an empty value which lets the user “unselect” any previous selection.

## Usage

```html
<ais-menu :attribute="category"></ais-menu>
```

## Props

| Name | Type | Default | Description |
|------------|--------|------------------------------------------------|----------------------------------|
| attribute | String | | The attribute name to refine on. |
| limit | Number | `10` | The number of values to display |
| sort-by | Array | `['isRefined:desc', 'count:desc', 'name:asc']` | The sorting strategy |

## Slots

| Name | Props | Description |
|---------|----------------------|-------------------------------------------------------------------------------------------------|
| header | | Add content to the top of the component, which will be hidden when the component is hidden |
| footer | | Add content to the bottom of the component, which will be hidden when the component is hidden |

## CSS Classes

| ClassName | Description |
|-------------------------------|-----------------------------|
| `ais-menu` | Container class |
| `ais-menu__item` | A refinement option |
| `ais-menu__item--active` | An active refinement option |
| `ais-menu__count` | A refinement option count |
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 @@ -25,6 +25,7 @@ You can try most of them out in our playground.
* [Results](components/results.html)
* [No Results](components/no-results.html)
* [Refinement List](components/refinement-list.html)
* [Menu](components/menu.html)
* [Tree Menu](components/tree-menu.html)
* [Pagination](components/pagination.html)
* [Clear](components/clear.html)
Expand Down

0 comments on commit e8cab73

Please sign in to comment.