shtml — The .shtml File Format

.shtml is the file format for SLICC's interactive UI panels (sprinkles) and inline chat cards. Sprinkles are HTML fragments or full documents rendered inside sandboxed iframes, with a bridge API for communicating with the agent.

Rendering Modes

Rendering by Runtime

Bridge API (Panel Sprinkles)

Panel sprinkles (sidebar .shtml files) get the full slicc bridge object, available as window.slicc in scripts and as slicc in onclick attributes.

Inline Sprinkles

Agent ```shtml fenced code blocks in chat messages are hydrated into sandboxed iframes after streaming completes. Inline sprinkles have a minimal bridge: only slicc.lick() is available. There is no readFile, no setState/getState, no on('update'). Inline cards are ephemeral.

Auto-height is handled via ResizeObserver — the iframe resizes to fit its content automatically.

CSS Component Library

Use the built-in .sprinkle-* classes. Do not write custom CSS in fragment mode.

Run read_file /workspace/skills/sprinkles/style-guide.md for the full component reference.

When to Use What

Example: Action Card with Buttons

<div class="sprinkle-action-card">
  <div class="sprinkle-action-card__header">
    Deploy to production
    <span class="sprinkle-badge sprinkle-badge--notice">pending</span>
  </div>
  <div class="sprinkle-action-card__body">3 files changed, all tests passing.</div>
  <div class="sprinkle-action-card__actions">
    <button class="sprinkle-btn sprinkle-btn--secondary"
            onclick="slicc.lick('cancel')">Cancel</button>
    <button class="sprinkle-btn sprinkle-btn--primary"
            onclick="slicc.lick({action:'deploy',data:{env:'prod'}})">Deploy</button>
  </div>
</div>

See Also