Powered by Strand AI
<!-- Import --> import StrandBot from './strand-bot.es.js <!-- Compontent Usage --> <strand-bot isOpen={isOpen} />
<!-- Component --> <strand-bot></strand-bot> <!-- Script --> <script src="./strand-bot.umd.js"></script>
Property | Type | Description |
---|---|---|
isOpen | boolean | Sets if bot is open. |
autoOpen | number | Initiates the bot after a specified duration in milliseconds. |
introType | 'ONE' | 'TWO' | Set's intro type - default is ONE . |
onOpen | function | Open bot callback. |
onClose | function | Close bot callback. |
Property | Type | Description |
---|---|---|
auto-open | number | Initiates the bot after a specified duration in milliseconds. |
introType | 'ONE' | 'TWO' | Set's intro type - default is ONE . |
.open()
const botRef = useRef(null) const open = () => botRef.current.open() return (<strand-bot ref={botRef}></strand-bot>)
.close()
const botRef = useRef(null) const close = () => botRef.current.close() return (<strand-bot ref={botRef}></strand-bot>)
.toggleFullscreen()
const botRef = useRef(null) const toggleFullscren = () => botRef.current.toggleFullscren() return (<strand-bot ref={botRef}></strand-bot>)
.open()
document.querySelector('strand-bot').open()
.close()
document.querySelector('strand-bot').close()
.toggleFullscreen()
document.querySelector('strand-bot').toggleFullscreen()