Interface: Filter<T, TitleType>
Represents a category of options within an option set.
Filters provide a structured way to organize and navigate configuration options within option sets. They create a two-level hierarchy that helps users quickly find relevant options by categorizing them into logical groups such as "Color", "Material", "Style", etc.
Effective filter organization dramatically improves the configuration experience by making option discovery more intuitive and reducing the cognitive load when choosing between numerous options.
Type Parameters
T
T
= FilterOption
Type of filter options, defaults to FilterOption
TitleType
TitleType
= string
Type of the filter title, defaults to string
Properties
active
active:
boolean
Indicates whether this filter is currently active.
When true, this filter category is included in the active filtering mechanism and affects which options are displayed or highlighted in the configurator.
children
children:
T
[]
Collection of options within this filter category.
These are the specific choices users can select within this filter category. For example, a "Color" filter might contain child options like "Red," "Blue," "Green," etc. Each option allows users to narrow the available configurations to options matching that specific attribute.
color?
optional
color:string
Optional color identifier associated with this filter.
When specified, this color is used for visual indicators related to the filter in the interface, such as category headers or selection highlights. Color coding helps users quickly identify related groups of options.
hideInUi
hideInUi:
boolean
Controls visibility in the configurator interface.
When true, this filter will not be displayed in the filter list even though it may be used in the background for option organization. Hidden filters typically represent technical groupings that aren't meant for direct user interaction.
id
id:
string
Unique identifier for this filter category.
This ID uniquely identifies the filter throughout the system and is used for programmatic references, state management, and tracking. It remains consistent even if the filter's display name changes.
parentId?
optional
parentId:string
Optional reference to a parent filter.
When specified, this filter is considered a sub-category within a hierarchical filter structure. In the typical two-level structure, parent filters are primary categories like "Color" or "Material", while child filters represent specific groupings within those categories.
title
title:
TitleType
Display name for this filter category.
This is the human-readable label shown to users in the interface, such as "Color," "Material," or "Finish." It should clearly communicate the attribute being filtered to help users quickly identify relevant option categories.