This repository has been archived by the owner on Dec 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc(menu): add documentation about menu widget
- Loading branch information
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters