Search

The Search component provides a powerful, customizable search interface that allows users to search through different categories, such as boilerplates, templates, components, and open-source projects.

Features

🔍 Search Interface: Provides a command palette-style search interface, enabling users to search through multiple categories.

🧩 Category-Based Navigation: Supports searching across different categories, such as boilerplates, templates, components, and open-source projects.

💾 Command Handling: Utilizes the cmdk library to handle commands, key presses, and search interactions.

What's Included

< Search />

This is the main component that handles the search functionality. It uses the cmdk library to manage command palette interactions, allowing users to search for boilerplates, templates, components, and open-source projects.

< Home />

Displays the main search categories (Boilerplates, Templates, Components, OSS) when the search interface is first opened. Each category leads to a more specific search list when selected.

Home Props

NameTypeDefaultDescription
searchBoilerplatesfunctionundefinedA function that navigates to the boilerplates search page.
searchTemplatesfunctionundefinedA function that navigates to the templates search page.
searchComponentsfunctionundefinedA function that navigates to the components search page.
searchOSSfunctionundefinedA function that navigates to the open-source projects search page.

< Components />

Lists available components in the project, each linking to its detail page. It includes an icon and title for each component.

< Item />

A reusable component used within the subcomponents to display each item in the list. It handles selection and keyboard shortcuts.

Item Props

NameTypeDefaultDescription
childrenReactNodeundefinedThe content to be displayed inside the item, such as text or icons.
shortcutstringundefinedA string representing keyboard shortcuts, displayed in the item if provided.
onSelectfunction() => {}A function that gets called when the item is selected.