Guide › Your app, page by page › Assistant
How the assistant looks
The Look page, what “App’s own” means there, and how a developer sets the assistant’s colours, words and theme in the app itself.
The assistant’s look can come from two places: your app’s own code, and Assistant › Look in Cognolo. A setting left as App’s own on the Look page uses whatever the code sets. Where the code sets nothing, Cognolo’s default shows. A setting you choose on the Look page replaces the code’s, unless the code locks it.
The Look page
Assistant › Look has four groups: Colours, Approvals, Shape and type, and Name and logo. Each environment has its own look, and the preview beside it grows as you scroll so you can see the whole panel.
- Accent colour
- The first square, Theme colour, follows the chosen theme. Pick one of the colours after it, or Custom… to set one colour for the light panel and one for the dark. Only colours that read on the theme are shown, and a colour is adjusted slightly if it needs to be.
- Header
- Works the same way. Same as panel and Accent change with light and dark; the colours after the line stay the same in both.
- Light or dark
- App’s own, Light, Dark or Match the computer. App’s own follows your app’s own dark mode.
Colours, corners and font, in the app’s CSS
The panel reads a few CSS variables. Set them anywhere above the assistant, for example on :root in the app’s stylesheet. Each is optional.
:root {
--cognolo-accent: #2563eb; /* Send button, the person's messages, links, focus outline */
--cognolo-accent-text: #ffffff; /* text on the accent: use a dark colour if the accent is light */
--cognolo-link: #1d4ed8; /* links, if they should differ from the accent */
--cognolo-bg: #ffffff; /* the panel's background */
--cognolo-fg: #0f172a; /* its text */
--cognolo-muted: #55607a; /* quieter text */
--cognolo-soft: #f1f5f9; /* the assistant's message bubbles */
--cognolo-border: #e2e8f0;
--cognolo-radius: 10px; /* messages and cards */
--cognolo-radius-small: 8px; /* buttons and the message box */
--cognolo-font: Inter, system-ui, sans-serif;
}On the Look page, under Approvals, you can choose how strong the amber waiting card is (Standard, Warm or Strong) and which green the Approve button uses. The red card for changes that can’t be undone never changes. Keep them readable if you change them in CSS.
Words and light or dark, on the component
The title, the greeting, the example questions, the button’s label and light or dark are set where the developer places the assistant:
import { CognoloAssistant } from "@cognolo/runtime/react";
<CognoloAssistant
endpoint="/api/assistant"
title="Rental helper"
buttonLabel="Ask the helper"
intro="Ask about today's pickups, returns and anything overdue."
examples={["What's overdue?", "What's on today?"]}
// colorScheme: "page" (the default) follows your page's own light or dark mode (a "dark" class, data-theme or color-scheme; light when it says neither); or "light", "dark", "auto" (the computer)
/>labels changes any of the panel’s own words, for example to translate them. The “AI assistant” line under the title and the approval buttons’ meaning always stay.
Keeping a setting the app’s own
If the app should always decide a setting, whatever is chosen on the Look page, lock it where the app connects to Cognolo. The Look page then shows that setting dimmed, with a note.
import { cognoloCloud } from "@cognolo/runtime";
const cloud = cognoloCloud({
key: process.env.COGNOLO_KEY!,
baseUrl: process.env.COGNOLO_URL!,
publicKey: process.env.COGNOLO_PUBLIC_KEY!,
env: "production",
// Any of: accent, scheme, theme, intensity, approval, radius, header, font, density, messages,
// title, launcher, greeting, placeholder, examples, logo, layout, text.
// Locking theme also locks a brand colour.
lockLook: ["accent", "title"], // or lockLook: true to lock them all
});A theme from your brand colour
On the Look page, one brand colour can make the whole theme: a light and a dark version, with the background, bubbles and borders tinted in its hue and the colour itself as the accent.
- Cognolo tints only as far as every text and approval colour still reads, so a strong colour comes out gentler on the panel than on your site.
- Reds, oranges, yellows and greens can’t make a theme, as the panel keeps them for approvals and warnings. Your logo can carry such a colour instead.
- An app on an older
@cognolo/runtimedoesn’t know brand colours and shows the default theme until it is updated.
Text size
Large makes every piece of the panel’s text bigger together, for people who find small text hard to read. There is no smaller size. Lock text to keep the app’s own size.
Where the panel sits
The panel has three layouts: docked (full height on one side, the default), card (a chat card in a bottom corner, about half the screen high) and window (a window people drag by its title bar and resize from its corner; it stays on screen and remembers its place in that browser). All three fill the screen on a phone. The app picks one with the layout setting on the component:
<CognoloAssistant endpoint="/api/assistant" floating layout="card" />
By default the Look page can choose any of the three, with no code. If some don’t suit your pages (a card or window floats over them, and a page built around the side panel may leave room for it), narrow the list where the app connects to Cognolo, or lock layout to always keep the app’s own. A layout the app doesn’t allow is dropped before it reaches the panel.
const cloud = cognoloCloud({
// ...the settings above
layouts: ["docked", "card"], // only these two; leave it out for all three, [] for none
});The Look page greys out any layout the app turned off, and says so. Its preview always shows the panel in its box; the layout shows in the app itself.
On the Look page, under Where it sits: App’s own keeps whatever the app’s code chose (usually the side panel). Pick Side panel, Card or Window and press Save for Dev (or the environment you picked): the panel moves in your app the next time someone opens it. If it covers something on your pages, pick App’s own again and save. Each environment (Dev, QA, Production) has its own choice, so you can try one in Dev first.
Which one wins
- Cognolo’s default, when nothing else sets it.
- The app’s code (CSS variables and the component’s settings) over the default.
- The Look page over the app’s code, for the settings you choose there.
- A lock in the app’s code over the Look page.
Cognolo can’t see your app’s code, so for “App’s own” the Look page’s preview shows Cognolo’s default. The app picks up a look the next time someone opens the assistant or sends a message: it checks for changes when it is used, not on a timer.
Your logo
On a plan with branding (planned for Growth and Scale), a logo uploaded on the Look page shows left of the panel’s title. It travels inside the look itself as a small image (a PNG, JPEG or WebP up to 50 KB), so nothing is fetched from another site. If the app sets a Content Security Policy that limits images, add data: to its img-src, or the logo won’t show:
Content-Security-Policy: img-src 'self' data:
To keep the app’s own header without a logo, lock logo where the app connects to Cognolo, like any other setting.
If the logo doesn’t show
Work down this list. The first four are checked in Cognolo. The rest are in your app’s code, so your developer may need to make the change.
- The plan. A logo shows only on a plan with branding. Without it, the Look page says so and the panel leaves the logo out, even if one was saved before.
- The environment. A look is saved for one environment at a time. Check you saved it for the one you are looking at, then open the assistant in your app again (or send it a message).
- The file. It must be a PNG, JPEG or WebP of 50 KB or less. SVG can’t be used. If the Look page showed a message under the logo, the file wasn’t kept.
- A lock. If the app’s code locks
logo, or locks the whole look, the Look page shows the logo setting dimmed and the app keeps its own header. Takelogoout oflockLookto let the Look page choose. - The package version. An older
@cognolo/runtimedoesn’t know about logos and leaves them out. Update the package and deploy. - The Content Security Policy. If the browser console says it refused to load a
data:image, the app’s policy blocks it. Adddata:toimg-srcwherever the policy is set: a response header from the server, the framework’s settings (for exampleheaders()innext.config.js, or Helmet in Express), the host or CDN (Vercel, Netlify, Cloudflare), or a<meta http-equiv="Content-Security-Policy">tag in the page. - The app’s own styles. A broad rule in the app’s CSS, such as one that hides or resizes every image in a header, can catch the logo too. In the browser’s developer tools, find the image with the class
cog-logo, see which rule hides it, and narrow that rule so it leaves.cog-logoalone. - Colours. A dark logo on a transparent background can vanish in a dark theme. Use a logo with its own background, or one that reads on light and dark.