Skip to content

iamprompt/flex-render

Repository files navigation

@iamprompt/flex-render

Utility to render LINE Flex Bubble / Carousel JSON for displaying in website.

Installation

pnpm add @iamprompt/flex-render

Usage

You can input Flex Bubble / Carousel JSON from Flex Message Simulator directly to render function / FlexPreview component.

const flexJSON = {
  "type": "bubble",
  "body": {
    "type": "box",
    "layout": "vertical",
    "contents": [
      {
        "type": "text",
        "text": "Brown Cafe",
        "weight": "bold",
        "size": "xl"
      }
    ]
  }
}

Node.js

import { render } from '@iamprompt/flex-render';

render(flexJSON)

React

import { FlexPreview } from '@iamprompt/flex-render/react';

<FlexPreview json={flexJSON} />

Vue

import { FlexPreview } from '@iamprompt/flex-render/vue';

<FlexPreview :json="flexJSON" />

You can see the example in apps directory.

Bugs

If you find a bug, please file an issue on our issue tracker on GitHub.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published