leetcode-card v1.0.1
LeetCode Stats Card
Show your dynamically generated LeetCode stats on your GitHub profile or your website!
LeetCode and LeetCode CN are both supported.
Features
- 📈 Clean and simple LeetCode stats, for both
usandcnsites - 🎨 Multiple themes and 1,300+ fonts - Theme, Font
- 🪄 Fully customizable using CSS - Custom Stylesheets
- ⚡️ Fast and global edge network - Cloudflare Workers
- 🚫 No tracking, controlable cache - Cache
- 🍀 Open source - MIT License
- ⚙️ Extended-cards:
activity,contest,heatmap
It also has a NPM package and a highly extensible system, so you can easily customize it to your needs.
CLI tool will be created if I have time. Want to contribute? Feel free to open a pull request!
Usage
Simply copy the code below, paste it into your README.md, and change the path to your leetcode username (case-insensitive).
Congratulation! You are now showing your LeetCode stats on your profile!
Want a hyperlink? Try this:
[](https://leetcode.com/JacobLinCool)Endpoint
The endpoint of this tool is:
https://leetcard.jacoblin.cool/
The legacy one: https://leetcode.card.workers.dev/
Options
There are many options, you can configure them by passing a query string to the endpoint.
site (default: us)
Data source, can be us or cn.
theme (default: light,dark)
Card theme, see Theme for more information.
Use a comma to separate the light and dark theme.

font (default: Baloo_2)
Card font, you can use almost all fonts on Google Fonts.
It is case-insensitive, and you can use font=dancing_script or font=Dancing%20Script to get the same result.
width and height (default: 500 and 200)
Change the card size, it will not resize the content.
But it will be helpful if you want to use custom css.
border and radius (default: 1 and 4)
Change the card border and radius.
animation (default: true)
Enable or disable the animation.
hide (default: "")
Hide elements on the card, it is a comma-separated list of element ids.
ext (default: "")
Extension, it is a comma-separated list of extension names.
NOTICE: You can only use one of extended-card extensions (activity, contest, heatmap) at a time now, maybe they can be used together in the future.
Animation, font, theme, and external stylesheet are all implemented by extensions and enabled by default.
Want to contribute a nyan-cat extension? PR is welcome!
cache (default: 60)
Cache time in seconds.
Note: it will not be a good idea to set it to a long time because GitHub will fetch and cache the card.
You can make
DELETErequest to/:site/:usernameto delete the cache.
sheets (default: "")
External stylesheet, it is a comma-separated list of urls.
You can upload your custom CSS to gist and use the url.
They will be injected in the order you specified.
Legacy Options
Still work, but deprecated.
| Key | Description | Default Value |
|---|---|---|
border_radius | Same as radius | 4 |
show_rank | Display/Hide Rank: Boolean | true |
extension | Same as ext | "" |
Themes
Now we have 6 themes. If you have any great idea, please feel free to open a PR!
Light
Dark
Nord
Forest
WTF
Unicorn
Fonts
You can now use almost all fonts on Google Fonts.
Some examples:
Milonga
Patrick Hand
Ruthie
Extensions
Extension, it is a comma-separated list of extension names.
NOTICE: You can only use one of extended-card extensions (activity, contest, heatmap) at a time now, maybe they can be used together in the future.
Animation, font, theme, and external stylesheet are all implemented by extensions and enabled by default.
Want to contribute a nyan-cat extension? PR is welcome!
activity
Show your recent submissions.
contest
Show your contest rating history.
heatmap
Show heatmap in the past 52 weeks.
