Pointer Surface
A surface that answers the pointer: a soft light that follows it across a card, a slight tilt toward it, or both. It is the feel of picking a card up off a table, for a grid of choices a reader is weighing (plans, sessions, topics), not for every box on a…
Preview
Rendered from the story the storybook (a11y) CI gate runs axe against — the preview can't show something that hasn't been verified.
Install
Two equivalent paths — the URL works in any shadcn-CLI setup; the alias works once you've registered @interlace in your components.json.
npx shadcn@latest add https://ds.interlace.tools/r/pointer-surface.jsonnpx shadcn@latest add @interlace/pointer-surfaceHistory
This component is at v1.1.0, first shipped in @interlace/ui 2.0.0. The version is stamped as a banner into the file the install writes, so the copy in your tree says which one you have — compare it with the number above before deciding whether to re-run the install.
@interlace/ui 2.0.02 entries
- Addedminor
New PointerSurface and UnderlineLink, motion that answers the reader. PointerSurface wraps a card so a soft
--primarylight follows the pointer, the card leans a few degrees toward it, or both (effect), and keyboard focus inside lights it from the centre; it only runs on a fine pointer that can hover and is still under reduced motion. UnderlineLink is a link whose underline draws in from the inline-start edge on hover and focus, keeps a thin line at rest by default so links are not told apart by colour alone, takes a router link throughrender, and needs no JavaScript.Components - Addedminor
Interlace has one named z-index scale.
interlace-baseadds--z-index-*steps, soz-backdrop,z-base,z-raised,z-sticky,z-header,z-indicator,z-overlay,z-modal,z-popover,z-toast,z-tooltipandz-skip-linkare utilities, and an app retunes the order with--z-index-*on:root. Every component now uses a name instead of a number. Topbar, AppHeader and TabBar sit onz-header, above anything inside the page: before, they werez-10like a Section overlap band, ScrollStory steps and a Dialogue speaker, which tied and painted over the sticky header while scrolling. ScrollStory and Dialogue isolate their own layers. Popover and Tooltip set their layer on the positioner, so it reaches the page, and a select or menu inside a dialog opens above it. Numericz-10and friends still work in your app. Decorative backdrops (Sheen, GradientMesh, GridField, SkyBackdrop, CtaSection and FocusGrid media, the TopbarNav pill) move from-z-10toz-backdrop(-1): if you placed your own layer between -10 and -1 behind one of them, it now paints below the backdrop.Components- @interlace/interlace-base
- @interlace/topbar
- @interlace/app-header
- @interlace/tab-bar
- @interlace/section
- @interlace/scroll-story
- @interlace/dialogue
- @interlace/reading-layout
- @interlace/article-card
- @interlace/timeline
- @interlace/timeline-map
- @interlace/topbar-nav
- @interlace/pull-to-refresh
- @interlace/cta-section
- @interlace/focus-grid
- @interlace/hero-cosmic
- @interlace/sheen
- @interlace/sky-backdrop
- @interlace/grid-field
- @interlace/gradient-mesh
- @interlace/tooltip
- @interlace/drawer
- @interlace/dropdown-menu
- @interlace/toast
- @interlace/dialog
- @interlace/alert-dialog
- @interlace/combobox
- @interlace/sheet
- @interlace/popover
- @interlace/context-menu
- @interlace/select
- @interlace/reading-strand
- @interlace/card
- @interlace/skip-link
- @interlace/order-game
Import
2 named exports — pull the parts you need.
import { PointerSurface, PointerSurfaceEffect } from '@/components/ui/effects/pointer-surface';API reference
Parsed from the type declarations in the source — the same file the install writes into your tree, so this table can't drift from the component you get.
PointerSurfaceProps
Also accepts every <div> attribute.
| Prop | Type | Description |
|---|---|---|
| effect | PointerSurfaceEffect | What follows the pointer: a soft `light`, a slight `tilt`, or `both`. @default 'light' |
| max | number | The tilt at the edge of the surface, in degrees. Kept small on purpose. @default 4 |
Accessibility
Every story for this component is rendered headlessly and checked with axe-core (wcag2aa, wcag22aa, best-practice, ACT) on every PR. That gate has no continue-on-error, so what ships has zero known violations.
What follows is what static analysis can see. Axe cannot press a key and never sees an overlay open, so the operable-without-a-mouse claim lives in Behavior instead, where the keyboard path is replayed step by step.
- Focus + keyboard behaviour
- Native element semantics — no interaction layer to get wrong.
- Focus ring (WCAG 2.2 SC 2.4.13)
- Not focusable — no focus indicator required.
- Reduced motion
- Animation is gated on prefers-reduced-motion.
- ARIA in the source
aria-hidden
Examples
1 more state from the same story file.
R-rule compliance
Every primitive in @interlace/ui models to the portable 26-rule floor enforced by the componentApi ESLint preset. The cells below pin exactly where each rule applies in this file.
| Rule | Concept | Where |
|---|---|---|
| R4 | Extends native el | `div` props |
| R6 | data-slot per part | pointer-surface / -light |
| R7 | cn + ...rest | `cn(…, className)` + `{...props}` |
| R8 | Enums, not booleans | `effect` |
| R19 | Tokens only | `--primary`, `--duration-*`, `--ease-*` |
| R25 | Client component | pointer tracking |
| R26 | A11y | decorative layer hidden; focus lights it too |
Dependencies
- Base UI primitive
- Native / no Base UI dependency
- Lucide icons
- none
- NPM dependencies
- none
- Registry dependencies
Source
The full implementation — components/ui/effects/pointer-surface.tsx once installed.
'use client';
import * as React from 'react';
// @interlace/pointer-surface v1.1.0 — Interlace design system.
// Docs, props and live preview: https://ds.interlace.tools/c/pointer-surface
// What changed since: https://ds.interlace.tools/c/pointer-surface#history
// Generated banner — keep it, the upgrade diff reads this version.
/**
* @interlace/ui — PointerSurface
*
* A surface that answers the pointer: a soft light that follows it across a
* card, a slight tilt toward it, or both. It is the feel of picking a card up
* off a table, for a grid of choices a reader is weighing (plans, sessions,
* topics), not for every box on a page.
*
* ## Content first
*
* The children render as they are, in the server HTML. The light is a
…148 more lines…Registry JSON
The raw registry record — what the shadcn CLI fetches.