Save 15% on all Justd Blocks
Components

Search Field

A text input designed for searching, often featuring built-in filtering, suggestions, and a clear button.

Basic

A search field is a box where you can type in keywords to search for something, like finding content on a website.

Installation

If you hit any issues, make sure you check out the installation guide here for more information.

Composed Components

When you install this component via the CLI, it automatically loads all composed components, so you don’t need to add them individually.

The Search Field comes packed with several components to enhance functionality and provide a seamless experience.

Buttons play a crucial role in functionality, whether for submitting a form or navigating to another page.
Field's a core piece every other component uses. It flexes reusable styles, showing up in inputs, labels, descriptions, and more.

Manual Installation

Make sure you also install the composed components and the required packages for the component to function properly.

Anatomy

With Label

You can add a label to the search field by using the label prop.

Validation

Add a validation message to the search field by setting the validationMessage prop.

Pending

Show a loading indicator to indicate that the search field is in a pending state by using the isPending prop.

Description

You can add a description to the search field by using the description prop.

Search for a product

Controlled

Like other fields, the search field can be controlled by managing its value through the value prop.

You have typed:

Uncontrolled

Like other fields, the search field can be controlled by managing its value through the defaultValue prop.

Readonly

When the search field is set to readonly, it cannot be edited.

Disabled

Disable the search field by using the isDisabled prop.