Documentation
React Highlight component

Highlight

The Highlight component is used to emphasize the boundaries of an element on the page by applying a highlight effect. It dynamically adjusts to the dimensions and position of the target element, and supports customization for width, height, and opacity ratios.

Usage

First of all, you need to import the Highlight component from the kitchn package.

import { Highlight } from "kitchn"

Default

Props

NameTypeDefaultRequiredDescription
hrefstring | UrlObjectundefinedNoThe URL to navigate to when the link is clicked.
onClick(_event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => voidundefinedNoFunction to handle click events.
disabledbooleanfalseNoDisables the link, preventing navigation and modifying its styling.
variant"highlight" | "primary" | "secondary" | "blend"undefinedNoSpecifies the visual style of the link.

FragmentLink Props

NameTypeDefaultRequiredDescription
idstringundefinedYesThe ID of the element to link to within the page.