Shop

Filter Off Canvas

Off-canvas filter sheet for product listing pages with accordion-grouped checkbox lists, swatch lists, range sliders, and switches.

Overview

FilterOffCanvas is the full filter sheet that opens from FilterBar. It composes a stack of FilterOffCanvasAccordionItems, each rendering one typed inner control based on the shape of the filter you pass in:

Inner controlFilter type
FilterOffCanvasSwitchItemBoolean filters (rendered at the accordion level, not inside an accordion item).
FilterOffCanvasCheckboxListList filters with presentation: 'text' (rendered with *ListItem rows).
FilterOffCanvasSwatchListList filters with presentation: 'swatch'; binds SwatchOption directly.
FilterOffCanvasRangeSliderNumeric range filters with optional step and formatLabel.

Define your filter shape once via the AvailableFilter union and FilterOffCanvas mounts the right inner control per filter type.

The sheet's primary CTA reads "Show N products" from the filteredCount prop, so the count of matching products needs to be passed in alongside the filter definitions. A secondary "Delete all" button resets every selection to its empty value in one click.

Auto-import tag: <LFilterOffCanvas>.

Key Business & UX Benefits

  • Typed inner controls (checkbox lists, swatches, range sliders, switches) match each filter to the right input pattern, which raises filter-use rate and shortens time-to-product.
  • Accordion grouping keeps long filter lists scannable, so shoppers can find size or color without scrolling past every facet.
  • Single AvailableFilter shape drives the whole sheet, so adding a new facet in your data model needs no extra UI code.
  • Off-canvas presentation reclaims the listing grid behind it, letting shoppers see filter results in context rather than on a separate page.
Pro-Tip from Larry: Define your filter shape once via the AvailableFilter union; FilterOffCanvas picks the right inner control automatically per filter type.

Usage

LFilterOffCanvas

Feature List

  • Single AvailableFilter union picks the right inner control per filter (checkbox list, swatch list, range slider, or switch)
  • List filters honour a 'presentation' value of 'text' or 'swatch' to switch between rows and SwatchOption tiles
  • Range sliders accept optional step and formatLabel props so price, weight, and size facets render with the right unit
  • Primary CTA reads 'Show N products' from the filteredCount prop so shoppers see impact before applying the filter set
  • Secondary 'Delete all' button resets every selection to its empty value in one click
  • Accordion grouping keeps long facet lists scannable while keeping every filter one tap away
  • Composable from named inner primitives (AccordionItem, CheckboxList, SwatchList, RangeSlider, SwitchItem) for custom sheets

API Reference

LFilterOffCanvas

PropDefaultType
filtersrequired
filteredCountrequirednumber
openboolean
selectedobject
EventType
update:open(event: "update:open", value: boolean): void
update:selected(event: "update:selected", value: SelectedFilters): void

LFilterOffCanvasAccordionItem

PropDefaultType
titlerequiredstring
activeValuerequiredstring
iconstring
SlotType
default{}
EventType
clearFilter(event: "clearFilter"): void

LFilterOffCanvasCheckboxList

PropDefaultType
idrequiredstring
itemsrequired
disabledfalseboolean
requiredfalseboolean
invalidfalseboolean
modelValuestring[]
EventType
update:modelValue(event: "update:modelValue", value: string[] | undefined): void

LFilterOffCanvasCheckboxListItem

PropDefaultType
idrequiredstring
labelrequiredstring
countnumber
itemSelectedboolean

LFilterOffCanvasSwatchList

PropDefaultType
itemsrequiredOmit<SwatchOptionProps, "selected">[]
idstring
disabledfalseboolean
requiredfalseboolean
invalidfalseboolean
modelValuestring[]
EventType
update:modelValue(event: "update:modelValue", value: string[] | undefined): void

LFilterOffCanvasRangeSlider

PropDefaultType
idrequiredstring
minrequirednumber
maxrequirednumber
stepnumber
formatLabel(value: number): string
disabledfalseboolean
requiredfalseboolean
invalidfalseboolean
modelValue
EventType
update:modelValue(event: "update:modelValue", value: SelectedFilterRange | undefined): void

LFilterOffCanvasSwitchItem

PropDefaultType
idrequiredstring
labelrequiredstring
disabledfalseboolean
requiredfalseboolean
invalidfalseboolean
modelValueboolean
EventType
update:modelValue(event: "update:modelValue", value: boolean | undefined): void
Copyright © 2026 Laioutr GmbH