Hiyve Components - v1.0.0
    Preparing search index...

    Props for DeckPlayer.

    interface DeckPlayerProps {
        autoAdvanceMs?: number | null;
        colors?: Partial<GameColors>;
        game?: string;
        instructions?: false | GameInstructions | readonly GameInstructions[];
        labels?: Partial<GameLabels>;
        mascot?: false | MascotName;
        maxTries?: number;
        names?: Partial<IntervalNames>;
        onAgain?: () => void;
        onAnother?: () => void;
        onContinue?: () => void;
        onDeckCompleted?: (summary: DeckSummary, record: DeckRecord) => void;
        onError?: (error: Error) => void;
        onResult?: (result: GameResult) => void;
        onRoundSettled?: (round: DeckRound, index: number) => void;
        player?: { id: string; name?: string };
        readAloud?: false | "auto" | "button";
        resultStore?: ResultStore;
        retryUntilRight?: boolean;
        samples?: SampleSource;
        scoreExtraActions?: ReactNode;
        scoreLabels?: Partial<DeckScoreCardLabels>;
        scorePrimary?: "again" | "continue";
        seed: number;
        settings: DeckSettings;
        showInstructionsFirst?: boolean;
        showScore?: boolean;
        sounds?: boolean;
        speak?: (text: string) => void | Promise<void>;
        sx?: SxProps<Theme>;
        theoryNames?: Partial<TheoryNames>;
    }

    Hierarchy (View Summary)

    Index

    Properties

    autoAdvanceMs?: number | null

    Move on by itself this long after a right answer, in milliseconds; null waits for the button (default)

    colors?: Partial<GameColors>
    game?: string

    The game's name, stamped on its results (default: the kinds of its cards)

    instructions?: false | GameInstructions | readonly GameInstructions[]

    How to play, shown from the help button and on first play (default: made from the kinds of cards; false hides the help button)

    labels?: Partial<GameLabels>
    mascot?: false | MascotName

    The mascot who reacts to answers (default: 'owl'; false for none)

    maxTries?: number

    With retryUntilRight, the goes a card gets before it is settled and its answer shown (default: 3; Infinity for no end)

    names?: Partial<IntervalNames>
    onAgain?: () => void

    Play again from the score card: called in place of dealing the same cards again — to deal fresh ones, change seed (default: the same deck again)

    onAnother?: () => void

    Another deck with the same settings; the score card shows the button when given

    onContinue?: () => void

    Move on from the score card: it shows a Continue button with a forward arrow when given (see scorePrimary)

    onDeckCompleted?: (summary: DeckSummary, record: DeckRecord) => void

    The deck was finished, or ended early

    onError?: (error: Error) => void
    onResult?: (result: GameResult) => void

    A result was made, whether or not a store kept it

    onRoundSettled?: (round: DeckRound, index: number) => void

    A round was settled

    player?: { id: string; name?: string }

    Who is playing, stamped on results

    readAloud?: false | "auto" | "button"

    Read each card's question aloud, for players who cannot read it yet: as each card opens and from a speaker button ('auto'), only from the button ('button'), or never (default: false). A card that plays a sound itself (a listening or tapping card) is not read as it opens, so the two never sound at once; its button still reads it.

    resultStore?: ResultStore

    Where results go; nothing is kept without it

    retryUntilRight?: boolean

    After a wrong answer, let the player try again (default: true) — up to maxTries goes, and only once on a card of two choices, after which the round is settled and its right answer shown; otherwise one answer settles the round. A card judged move by move (a catch, a hop, a memory match) goes on until it is done

    samples?: SampleSource

    Recorded piano samples for the notes the cards play (see UseGameSoundsOptions); without them a small built-in voice plays

    scoreExtraActions?: ReactNode

    Buttons of your own on the score card, after its usual ones

    scoreLabels?: Partial<DeckScoreCardLabels>
    scorePrimary?: "again" | "continue"

    Which score-card button is the main, filled one (default: Continue when onContinue is given, else Play again)

    seed: number
    settings: DeckSettings
    showInstructionsFirst?: boolean

    Show how to play before the first card (default: false)

    showScore?: boolean

    Show points, stars and streak as the game goes (default: true)

    sounds?: boolean

    Sound notes as they are placed, and a tone on right and wrong (default: true)

    speak?: (text: string) => void | Promise<void>

    Your own voice for the questions, in place of the device's: play the words and resolve when done

    sx?: SxProps<Theme>
    theoryNames?: Partial<TheoryNames>