# Widget

The **Widget** page designs the chatbot as visitors see it: the button that
opens it, the chat window, and what visitors may do. Its settings are grouped
in sections that open one by one. The preview pane shows the floating widget
with your unsaved changes; **Keep the preview widget open** keeps its chat
window open there while you work. **Reset widget settings** returns every
setting on the page to its default.

The sections you open are kept in the address, before the `#`, as `open`, for
example `open=button,chat,storage`.

## General

**Allow fullscreen** adds a button to the chat window's header that switches
it to fullscreen and back. Small screens do not show it.

## Position

**Alignment** places the widget in the bottom left or bottom right corner, and
**Distance** sets its distance from the edges, for example `16px` or `1rem`.

## Button

**Type** chooses between a **Button** with text and a **Logo**, a button that
shows an image. For a logo, **Logo URL** takes an image address or an image
chosen from the media library. For a text button, **Text** is its label,
**Border radius** rounds its corners, for example `8px`, and **Font size** sets
its text size, for example `14px`. **Text color**, **Background color** and
**Border color** apply to both types.

[Styling](/docs/ai/chatbots/styling.md) explains how these settings reach the
page and which other properties you can change in CSS.

## Chat

- **Welcome message** is the first message visitors see when the chat opens.
- **Theme** chooses **Light**, **Dark** or **Dark (WordPress)**.
- **Assistant name** is the title in the chat window's header, unless a
  [logo](#logo) takes its place.
- **Input placeholder** is the hint in the empty message field.

## Storage

**Storage mode** decides how a visitor's chat history is kept. History only
ever lives in the visitor's browser; SleekAI keeps no conversation on the server
unless [logging](/docs/ai/chatbots/logs.md) is on.

- **No storage**: the chat starts empty on every page load.
- **Session storage**: the chat survives navigation between pages until the
  browser tab is closed.
- **Browser database**: chats are kept in the browser's IndexedDB across
  visits. The chat window's menu then offers **New Chat** and
  **Chat history**, so visitors can start new chats and return to earlier
  ones.

## Message actions

These switches let visitors act on the chatbot's replies:

- **Allow a new chat from a message** offers **New chat from here**, which
  starts a new chat from a reply. It needs the **Browser database** storage
  mode.
- **Allow regenerating a reply** offers **Regenerate**, which asks the model
  for a new reply.
- **Allow deleting from a message** offers **Delete from here**, which removes
  a reply and everything after it.

## Logo

**URL** sets an image, by address or from the media library, shown in the
chat window's header in place of the assistant name.

## Presets

Presets are suggested questions shown as buttons in the chat, so a visitor
can start with one click. **Label** heads the group, for example
"Quick questions"; **Add preset** adds a question under
**Preset questions**.
