plextera-support-widget
v0.0.39
Published
Support Widget by Plextera Studio
Readme
Support Widget by Plextera Studio
This widget represents a Web Component, so it works in any major framework or with no framework at all and runs in any browser supporting the Custom Elements specification.
Getting Started
To use Support Widget on any website, inject this into your HTML:
<script type="module" src="https://unpkg.com/plextera-support-widget"></script>
<pl-assistant></pl-assistant>This will only load the necessary scripts needed to render <pl-assistant />.
You can also import the script as part of your node_modules in your applications entry file:
import 'plextera-support-widget';In a React + TypeScript environment you may need to create declarations.d.ts file in root folder for custom tag definition:
import { JSX as PlexteraJSX } from "plextera-support-widget/loader";
declare global {
namespace JSX {
interface IntrinsicElements extends PlexteraJSX.IntrinsicElements {}
}
}In Angular Web Components could be enabled following way:
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
@NgModule({
...
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}Component Attributes
| Attribute | Description | Type | Default |
| -------------------------- | -------------------------------------------------------------------------------- | -------- | -------------- |
| customer | Host application name | string | "Plextera" |
| token | API token. Required | string | |
| client | Organization name. Required | string | |
| email | Contact email. Required | string | |
| contact-name | Contact name. Required | string | |
| open-btn-color | Open button color | string | "#808080" |
