Skip to content

MazChecklist

MazChecklist is a standalone component that allows creating a checklist with integrated search functionality. It provides a flexible and customizable user interface for selecting multiple items from a list of options. The component supports real-time search, color customization, and displays messages when no results are found.

Before use it, you should install the MazUi plugin in your project, follow instructions in Getting Started

TIP

This component can be translated globally using the MazUi plugin.

Basic usage

Selected languages: none

query value: none


Custom search function

You can replace the default search function by providing a custom search function. Useful when you need to search by multiple fields, if you want to use a different search algorithm or if you want search into your database by fetching data from an API.

Selected employees: none


Props

NameDescriptionTypeRequiredDefault
model-valueThe model value of the checklist (selected items)(T extends unknown)[]Noundefined
queryThe query to filter the items (model)stringNoundefined
itemsThe list of items to display(O extends MazChecklistItemOption)[]Noundefined
titleThe title of the checkliststringNoundefined
elevationAdd elevation to the cardbooleanNofalse
searchThe search input optionsboolean | MazInputPropsNo{ enabled: false, debounce: 300, autoFocus: false }
search-optionsThe options to normalize the search query (used by the default search function) By default, the threshold is 0.75intersectionNoundefined
search-functionReplace the default search function to provide a custom search functionTSFunctionTypeNoundefined
colorThe color of the checklist (card, checkbox and search input)MazColorNoprimary
translationsTranslations of the checklist componentDeepPartial<MazUiTranslationsNestedSchema['checklist']>NoTranslations from @maz-ui/translations

Events

Event namePropertiesDescription
update:queryvalue mixed - The new queryEmitted when the query change
update:model-valuevalue mixed - The new valueEmitted when the model value change

Slots

NameDescriptionBindings
titleuse this slot to customize the title
no-resultsuse this slot to customize the no results area
no-results-textuse this slot to customize the no results message
itemuse this slot to customize the item