Skip to content

Reckue/wordbook-widget

Repository files navigation

Wordbook Widget

NPM Version GitHub License

📌 About

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.

🚀 Installation

To install the package, use npm or yarn:

npm install reckue-wordbook-widget
# or
yarn add reckue-wordbook-widget

📦 Available Components

The library exports multiple components that can be used in your application:

LevelComponent

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} />;
};

LevelWidget

A higher-level widget that combines the LevelComponent with additional functionalities.

Usage:

import { LevelWidget } from "reckue-wordbook-widget";

const MyApp = () => {
  return <LevelWidget />;
};

📖 Documentation

For more details, visit the GitHub Repository.

🛠 Development

To set up a local development environment:

git clone https://github.com/Reckue/wordbook-widget.git
cd wordbook-widget
npm install
npm run dev

📜 License

This project is licensed under the MIT License.

About

Reckue wordbook widget

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors