collections
Directional Card Reveal
A card's secondary surface enters from the side where the pointer arrived, making spatial intent part of the reveal.
- collections
- card
- direction
- reveal
- focus
One directional reveal system; direction is an interaction signal, not four cosmetic variants.
Live preview
Quick usage
import { DirectionalCardReveal } from "@pinky-ui/systems";
<DirectionalCardReveal label="Open project" reveal={<ProjectMeta />}>...</DirectionalCardReveal>Presets
Default
Restrained production behaviour.
Default behaviour
Quiet
Reduced intensity for dense product screens.
disabled={true}
Install
Add @pinky-ui/systems as a dependency, or use the CLI to copy this component's source directly into your project — no dependency to manage, fully editable.
npm install @pinky-ui/systemspnpm add @pinky-ui/systemsyarn add @pinky-ui/systemsnpx pinky-ui add directional-card-revealPrefer to run the whole repository locally instead?
git clone https://github.com/florash/Pinky-UI.git
cd Pinky-UI
npm install
npm run devProps
| Prop | Type | Default | Description |
|---|---|---|---|
| reveal | ReactNode | — | Secondary card content revealed from the meaningful entry edge. |
| className | string | — | Styles the outer interaction surface. |
Accessibility
- Keyboard and touch paths match the pointer interaction.
- Stable labels and values remain available without motion.
Performance
- Direction is sampled once on entry; the reveal uses a clipped transform surface.
- The focused and touch states use a stable bottom entry fallback.
Reduced motion
Motion resolves immediately while semantics, focus and state remain unchanged.
When to use
- Cards where the relationship between entry direction and secondary content has meaning
When not to use
- Generic hover elevation or cards with interactive controls inside the surface
Skill
Purpose
Use one directional reveal when the entry edge communicates how a card's secondary surface should arrive. Direction is sampled as an interaction signal; it is not four cosmetic variants.
Interaction anatomy
- Pointer entry chooses the nearest card edge.
- The secondary surface reveals from that edge.
- Focus and touch use a stable bottom-entry fallback.
Good for
Project cards, spatial annotations and compact previews where arrival direction has meaning.
Avoid
Generic hover lift, cards containing nested controls or content that must be visible without activation.
Usage
<DirectionalCardReveal
label="Open the project summary"
reveal={<ProjectMeta />}
>
<ProjectSummary />
</DirectionalCardReveal>Tune
Keep the reveal surface short and preserve the card's core label in the resting DOM. Sample direction once on entry and use a clipped surface instead of a pointer loop.
Accessibility and reduced motion
The card is a labelled button with aria-expanded; Enter, Space, focus and touch all reveal the content. Reduced motion removes clip travel while keeping the revealed state explicit.