Chat launcher

ChatLauncher is the Ask Nuri button: a compact pill with Nuri's head and the words, which opens the AI tutor. Nuri's head is alive: it blinks and its eyes follow the pointer around the page.

  • Beta
  • Accessibility
  • Figma Ask Nuri 4707:183711
  • packages/ui/src/components/ChatLauncher

Beta until the hover and focus styles (code-only) are confirmed by design. The pill itself follows Figma.

Preview

The launcher as it comes: Nuri's head and 'Ask Nuri'. Point at it, or tab to it, to see it react.

Installation

Availability

@nuton/ui and @nuton/tokens are private workspace packages and aren't published yet (D4, D12). Inside the Nuton monorepo, add them as workspace dependencies.

bash
pnpm add @nuton/ui @nuton/tokens @remixicon/react
tsx
import '@nuton/tokens/tokens.css'
import '@nuton/ui/styles.css'

Usage

tsx
import { ChatLauncher } from '@nuton/ui'

{tutorOpen ? (
  <Tutor onClose={() => setTutorOpen(false)} />
) : (
  <ChatLauncher aria-expanded={false} onClick={() => setTutorOpen(true)} />
)}
  • Show it while the chat is closed, at the bottom right on the web and at the bottom centre on a tablet or phone. ChatDock does the placement and turns the pill into the panel and back.
  • The words are the button's name, so there is nothing to label. Change them with label.
  • The face is Nuri's head by default. Pass avatar only to show something else.
  • Set aria-expanded so assistive technology knows it opens a panel.

Variants and sizes

One look and one size.

Sizes

44 tall and 121 wide with the default words. Padding 16 at each side, Nuri's head 21 × 20, then the label in Label/Small. White, 1px Stroke/Soft-200, regular-shadow/x-small.

States and interactions

IdleA quiet pill. Nuri blinks and looks around, and follows the pointer.
HoverLifts 2px, widens to show an arrow, and Nuri tilts its head with a springy settle.
FocusThe standard ring, and the same reaction as hover. Press Tab to see it.
PressedSettles to 98%. Reduced motion removes the movement.

Composition examples

In Learner → Lesson the launcher is the closed state of the AI tutor: pressing it grows the pill into the chat panel (a side panel on the web, a sheet from the bottom centre on a tablet or phone), and closing the panel shrinks it back. See Chat for the panel and ChatDock.

API reference

Props

Chat launcher props
PropTypeDefaultDescription
labelReactNode'Ask Nuri'The words on the button. They are its accessible name.
avatarReactNode—The face. Default is Nuri's head (alive). Pass an image or mark to replace it. Decorative.
attentivebooleantrueNuri's eyes follow the pointer anywhere on the page. Off, the head stays still. No effect on a custom avatar.
…restButtonHTMLAttributes—Any other button attribute, such as onClick or aria-expanded. Default type is "button".

Accessibility

Keyboard

KeyBehaviour
TabMoves focus to the launcher.
Enter / SpacePresses it.

Screen readers

A button named by its words ("Ask Nuri"). Nuri's head and the arrow are hidden from assistive technology.

Focus

The standard ring with a 2px offset, drawn around the whole pill, and the same reaction as hover.

Contrast and colour

The label and the pill use the design system's text and surface tokens, so they follow light and dark themes. The state is never shown by colour alone: hover and focus also move the pill and the arrow.

Motion

The lift, the arrow and the head tilt are removed with reduced motion, and Nuri's eyes stop following the pointer.

Touch and pointer

44px tall, at the minimum target size.

You must: make the button open the panel it stands for, and set aria-expanded.

Figma mapping

"Ask Nuri" 4707:183711: 121 × 44, padding 16, head 21 × 20, label Label/Small, Bg/White, Stroke/Soft-200, regular-shadow/x-small. The Figma frame has a hidden arrow icon; it is the hover state here. Recorded as C126.

Guidelines and related components

Use Chat launcher for

  • Opening the AI tutor

Don't use Chat launcher for

  • Ordinary actions (use Button)
  • Opening something that is not a chat

Do and don't

DoKeep the words and the face together The words say what it does and the face says who is there.
Don'tDon't replace the words with the picture alone A launcher with no visible words is harder to find and to name.