1.1.0 • Published 4 years ago

react-cui v1.1.0

Weekly downloads
209
License
MIT
Repository
github
Last release
4 years ago

React CUI

React wrapper for CUI Typeform render.

What the h*ll is this?

CUI screenshot

At Typeform, we created a new (and we hope) useful way to render your forms, in a more conversational way.

And this is it. If you're not part of our Alpha test yet, join us!

Installation

  1. Add the script yarn add react-cui or npm install --save react-cui
  2. Import it
import Cui from 'react-cui'

<Cui uid='abc123' />

Reference

  • uid {string} - Typeform form ID
  • height {number,string} - The height of the embed after the conversation starts
  • avatar {string} - url of the avatar for the conversation
  • theme {string} - color of the main theme color for the embed, access any type of color format

Events API

  • cui:init with the payload: { uid }
  • cui:reply with the payload: { answer }
  • cui:completed with the payload: { answers }

Example

<div class="cui-embed" id="cui-event" data-cui-uid="abcdfe"></div>
const embedElement = document.getElementById('cui-event')
embedElement.addEventListener('cui:reply', function (e) {
  console.log('reply event', e.detail)
})
1.1.0

4 years ago

1.0.5

5 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago