Components
- Accordion
- Action BarUpdated
- Alert Dialog
- Alert
- Announcement
- Aspect Ratio
- Autocomplete
- Avatar
- BadgeUpdated
- Bottom Navigation
- Breadcrumb
- Button Group
- Button
- CalendarUpdated
- CardUpdated
- Carousel
- Chart
- Checkbox
- Circular Progress
- Circular Slider
- Clipboard
- Collapsible
- Color Picker
- Combobox
- Command
- Context MenuUpdated
- Data List
- Date Picker
- DialogUpdated
- DrawerUpdated
- Editable
- FieldUpdated
- File Upload
- Float
- Floating Panel
- Frame
- Hint
- Hover Card
- Image Cropper
- Input Group
- Input OTP
- Input
- Item
- Kbd
- Link Overlay
- Listbox
- MarqueeUpdated
- Menu
- Native Select
- Number InputUpdated
- Pagination
- Popover
- Progress
- Prose
- QR Code
- Radio Group
- Rating
- Resizable
- Scroll Area
- Segment Group
- Select
- Separator
- Sheet
- Sidebar
- Signature Pad
- Skeleton
- Skip Nav
- Slider
- Spinner
- Status
- Steps
- Switch
- TableUpdated
- Tabs
- Textarea
- TimerUpdated
- ToastUpdated
- Toggle Group
- Toggle Tooltip
- Toggle
- Tooltip
- Tour
- Tree View
Hooks
Shark UI is a component library for building accessible web applications.
Installation#
pnpm dlx shadcn@latest add @shark/highlight
Usage#
import { Highlight } from "@/registry/react/components/highlight";
<Highlight query="amet" text="Lorem ipsum dolor sit amet, consectetur adipiscing elit." />
Examples#
Multiple#
Pass an array of strings to the query prop to highlight multiple substrings.
With the Highlight component, you can spotlight, emphasize and accentuate words.
Search Query#
Use the Highlight component to highlight search query results.
Search result for: spot
- Spotlight bulb
- Spot cleaner
- Spot ceiling
With Squiggle#
Use a custom decoration like a wavy underline for a fancier highlight effect.
Endless scale, powered by real humans.
Custom Style#
Use the className prop to customize the style of the highlighted text.
With the Highlight component, you can spotlight words.
API Reference#
Highlight#
| Prop | Type | Default |
|---|---|---|
query | string | string[] | required |
text | string | required |
ignoreCase | boolean | false |
exactMatch | boolean | false |
className | string | "" |
For a complete list of props, see the Ark UI documentation.