@axaylabs/glim
v0.1.1
Published
Living companions for AI product UIs. One four-state mind (idle → thinking → talking → listening), hand-built creatures, zero dependencies.
Maintainers
Readme
Glim
Living companions for AI product UIs.
One four-state mind — idle, thinking, talking, listening — and a small menagerie of hand-built creatures. Zero dependencies. Drop it into any page or bundle.
Install
npm i @axaylabs/glimOr skip the package manager and load the file:
<script src="https://getglim.dev/glim.js"></script>Quick start
const { Glim } = require('@axaylabs/glim');
// or: import { Glim } from '@axaylabs/glim';
// or: window.Glim from a <script> tag
const p = Glim.mount(document.getElementById('host'), 'wisp', {
size: 160,
theme: 'signal', // signal | aurora | ember | mono | bloom | deep
});
p.setState('thinking'); // idle | thinking | talking | listening
p.say('hey — still with you.');
p.react(0.8); // acknowledgment pulse
p.setTheme('aurora');
p.on('state', (s) => console.log(s));
// p.destroy();Free creatures (MIT)
dots · orb · ring · bars · grid · caret · pulse · wisp
Glim.freeTypes // → those eight
Glim.types // → every body registered in the buildMore creatures are try-before-buy on the demo; unlock with Pro.
API
| Call | What it does |
| --- | --- |
| Glim.mount(el, type, opts?) | Attach a companion to an element |
| p.setState(state) | Drive the four-state mind |
| p.say(text) | Speak a line (enters talking) |
| p.react(amount?) | Short attention spike |
| p.setTheme(name\|palette) | Swap mood colors |
| p.cycle() | Advance to the next state |
| p.on(event, fn) | Listen (state, …) |
| p.destroy() | Tear down |
Mount options: size, theme, state, say.
Why Glim
Most AI UIs go quiet while the model thinks. Glim keeps a presence on screen — the same mind, different bodies — so your product feels alive without shipping another chat widget.
License
MIT for the free tier and core API. See getglim.dev for Pro / Team.
