Skip to content
Sola AIR v2.0.0 • Ambient Intent Runtime / 37 Primitives

Your UI shouldn't wait to be asked.

Sola Sentinel watches what people do on the page and $intent can offer a suggestion before they ask. Compile .sola components to plain DOM calls, or mount a persistent Shadow DOM shell across any existing app or multi-page portal.

Get started Browse components
$ npm create sola@latest
7.8 kB gzipped core runtime • Compiles to plain DOM calls • Drops into any page via Shadow DOM
Sentinel · observing

Type into a field, then stop for a moment. The observation and the gate are the real Sentinel from @sola-air-ui/sentinel, watching this form the same way observe() would watch any of yours — no per-field wiring below. The suggestion itself is resolved locally so this page needs no API key.

Suggestion
Nothing yet — the form has not been touched.
Observer buffer flow 99.8
  • · idle
mountShell() • Closed Shadow DOM Overlay

Drop an ambient companion into any existing web app.

You don't have to rewrite your portal to adopt Sola AIR. mountShell() mounts any compiled component inside a closed shadow root, so host CSS can't reach it. On the right, it is mounting a real IntentCard next to this page's own markup.

https://ops-portal.internal/incidents/INC-0049218
Host page + #sola-home-companion
Existing Host Document

Operations Queue • Active Incidents

Inspect ticket:

In a multi-page portal, keep the shell's state in $persist and run the same mountShell() bootstrap on every page.

Sola Companion Shell

Ambient Intent Resolution
Suggested Runbook: RB-402 Drain & scale pool
Real Table (page DOM) and IntentCard (shadow root) Open Simulator →

Compiler X-Ray: the source, what the compiler emits, and the result

0 signal writes
1. Source ClusterCardDemo.sola
<script>  // The homepage's Compiler X-Ray shows this file and the compiler's real output  // for it, generated at build time. Keep the bindings direct ({rps}, {util}) so  // what the X-Ray shows is a text-node update, not a child re-mount.  let rps = $state(1420);  let util = $derived(Math.min(100, Math.round(rps / 20)));   $on('sola:compiler-rps', (e) => {    if (e && typeof e.rps === 'number') rps = e.rps;  });</script> <div class="cluster-card">  <span class="label">Cluster Throughput</span>  <span class="value">{rps} req/s</span>  <span class="trend">{util}% capacity</span>  <div class="track" aria-hidden="true">    <div class="fill" style="width: {util}%"></div>  </div></div> <style>  .cluster-card {    display: flex;    flex-direction: column;    gap: 6px;    font-family: ui-sans-serif, system-ui, sans-serif;  }  .label {    font-size: 12px;    font-weight: 600;    text-transform: uppercase;    letter-spacing: 0.04em;    color: var(--sola-text-secondary, #475569);  }  .value {    font-size: 28px;    font-weight: 800;    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;    color: var(--sola-text-primary, #0f172a);  }  .trend {    font-size: 12px;    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;    color: var(--sola-text-secondary, #475569);  }  .track {    height: 10px;    margin-top: 6px;    border-radius: 999px;    background: var(--sola-surface-2, #e2e8f0);    overflow: hidden;  }  .fill {    height: 100%;    border-radius: 999px;    background: linear-gradient(90deg, #38bdf8, #2563eb, #9333ea);    transition: width 220ms cubic-bezier(0.16, 1, 0.3, 1);  }</style>
2. Compiler output compiler v1.5.4
  2  import { createSignal, createDerived, createEffect, createIntent, createData, createPersistentSignal, onMount, onDestroy, pushContext, popContext, __flush_mounts, __flush_destroys, __untrack, bus as __solaBus } from '@sola-air-ui/core'; 64  const [rps, set_rps] = createSignal(1420); 65  const util = createDerived(() => Math.min(100, Math.round(rps() / 20))); 89  createEffect(() => { e4.textContent = String((rps()) ?? ''); }); 98  createEffect(() => { e7.textContent = String((util()) ?? ''); });109  createEffect(() => { n10.setAttribute('style', String("width: " + (util()) + "%")); });

The 6 reactive lines of 121. Each createEffect rewrites one text node or attribute when the signals it reads change.

3. Mounted 7.8 kB gzipped core

The slider sends sola:compiler-rps on the event bus; the component's $on handler sets rps.

What's here

From idea to a live preview

Three tools for designing, previewing and reading Sola components.

Sola Design Studio

Arrange 22 real @sola-air-ui/ui components on a grid, edit their props, and export the result as a .sola file. Arc can draft a layout from one sentence.

Launch Studio

Sola AIR Chrome extension

A Chrome extension that drops a Sola component into any page you have open, inside a closed Shadow DOM so its styles don't touch the page.

Try in Simulator

Written in Sola

A three-step tour: a counter, a task list and an incident feed, each shown as its .sola source, the code the compiler writes, and the running result.

Take the tour
$persist • $on • $lastEvent

State that outlives the page. Events that never get dropped.

A drawer or chat panel on a multi-page site loses its state on every full page load. $persist keeps a value in storage and syncs it across tabs. Events go through a separate bus, because a signal ignores a write that equals its current value and an event must not.

BusDemo.sola the file running on the right
<script>
  // $persist is a $state that is kept in sessionStorage and synced across tabs.
  let asks = $persist('home.demo.asks', 0);

  // The latest payload of an event, as a reactive value.
  let last = $lastEvent('sola:ask');

  // Runs on every 'sola:ask', including repeats of the same question.
  $on('sola:ask', () => { asks = asks + 1; });
</script>

<div class="demo">
  <p class="row"><span>Questions asked</span> <strong id="demo-count">{asks}</strong></p>
  <p class="row"><span>Latest question</span> <strong id="demo-last">{last?.text ?? 'nothing yet'}</strong></p>
</div>

<style>
  .demo { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; display: grid; gap: 10px; }
  .row { margin: 0; display: flex; justify-content: space-between; gap: 16px; color: #475569; }
  .row strong { color: #0f172a; }
  :global(.dark) .row, :global(.dark) .note { color: #94a3b8; }
  :global(.dark) .row strong, :global(.dark) .pill { color: #f8fafc; }
</style>
  • Emit the same question twice and the count goes up twice. Nothing is deduplicated.
  • Remount the component: the count survives, because it is a $persist, but "latest question" resets, because events are not stored unless you make them sticky.
  • Reload the page, or open it in a second tab: the count is kept for this tab and mirrored to the other.
  • Emitted from this page: 0
$data • Live data

Read live data as a signal.

$data asks the Sola Relay for rows from PostgreSQL, MySQL or a Google Sheet and gives your markup a signal with loading, data and error. The relay runs on your machine or network, so database credentials stay out of the browser.

DataSheetDemo.sola the file running on the right
<script>
  // Rows from a Google Sheet through the Sola Relay, fetched again every 15 seconds.
  // Each row is an object keyed by the sheet's header row.
  let rows = $data("sheet://demo-finance", { refresh: "15s" });
</script>

<div class="panel">
  {#if rows().loading}
    <p class="note">Loading…</p>
  {/if}
  {#if rows().error}
    <p class="error">{rows().error}</p>
  {/if}
  {#if rows().data && rows().data.length}
    <table>
      <thead><tr><th>Month</th><th>MRR</th></tr></thead>
      <tbody>
        {#each rows().data as row}
          <tr><td>{row.month}</td><td>${row.mrr}</td></tr>
        {/each}
      </tbody>
    </table>
    <p class="note">Fetched at {rows().data[0].updatedAt} UTC</p>
  {/if}
  <button id="data-refetch" onclick={() => rows.refetch()}>Fetch again</button>
</div>

<style>
  .panel { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; display: grid; gap: 10px; color: #0f172a; }
  table { width: 100%; border-collapse: collapse; }
  th, td { text-align: left; padding: 6px 4px; border-bottom: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
  th { font-weight: 600; color: #475569; }
  .note { margin: 0; font-size: 12px; color: #475569; }
  .error { margin: 0; color: #b91c1c; }
  button { justify-self: start; font: inherit; font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 10px; border: 1px solid color-mix(in srgb, currentColor 25%, transparent); background: transparent; color: inherit; cursor: pointer; }
  :global(.dark) .panel { color: #f8fafc; }
  :global(.dark) th, :global(.dark) .note { color: #94a3b8; }
  :global(.dark) .error { color: #f87171; }
</style>

Sample rows from a demo endpoint on this site, fetched with the real $data and refreshed every 15 seconds. In your app the same line reaches your own Sola Relay.

@sola-air-ui/ui • Component library

37 components you can install today.

Buttons, date pickers, tables, gauges and more. Every widget below is a real compiled .sola component mounted directly into the page.

Sola Design System Inspector
Compiled @sola-air-ui/ui Primitives Live .sola DOM
Palette:
⌘K
Save:
⌘S
Signal Resistance Slider 74%
Sola AIR Output
<script>
  import DataCard from '@sola-air-ui/ui/data-card';
  import GaugeCard from '@sola-air-ui/ui/gauge-card';
  import Button from '@sola-air-ui/ui/button';

  let count = $state(12);
  let load = $derived(Math.min(100, count * 6));
</script>

<DataCard title="Signals Emitted" value={String(count)} trend="+8.4%" />
<GaugeCard title="Cluster Load" value={load + '%'} percentage={load} color="sky" />
<Button label="Trigger Signal" variant="primary" onClick={() => count++} />
Zero virtual DOM overhead
@sola-air-ui/ui • 37 Shipped .sola Primitives

Compiled .sola primitives, running live

Every card below is compiled directly from @sola-air-ui/ui/*.sola into reactive vanilla DOM nodes with scoped styles and zero virtual DOM diffing. Drag the rotary ring, hover the waterfall bars, or trigger a mitigation playbook.

TactileDialCard.sola Compiled .sola
FlowWaterfall.sola Compiled .sola
IncidentTriageMatrix.sola Compiled .sola