https://github.com/nebrelbug/react-admonitions
An admonitions React component, ported from remarkable-admonitions. Perfect for Docusaurus v2 and other React-based doc generators
https://github.com/nebrelbug/react-admonitions
admonitions alert hints react-component
Last synced: 11 months ago
JSON representation
An admonitions React component, ported from remarkable-admonitions. Perfect for Docusaurus v2 and other React-based doc generators
- Host: GitHub
- URL: https://github.com/nebrelbug/react-admonitions
- Owner: nebrelbug
- Created: 2019-08-29T03:38:52.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-09-15T22:11:32.000Z (over 5 years ago)
- Last Synced: 2025-03-18T12:59:20.681Z (12 months ago)
- Topics: admonitions, alert, hints, react-component
- Language: JavaScript
- Homepage: https://nebrelbug.github.io/react-admonitions/
- Size: 1.95 MB
- Stars: 11
- Watchers: 2
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-admonitions
> An admonitions React component, ported from remarkable-admonitions. Perfect for Docusaurus v2 and other React-based doc generators.
[](https://www.npmjs.com/package/react-admonitions) [](https://standardjs.com) [](https://travis-ci.com/nebrelbug/react-admonitions)
**TL;DR**
Nice-looking hints, warnings, etc. specifically targeted toward Docusaurus docs websites.
Test the component out [on Stackblitz](https://stackblitz.com/edit/react-admonitions), or view the [demo](https://nebrelbug.github.io/react-admonitions/)
## Install
```bash
npm install --save react-admonitions
```
## Screenshots

## Usage
```jsx
import React, { Component } from 'react'
import Admonition from 'react-admonitions'
class Example extends Component {
render() {
return (
Admonition Content
)
}
}
```
## Props
| Name | Default | Description |
| -------------- | ------- | ---------------------------------------------------------------------------------------------------------------------- |
| **`type`** | none | What type of admonition you want to display. Valid options: `"warning"`, `"tip"`, `"caution"`, `"note"`, `"important"`, `"question"` |
| **`iconType`** | `"svg"` | The type of admonition icon. Valid options: `"svg"`, `"emoji"` |
| **`title`** | none | The, well, title of the admonition |
## Credits
HTML, styles, and concept all come from the amazing Markdown plugin by [@favoloso](https://github.com/favoloso), [remarkable-admonitions](https://github.com/favoloso/remarkable-admonitions).
## License
MIT © [nebrelbug](https://github.com/nebrelbug)