Optix UI Kit

Use the code below to create a new canvas. Explore all components available at Kitchen sink page. You can also use any component from Vuetify.

This kit includes:

  • Optix UI components and helpers: via this.$optix or any tag prefixed with optix-
  • Vue 2.6
  • Vuetify 1.5: any tag prefixed with v-
  • Axios 0.18: via this.$axios
  • Lodash 4.17: via this.$_
  • Fonts for web, Android and iOS. Also including Material Icons.

These libraries are embedded to provide long term support to our components and avoid incompatibility.

Always wrap your app in <optix-app> and <div id="app" class="optix-show-on-load"> tags to avoid glitches in canvases.

Canvas boilerplate

<!DOCTYPE html>
<html lang="en">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link href="{{baseURL}}/optix-ui-kit.min.css" rel="stylesheet">
    <script type="text/javascript" src="{{baseURL}}/optix-ui-kit.min.js"></script>
<div id="app" class="optix-show-on-load"> <optix-app> <optix-container> <h2>This is a simple app</h2> <p>{{ message }}</p> <p>{{ apiMessage }}</p> </optix-container> </optix-app> </div>
<!--Include your external files here or use script tag to avoid caching--> <!--link href="myapp.min.css" rel="stylesheet"--> <!--script type="text/javascript" src="myapp.min.js"></script--> <script> new Vue({ el: '#app', data: { message: '', apiMessage: '' }, mounted() { this.$optix.init().then(() => { this.message = 'Hello World! Loaded at ' + new Date(); this.$optix.graphQL( `query me { me { user { name } } }`) .then(result => { const response = result.data; if (response.errors) { const errors = this.$_.map(response.errors, 'message'); this.apiMessage = 'Request failed: ' + errors.join(', '); return; } this.apiMessage = 'Your name is ' + this.$_.get(response, 'data.me.user.name', 'Unknown'); }); }); } }); </script> </body> </html>