My App
LoopKitFrontend

Frontend Overview

Overview of the @loopkit/react package

The @loopkit/react package provides React hooks and pre-styled components for building flashcard study interfaces.

Philosophy

LoopKit follows a headless-first approach:

  1. Hooks expose all state and actions — use them for fully custom UIs
  2. Components are optional pre-styled wrappers around hooks — use them for rapid prototyping

Every component can be replaced by your own implementation using the underlying hook.

What's Included

Hooks

HookPurpose
useReviewSessionComplete study session state machine
useDeckSingle deck with card counts
useDecksList all decks
useDeckTreeHierarchical deck tree
useCardSingle card with rendered content
useCardEditorCreate and update notes
useNoteTypesList available note types
useStatsDeck statistics
useImportCSV and JSON import
useExportCSV and JSON export
useTagsList all tags

Components

ComponentDescription
<ReviewSession>Full study session UI
<CardViewer>Card front/back with flip
<GradeButtons>Grade selection buttons
<SessionComplete>Session summary display
<DeckList>Flat deck list
<DeckOverview>Single deck overview
<DeckTree>Hierarchical deck browser
<CardEditor>Note creation/editing form
<StudyStats>Statistics charts

Peer Dependencies

{
    "react": "^18.0.0 || ^19.0.0",
    "react-dom": "^18.0.0 || ^19.0.0"
}

On this page