Components
- Accordion
- Action Bar
- Alert Dialog
- Alert
- Announcement
- Aspect Ratio
- Autocomplete
- Avatar
- Badge
- Bottom Navigation
- Breadcrumb
- Button Group
- Button
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Circular Progress
- Circular Slider
- Clipboard
- Collapsible
- Color Picker
- Combobox
- Command
- Context Menu
- Data List
- Date Picker
- Dialog
- Drawer
- Editable
- Field
- File Upload
- Float
- Floating Panel
- Frame
- Hint
- Hover Card
- Image Cropper
- Input Group
- Input OTP
- Input
- Item
- Kbd
- Link Overlay
- Listbox
- Marquee
- Menu
- Native Select
- Number Input
- 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
- Table
- Tabs
- Textarea
- Timer
- Toast
- Toggle Group
- Toggle Tooltip
- Toggle
- Tooltip
- Tour
- Tree View
Shark UI is a component library for building accessible web applications.
Installation
pnpm add @ark-ui/react.json
Usage
import { Highlight } from "@/components/ui/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.