0.0.8 • Published 8 months ago

opencopilot-ui v0.0.8

Weekly downloads
-
License
ISC
Repository
github
Last release
8 months ago

OpenCopilot frontend library

This is an embeddable front-end for OpenCopilot.

If you are looking for the repository of the OpenCopilot Python framework, see opencopilotdev/opencopilot.

Usage

npm install opencopilot-ui
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- Include your library -->
    <script src="node_modules/opencopilot-ui/opencopilot.js"></script>
</head>
<body>
    <!--  position this div however you like  -->
    <div id="embedded" style="width: 100vw; height: 100vh;"></div>

    <script>
        // Initialize your component
        OpenCopilot.initialize({
            elementId: "embedded", // The argument is the id of the element where the component should be rendered
            theme: "light",
            apiUrl: "http://localhost:3000/", // Optional, defaults to the base URL this is rendered on
            // authToken: "", // If auth is enabled in backend need to input JWT here
            isDebug: true, // Boolean, determines if debug mode is active or not
        });
    </script>
</body>
</html>

Use with CDN

Import the latest version from CDN

<script src="https://unpkg.com/opencopilot-ui/opencopilot.js"></script>

Import a specific version from CDN

<script src="https://unpkg.com/opencopilot-ui@0.0.2/opencopilot.js"></script>
0.0.8

8 months ago

0.0.5

8 months ago

0.0.4

8 months ago

0.0.7

8 months ago

0.0.6

8 months ago

0.0.3

8 months ago

0.0.2

8 months ago

0.0.1

8 months ago