Skip to content

Full Value

Free

Shows a short value in a line of text, such as 184K or 1.8 MB, and keeps the full value one hover, focus, or tap away in a tooltip.

  • Base UI
  • React 19
  • Tailwind CSS 4

Added Nov 9, 2026 · MIT + Commons Clause

Playground

Loading the preview

Props

Pass the full value, and the short one as children.

visitors-count.tsx

FullValue

<span>
PropTypeDefaultDescription
childrenRequiredReactNode—The text that shows: the short value ("184K", "1.8 MB"), plain or rolling.
fullRequiredstring—The full value ("184,312"): the Tooltip text.
shortenedbooleantrueThe shown text is shorter than full. Default true. false: plain text, no underline, no tab stop, no Tooltip.
tooltipbooleantrueShow the full value in a Tooltip (hover, focus, and a tap on touch). Default true. false keeps the short text only.
quietbooleanfalseThe full value adds to the shown text, it does not replace a cut one (the date behind "5 minutes ago", the ISO value behind "Oct 22, 2026"). Default false. true: no underline and no tab stop, the Tooltip opens on hover only. With tooltip={false}: the shown text only.
fullDir"ltr""rtl"—The text direction of full in the Tooltip. Set ltr for a Latin code (an ISO date with "+02:00") on a right-to-left page, so its signs stay in place. Default: the page direction.
openboolean—The Tooltip open state, controlled (the Base UI Tooltip open).
defaultOpenboolean—The Tooltip open state at first, uncontrolled (the Base UI Tooltip defaultOpen).
onOpenChange—Called when the Tooltip opens or closes: hover, focus, a tap, or Escape.
data-slotstring—The data-slot of the root. Default "full-value"; an item that renders it sets its own.
From Base UIUseRenderBase UI docs
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
...props<span> attributes—Every other attribute goes to the <span>, with a ref.
  • Use it for a short number or a cut text.
  • Use quiet when the text is the value and the full value is extra.
  • For text that explains a control, use a Tooltip.
TabMoves focus to the short text, and shows the full value.

A short value is one tab stop, with the focus ring.

A 1px dotted line marks it.

It keeps a 44px touch target.

Built with

Installs with Full Value

Components
Tooltip
  1. AddedFull Value, with Tooltip.
Open the release