docs menueight codes
RecoveryCodes
A grid of one-time recovery codes with a "copy all" button.
import { RecoveryCodes } from "@meowerse/ui"; · source packages/ui/src/components/RecoveryCodes.tsx
variants and states
- b7qk-2m9x
- t4nw-8rd3
- h2vc-6yp1
- m9zs-4kt7
- q3lf-7bn2
- w8xd-1gj5
- e6pr-3hm8
- u1ty-9cs4
try it
- b7qk-2m9x
- t4nw-8rd3
- h2vc-6yp1
- m9zs-4kt7
- q3lf-7bn2
- w8xd-1gj5
- e6pr-3hm8
- u1ty-9cs4
working: loading the demo…
demo source
import { RecoveryCodes } from "@meowerse/ui";
export default function Demo() {
return <div className="demo"><RecoveryCodes codes={["b7qk-2m9x", "t4nw-8rd3", "h2vc-6yp1", "m9zs-4kt7", "q3lf-7bn2", "w8xd-1gj5", "e6pr-3hm8", "u1ty-9cs4"]} /></div>;
}
props
| prop | type | default | required |
|---|---|---|---|
codes | string[] the codes to show, exactly as issued. | — | yes |
className | string extra class names to append. | — | no |
css custom properties
| variable | dark | light |
|---|---|---|
--c-line | #232326 | #cfcec8 |
--font-mono | "JetBrains Mono", "JetBrains Mono Fallback", ui-monospace, "SFMono-Regular", Menlo, monospace | same |
--fs-3 | 0.875rem | same |
--r-m | 4px | same |
--sp-2 | 8px | same |
--sp-3 | 12px | same |
Classes: .mw-recovery. Set any of these variables on an ancestor (or wrap a subtree in .mw-theme--dark / .mw-theme--light) to restyle just that part of a page.
usage
eight codes
import { RecoveryCodes } from "@meowerse/ui";
<RecoveryCodes codes={["b7qk-2m9x","t4nw-8rd3","h2vc-6yp1","m9zs-4kt7","q3lf-7bn2","w8xd-1gj5","e6pr-3hm8","u1ty-9cs4"]} />accessibility
- The codes are a list, shown exactly as issued.
- "copy all" gives no feedback yet (audit U-19); that is fixed in the accounts redesign (sub-project 3).
do and don't
do
- Show codes once, right after they are made, and say they won't be shown again.
don't
- Don't send codes by email or show them again later.