A Svelte wrapper of the github-calendar library to displays GitHub contribution graphs in your Svelte applications.
npm install svelte-github-calendar
<script>
import { GithubCalendar } from 'svelte-github-calendar';
</script>
<GithubCalendar username="yourusername" />
<script>
import { GithubCalendar } from 'svelte-github-calendar';
</script>
<GithubCalendar
username="yourusername"
summary_text="Summary of {name}'s GitHub activity"
global_stats={true}
responsive={true}
tooltips={true}
cache={60}
class="my-custom-class"
/>
Prop | Type | Default | Description |
---|---|---|---|
username |
string |
Required | GitHub username to display calendar for |
summary_text |
string |
undefined |
Custom summary text template. |
proxy |
function |
undefined |
Custom proxy function for API requests |
global_stats |
boolean |
undefined |
Whether to show global statistics |
responsive |
boolean |
undefined |
Enable responsive design |
tooltips |
boolean |
undefined |
Enable hover tooltips |
cache |
number |
undefined |
Cache duration in seconds |
class |
string |
'' |
Additional CSS classes for the container |
You can read more about the props in the original documentation.
This library is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Feel free to: