2.3.1 • Published 10 months ago

react-leetcode-calendar v2.3.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

React LeetCode Calendar šŸ“…

npm version GitHub stars License

Easily display a LeetCode submission calendar in your React projects! šŸš€
This library provides a GitHub-like activity graph for LeetCode submissions.
Supports fetching and displaying daily coding activity with an auto-provided QueryClient (no extra setup required).


🌟 Features

āœ… Auto-fetches LeetCode submission history
āœ… Displays a visual calendar of coding activity
āœ… Supports yearly and full-history views
āœ… Zero configuration required for React Query
āœ… Lightweight & Easy to Use


šŸ“¦ Installation

Install the package using npm or yarn:

npm install react-leetcode-calendar

# or

yarn add react-leetcode-calendar

šŸš€ Usage

Example 1: Passing both username and graph props

import { Leetcodecalendar } from "react-leetcode-calendar";

const App = () => {
  return (
    <div style={{ background: "#101828", color: "white", display: "flex", justifyContent: "center" }}>
      <Leetcodecalendar username={"saurabhhh777"} graph={"yearly"} />
    </div>
  );
};

export default App;

šŸ‘‡ Example Output

Image

Example 2: Passing only the username prop

import { Leetcodecalendar } from "react-leetcode-calendar";

const App = () => {
  return (
    <div style={{ background: "#101828", color: "white", display: "flex", justifyContent: "center" }}>
      <Leetcodecalendar username={"saurabhhh777"} />
    </div>
  );
};

export default App;

šŸ‘‡ Example Output

Image

šŸŽÆ Props

šŸ“Š How It Works?

  • When graph="yearly" → The last 1 year of data from the current date will be displayed.
  • When no graph prop is provided → It will automatically detect the first & last submission dates and display only that range.

šŸ”— Links

šŸ“œ License

This project is licensed under the MIT License.

⭐ Star this repo if you found it useful! šŸš€ šŸ“¢ Contributions & Issues are welcome!

2.3.0

10 months ago

1.0.2

10 months ago

2.2.0

10 months ago

2.3.1

10 months ago

2.1.0

10 months ago

2.0.0

10 months ago

1.0.3

10 months ago

1.0.1

2 years ago

1.0.0

2 years ago