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.
Web et mobile — le même composant pour React et React Native. Bêta : son API peut encore changer à une version mineure.
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. |
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 3.5.0 : son meta.ts, ses exemples et ses types.Modifier cette documentation sur GitHub