Creating search filter components

How can I create a component to in section filter in search result page to sku color with checkbox background?

1 Like

Hello, tried to insert the hex in a filter attribute?
After that it would just validate by script what has the check

You could use the hook to get the search page context information, like this:

import React, { useState } from 'react'
import { SearchPageContext } from 'vtex.search-page-context'

default export function CustomSelectedFilters() {
  const context = SearchPageContext.useSearchPage()

console.log(context)
}

manifest:

“dependencies”: {
…,
“vtex.search-page-context”: “0.x”,
},