Wordbook Widget is a React component library for managing vocabulary words interactively. Designed for seamless integration into learning applications, it provides tools to visualize, track, and modify word difficulty levels.
To install the package, use npm or yarn:
npm install reckue-wordbook-widget
# or
yarn add reckue-wordbook-widgetThe library exports multiple components that can be used in your application:
Renders an interactive level selector for words, allowing users to update their familiarity with a word.
Props:
| Prop | Type | Description |
|---|---|---|
levelFromServer |
number |
Initial level of the word (1-4). |
addToUpdate |
(level: number) => void (optional) |
Callback function triggered when the level is updated. |
isClicked |
React.MutableRefObject<boolean> (optional) |
Reference for tracking user interaction. |
updateLevels |
() => Promise<void> (optional) |
Callback for updating levels externally. |
Usage:
import { LevelComponent } from "reckue-wordbook-widget";
const MyComponent = () => {
return <LevelComponent levelFromServer={2} />;
};A higher-level widget that combines the LevelComponent with additional functionalities.
Usage:
import { LevelWidget } from "reckue-wordbook-widget";
const MyApp = () => {
return <LevelWidget />;
};For more details, visit the GitHub Repository.
To set up a local development environment:
git clone https://github.com/Reckue/wordbook-widget.git
cd wordbook-widget
npm install
npm run devThis project is licensed under the MIT License.