Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rfoel/use-shiki
React hook for using Shiki syntax highlighter
https://github.com/rfoel/use-shiki
react shiki
Last synced: 4 days ago
JSON representation
React hook for using Shiki syntax highlighter
- Host: GitHub
- URL: https://github.com/rfoel/use-shiki
- Owner: rfoel
- License: mit
- Created: 2022-10-27T20:48:20.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-06T12:18:20.000Z (over 1 year ago)
- Last Synced: 2024-10-07T13:36:14.213Z (about 1 month ago)
- Topics: react, shiki
- Language: TypeScript
- Homepage:
- Size: 461 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# use-shiki
> React hook for using Shiki syntax highlighter
[![npm](https://img.shields.io/npm/v/use-shiki)](https://www.npmjs.com/use-shiki)
[![npm bundle size](https://img.shields.io/bundlephobia/minzip/use-shiki)](https://www.npmjs.com/use-shiki)
[![NPM](https://img.shields.io/npm/l/use-shiki)](LICENSE)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)## Usage
```jsx
import useShiki, { setCDN } from 'use-shiki'setCDN('https://unpkg.com/shiki/')
function App() {
const highlighter = useShiki({ theme: 'dracula', langs: ['jsx'] })return (
)
}export default App
```## Contributing
Issues and pull requests are welcome.
## License
[MIT](https://github.com/rfoell/use-shiki/blob/main/LICENSE)