Skip to Content
NarakUI

Highlights

Display key metrics with a title, a large value, and an optional statistic.

Basic usage

Place highlights in a HighlightsGrid. The grid draws the card surface and the dividers between cells, so a Highlights is not meant to be used on its own. Pass a Statistic as statisticProps to show the change next to the value.

Visibility score
42.8%
+3.4%
Share of voice
18.2%
-1.2%
Citations
12,480
+1.2k

Multiple rows

Children wrap onto new rows after columns items. The grid draws dividers between cells, with none after the last column or row. tooltipContent adds an info tooltip next to the title.

Prompts tracked
250
Answer engines
6
Brand mentions
3,912
+318
Last report
2 hours ago

Loading

Set isLoading on the grid to show skeletons in every cell, or on a single Highlights. The statistic skeleton only renders when statisticProps is set. Size the skeletons with bigValueSkeletonWidth and the related props.

Visibility score
Share of voice
Last report

Installation

pnpm dlx shadcn@latest add @narakui/highlights

Add "@narakui": "https://ui.narakcode.dev/r/{name}.json" to components.json, or install directly from https://ui.narakcode.dev/r/highlights.json.

Usage

import { Highlights, HighlightsGrid } from '@/components/ui/highlights';

<HighlightsGrid columns={2}>
  <Highlights title="Visibility score" bigValue="42.8%" endIcon="eye" />
  <Highlights title="Citations" bigValue={12480} endIcon="link" />
</HighlightsGrid>

Properties

PropTypeDefaultDescription
title (Required)string—The title of the highlights box
bigValuestring | number—The primary value. Numbers are formatted with toLocaleString
endIconIconValue—An icon name, a { name, variant?, className?, label? } descriptor, or a node
statisticPropsReactNode—The statistic to show below the big value
isLoadingbooleanfalseWhether the component is in a loading state
tooltipContentReactNode—Content for an info tooltip next to the title. No tooltip icon renders without it
bigValueSkeletonWidthstring'60px'Width of the big value skeleton when loading
bigValueSkeletonHeightstring'24px'Height of the big value skeleton when loading
statisticSkeletonWidthstring'32px'Width of the statistic skeleton when loading
statisticSkeletonHeightstring'16px'Height of the statistic skeleton when loading
classNamestring—Additional CSS classes to apply to the highlights container

HighlightsGrid Properties

PropTypeDefaultDescription
children (Required)ReactNode—Highlights components to display in the grid
columnsnumber4Number of columns in the grid layout, from 1 to 6
isLoadingboolean—When set, overrides isLoading on every child
classNamestring—Additional CSS classes to apply to the grid container