flex-render-react
Version:
React components for rendering LINE Flex Message
43 lines (31 loc) • 887 B
Markdown
for displaying in website.
```bash
pnpm add flex-render-react
```
You can input Flex Bubble / Carousel JSON from [Flex Message Simulator](https://developers.line.biz/flex-simulator) directly to `FlexPreview` component.
```tsx
import 'flex-render-react/css';
import { FlexPreview } from "flex-render-react";
const flexJSON = {
"type": "bubble",
"body": {
"type": "box",
"layout": "vertical",
"contents": [
{
"type": "text",
"text": "Brown Cafe",
"weight": "bold",
"size": "xl"
}
]
}
}
<FlexPreview json={flexJSON} />
```
You can see the example in [apps](../../apps/) directory.
If you find a bug, please file an issue on [our issue tracker on GitHub](https://github.com/iamprompt/flex-render/issues).
Utility to render LINE Flex Bubble / Carousel JSON