Type-safe React component for giscus π
giscus is a lightweight comments widget built on GitHub issues, for blog comments, wiki pages and more.
- π Pure TypeScript and TSX with type definitions
- π Multiple modules, providing
ES modulesandCommonJS
Follow the instructions on the main website and use the
data attributes of the shown <script> tag as the props to the Giscus
component.
import { Giscus } from '@giscus/react';
...
<Giscus
repo="..."
repoId="..."
category="..."
categoryId="..."
mapping="..."
term="..."
reactionsEnabled="..."
emitMetadata="..."
theme="..."
/>npm i @giscus/react
# or
yarn add @giscus/reactThe module that bundles the dependencies is obtained from skypack.
Import it like this:
import { Giscus } from 'https://cdn.skypack.dev/@giscus/react'Contributions, issues and feature requests are welcome! Feel free to check out the repository.
Give a βοΈ if this project helped you!
Copyright Β© 2021-present TomokiMiyauci, forked by laymonage for giscus.
Released under the MIT license.