Skip to main content
Documentation menu

Slidev reference

Connection settings, common components, layouts, and chart customization.

For a complete walkthrough, start with Your first Slidev integration. This reference describes the current official add-on.

Connection settings

Environment variablePurposeDefault
VITE_INALIA_API_KEYAPI token for the speaker accountNone
VITE_INALIA_TALK_NUMBERTalk number within that accountNone
VITE_INALIA_ENDPOINTInalia server originhttps://inalia.app
VITE_REVERB_APP_KEYRealtime service's public application keyHosted Inalia key
VITE_REVERB_HOSTRealtime hostnamews.inalia.app
VITE_REVERB_PORTRealtime connection port80 for WS; 443 for WSS
VITE_REVERB_SCHEMERealtime transport schemehttps

For hosted Inalia, configure only the token and talk number. The add-on retrieves and caches the token owner’s username using GET /api/me. Leave endpoint and realtime settings at their defaults. Override them only for a server you administer, using its actual connection details.

Without both required values, the add-on starts in static mode and does not connect to a talk. Restart Slidev after configuration changes.

CLI talk selection

Run npx slidev-addon-inalia select-talk in a Slidev project to list your talks and save the selected VITE_INALIA_TALK_NUMBER to .env. It also saves the token used for the request, preserving unrelated settings. The command reads shell environment values before project .env, prompts for a missing token, and uses VITE_INALIA_ENDPOINT or https://inalia.app. It does not read ~/.inaliarc. Requires Node.js 20.12 or newer. Restart Slidev after changing the selection.

The integration endpoint GET /api/{username}/talks returns all of the owner's talks as a data array, ordered by descending talk number. Each item uses the existing talk resource, including number, title, and scheduled_at. It requires bearer authentication with read permission, a verified eligible account, and ownership of the requested username. No write permission is needed to select a talk.

User-wide configuration

The add-on also reads ~/.inaliarc. For example:

{
  "inalia": {
    "api_key": "YOUR_DEDICATED_TOKEN",
    "talk_number": "YOUR_TALK_NUMBER"
  }
}

Nested keys become uppercase, underscore-separated VITE_ variables. Project environment values take precedence over this user configuration. Be careful when switching projects: user-wide credentials can activate a live connection even after you remove a project's .env.

Credentials are not browser secrets. The current integration sends its token from browser-side code. Never publicly publish a live-configured deck. See safe publishing.

Permissions

  • read retrieves your username, talks, and questions.
  • read plus write allows integration requests that run talks or change demo mode.

Permissions do not bypass account eligibility, email verification, or talk ownership. Use a dedicated read-only token when managing talk status in the app.

Live question

<Inalia questionId="1" />

Use the question number from Inalia's generated Slidev output. It is relative to the configured talk, not a global question ID. Live questions retrieve results and listen for updates.

Static question

<Inalia
  question="How familiar are you with this topic?"
  type="single_select"
  chart="bar"
  :data="[
    { label: 'Just starting', count: 3, color: '#00DC82' },
    { label: 'Some experience', count: 5, color: '#a855f7' },
    { label: 'Very familiar', count: 2, color: '#2563eb' },
  ]"
/>

Static data displays exactly what you provide; it does not collect responses or subscribe to answers. Omit questionId when using explicit snapshot data.

For text questions or other result shapes, use Inalia's generated output rather than inventing a data structure. See publishing snapshots.

Common components and layouts

Component or layoutPurpose
<Inalia questionId="…" />Display a live question
<InaliaOverview />Display the connected talk's audience overview
<InaliaFeedback />Display the connected talk's feedback invitation
<InaliaQR url="https://inalia.app" />Render a QR code for an explicit URL
<InaliaShortUrl url="https://inalia.app" />Display a readable URL
layout: inalia-overviewFull slide using the overview component
layout: inalia-feedbackFull slide using the feedback component

Overview and feedback components need a connected talk. The add-on also provides global live-reaction and audience-question-highlight overlays. Enable the relevant features in Inalia; use the running talk's Dashboard to select or remove a highlighted audience question. A highlight is not the same as poll results, and is unavailable in demo mode.

Customization

To hide live reactions on a particular slide, add this to that slide's frontmatter:

---
inalia:
  emoji: false
---

This controls the slide's reaction overlay, not whether audience submissions are enabled in Inalia.

Choose Bar or Donut in the question's Chart Type setting, or use chart="bar" or chart="donut" with explicit static data. Choice colors come from question settings or the static data's color fields.

The current chart components use fixed geometry values. Although the add-on's type declarations include inalia.bar and inalia.donut frontmatter options, those components do not currently read them; do not rely on those options to change rendering.

Updating the add-on

For self-hosted installations, deploy backend support for the token-authenticated GET /api/me endpoint before updating the add-on. It returns only { "data": { "username": "speaker" } } and requires read permission, verified email, and account access.

Review the add-on's releases and compatibility requirements before updating. Keep your project's dependency lockfile, and rehearse the same deck and configuration you will present.

For unknown components, failed authentication, or missing updates, see Troubleshooting.