Match dialog
The moment two people choose each other — a match, a pair, a deal: the two avatars meet at a heart in the brand gradient, the next step under them.
- Domaine
- Retours et surcouches
- Niveau de support
- Taille
- 10.0 kB gzip, budget 20.0 kB
- Qui l'utilise
- Aucun produit en production ne l'importe encore Compté dans l'inventaire daté du 2026-11-23.
import { MatchDialog } from "@krizaka/ui/match-dialog";Web et mobile — le même composant pour React et React Native. Déprécié : conservé pour les apps qui l'utilisent encore, retiré à sa prochaine version majeure.
Pourquoi il est là. No user: the product it was built for left the organisation and no filed need names it (ADR-006 audit, 2026-10-25): there is no replacement.
Quand l’utiliser
- A mutual like in a dating app.
- Two parties agree: a deal, a duo for a challenge.
Quand ne pas l’utiliser
Installation
Installer
npm install @krizaka/ui @krizaka/tailwind @krizaka/tokens tailwindcssStyles
@import "tailwindcss";
@import "@krizaka/tailwind";
@import "@krizaka/ui/tailwind.css";Importer
import { MatchDialog } from "@krizaka/ui/match-dialog";Exemples
It's a match
Opened at load: the two avatars, the message button.
Props
Two people choose each other: the avatars meet at a heart in the brand gradient, the next step under them.
| Prop | Type | Défaut | Description |
|---|---|---|---|
onOpenChangerequis | (open: boolean) => void | — | Called when it closes. |
onPrimaryrequis | () => void | — | What it does. |
openrequis | boolean | — | Shown (controlled). |
peoplerequis | readonly [{ src?: string | null | undefined; name: string; }, { src?: string | null | undefined; name: string; }] | — | The two people: avatar URLs and names. |
primaryLabelrequis | string | — | The main action (“Send a message”). |
secondaryLabelrequis | string | — | The way back (“Keep swiping”). |
titlerequis | string | — | The headline (“It's a match!”) — passed translated; the dialog's name. |
container | HTMLElement | null | — | Where it is drawn (the page's body by default): give an element inside a brand scope (.brand-…) so the dialog wears the brand too. |
description | string | — | A line under it. |
Accessibilité
- A dialog named by its title, announced when it opens; a success tick on React Native.
- The entrance is skipped under reduced motion.
Clavier
| Touches | Action |
|---|---|
| Esc | Closes it (the way back). |
Bonnes pratiques
- Offer the next step first (“Send a message”), and a way back.
- Keep it rare: it is a celebration.
Composants liés
Générée depuis le code de @krizaka/ui 5.3.4 : son meta.ts, ses exemples et ses types.Modifier cette documentation sur GitHub