Skip to content
Calm motion: animations on this site only fade, with no movement

Flashcards ​

Cards with a question and an answer, to learn by memory

Shows one card at a time. The learner tries to remember the answer, then shows it. For questions with choices and a score, use the quiz.

Basic

Card 1 of 4

  • cards is a list of cards. Each card has a front and a back.
  • A click on the card, or on "Show the answer", shows the back under the front. Screen readers hear the answer.
  • After the answer shows, the learner picks "I know it" or "Again". "Again" puts the card at the end of the deck, so it comes back.
  • If no cards are left, the deck shows how many cards the learner knew at the first try. It also emits finish with that number and the total. "Start again" goes back to the full deck.
  • Each answer emits answer with the card, true for "I know it", and whether it was the first try. Use it to plan the next review, for example with Leitner boxes.
  • New cards, for example after they load, start a new round.
  • Change the words with labels or a label pack: flip, know, again, restart, and the functions progress and done.

Usage ​

ts
import { BlessFlashcards } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
cards*BlessFlashcard[]—
labelsPartial<{ flip: string; know: string; again: string; restart: string; progress: (n: number, total: number) => string; done: (known: number, total: number) => string; }>—

Events

NamePayloadDescription
answer[card: BlessFlashcard, know: boolean, first: boolean]
finish[known: number, total: number]

Released under the MIT License. Character names and artwork belong to their owners.