Memori WebComponent
WebComponent to integrate a Memori in a web page or web app.
Platforms:
Uses memori-react under the hood.
See demo.
Installation from npm
yarn add @memori.ai/memori-webcomponent
npm install @memori.ai/memori-webcomponent
Embed or usage from CDN
<script
type="module"
src="https://unpkg.com/@memori.ai/memori-webcomponent/dist/memori-webcomponent.js"
></script>
Usage
<memori-client
memoriName="Memori"
ownerUserName="nunziofiore"
tenantID="app.memorytwin.com"
showShare
apiURL="https://backend.memori.ai"
baseURL="https://app.memorytwin.com"
uiLang="it"
/>
For more details on attributes, see memori-react component props.
Special note for height
: defaults to 100%
and can be set to a fixed value (e.g. 500px
).
For the best experience, it is recommended to set it to '100vh' (full height of the viewport) or '100svh'.
Initial context
As for memori-react component, it is possible to pass an initial context to the Memori session.
With this WebComponent that is slightly different, as the context is not passed as a JSON but as a string in the context
attribute as comma-separated KEY:VALUE
pairs:
<memori-client ... context="VAR1:VALUE1,VAR2:VALUE2" />
See also