atomic-color-facet
atomic-color-facet
This is for:
DeveloperA facet is a list of values for a certain field occurring in the results, ordered using a configurable criteria (e.g., number of occurrences).
An atomic-color-facet
displays a facet of the results for the current query as colors.
Introduction
A facet allows users to drill down inside a result set by filtering the result to certain field values. A Color Facet presents its information in a visual way.
User Experience and Best Practices
Usage Notes
-
A color facet is best for placing emphasis on the visual aspect of a facet value.
-
The two available options to display the facet values are
box
andcheckbox
.-
The
box
display option will present the facet values in a grid with a larger tile format. -
The
checkbox
display option will present the values in a list with a smaller icon or color tile.
-
Guidelines
When the facet doesn’t have too many values to display and the text labels are short, it’s best practice to use the box
display option.
When using an image instead of a color tile or icon, it’s best practice to use the box
display.
Use Cases and Examples
In commerce, a user shopping for a t-shirt can select the colors they want using a color-faceted.
Properties
Property | Attribute | Description | Type | Default |
---|---|---|---|---|
|
|
Specifies an explicit list of If you specify a list of values for this option, the facet only uses these values (if they are available in the current result set). Example: The following facet only uses the
The maximum amount of allowed values is 25. The default value is |
|
|
|
|
Identifies the facet values that must appear at the top, in this order.
This parameter can be used in conjunction with the Facet values not part of the Example: The following facet will sort the If there are more than these 3 values available, the rest of the list will be sorted using
The maximum amount of custom sort values is 25. The default value is |
|
|
|
The required facets and values for this facet to be displayed. Examples:
|
|
|
|
|
|
Whether to display the facet values as checkboxes (multiple selection) or boxes (multiple selection). Possible values are 'checkbox', and 'box'. |
|
|
|
|
Specifies a unique identifier for the facet. |
|
|
|
|
The field whose values you want to display in the facet. |
|
|
|
|
Whether to exclude the parents of folded results when estimating the result count for each facet value. |
|
|
|
|
The heading level to use for the heading over the facet, from 1 to 6. |
|
|
|
|
The maximum number of results to scan in the index to ensure that the facet lists all potential facet values.
Note: A high injectionDepth may negatively impact the facet request performance.
Minimum: |
|
|
|
|
Specifies whether the facet is collapsed. When the facet is the child of an |
|
|
|
|
The non-localized label for the facet.
Used in the |
|
|
|
|
The number of values to request for this facet. Also determines the number of additional values to request each time more values are shown. |
|
|
|
|
Specifies how a result must match the selected facet values.
Allowed values:
- |
|
|
|
|
The sort criterion to apply to the returned facet values. Possible values are 'score', 'alphanumeric', 'occurrences', and 'automatic'. |
|
|
|
|
The tabs on which this facet must not be displayed. This property should not be used at the same time as Set this property as a stringified JSON array, e.g.,
If you don’t set this property, the facet can be displayed on any tab. Otherwise, the facet won’t be displayed on any of the specified tabs. |
|
|
|
|
The tabs on which the facet can be displayed. This property should not be used at the same time as Set this property as a stringified JSON array, e.g.,
If you don’t set this property, the facet can be displayed on any tab. Otherwise, the facet can only be displayed on the specified tabs. |
|
|
|
|
Whether this facet should contain a search box. |
|
|
Shadow Parts
Part | Description |
---|---|
|
The button that resets the actively selected facet values. |
|
The clear button icon. |
|
The default part name used to customize color facet values. Should be defined before dynamic parts. |
|
The wrapper for the entire facet. |
|
The button that displays the label and allows to expand/collapse the facet. |
|
The label button icon. |
|
The highlighted query inside the matches labels. |
|
The label indicating there are more matches for the current facet search query. |
|
The label indicating there are no matches for the current facet search query. |
|
The placeholder shown before the first search is executed. |
|
The button to clear the search box of input. |
|
The highlighted query inside the facet values. |
|
The search box submit button. |
|
The search box input. |
|
The search box wrapper. |
|
The show less results button. |
|
The show more results button. |
|
The icons of the show more & show less buttons. |
|
The dynamic part name used to customize a facet value. The |
|
The facet value when display is 'box'. |
|
The selected facet value when display is 'box'. |
|
The facet value checkbox, available when display is 'checkbox'. |
|
The checked facet value checkbox, available when display is 'checkbox'. |
|
The facet value checkbox clickable label, available when display is 'checkbox'. |
|
The facet value count, common for all displays. |
|
The facet value label, common for all displays. |
|
The facet values container. |
CSS Custom Content
Name | Description |
---|---|
|
Gap value for facet values, when the display is 'box' |
|
Number of facet values to display per row, when the display is 'box' |
|
Size of the checkbox. |
|
Gap value for facet values for the Color Facet , when the display is 'box' |
|
Number of facet values for the Color Facet to display per row, when the display is 'box' |
|
The size of the facet search clear icon. |
|
The size of the facet search icon. |