Canvas
Shows results next to the chat: tables, calendar reads, plans, charts, and web pages. Each result gets a tab. When the split is narrower than 720px, or the screen is phone-sized, the canvas opens as a full sheet instead.
Installation
pnpm dlx shadcn@latest add https://sprout.tulipfarm.ai/r/canvas.jsonCopies Canvas and the components it uses (Button, Resizable, Sheet, and Spinner) into your app, installs the packages, and adds the styles. Then import it from @/components/ui/canvas. Needs Tailwind CSS 4 and a components.json from shadcn init.
Install the following dependencies:
pnpm add clsx tailwind-merge @hugeicons/core-free-icons @hugeicons/reactAdd Sprout base once per app: the
cn()helper and the design tokens.lib/sprout/classes.ts- Design tokens, for your global CSS
Add the components it uses: Button, Resizable, Sheet, and Spinner.
Copy and paste the following code into your project.
'use client'; import { createContext, useContext, useEffect, useId, useLayoutEffect, useRef, useState, useSyncExternalStore, type ComponentType, type KeyboardEvent, type ReactNode, } from 'react'; import { createPortal } from 'react-dom'; import { ArrowLeftIcon } from '@/lib/sprout/icons/arrow-left-icon'; import { CloseIcon } from '@/lib/sprout/icons/close-icon'; import { SidebarRightIcon } from '@/lib/sprout/icons/sidebar-right-icon'; import { cn } from '@/lib/sprout/classes'; import { Button } from '@/components/ui/button'; import { Spinner } from '@/components/ui/spinner'; import { ResizableHandle, ResizablePanel, ResizablePanelGroup, useResizableLayout } from '@/components/ui/resizable'; import { Sheet, SheetContent, SheetDescription, SheetTitle } from '@/components/ui/sheet'; export const canvasSplitMinWidth = 720; export interface CanvasTab { id: string; title: string; icon?: ComponentType<{ size?: number }> | undefined; busy?: boolean | undefined; } const useIsomorphicLayoutEffect = typeof window === 'undefined' ? useEffect : useLayoutEffect; const mobileQuery = '(max-width: 767px)'; function subscribeMobile(callback: () => void) { const media = window.matchMedia(mobileQuery); media.addEventListener('change', callback); return () => media.removeEventListener('change', callback); } function useViewportMobile() { return useSyncExternalStore( subscribeMobile, () => window.matchMedia(mobileQuery).matches, () => false, ); } const CanvasNarrowContext = createContext<boolean | null>(null); export interface ChatSplitProps { open: boolean; onOpenChange: (open: boolean) => void; chat: ReactNode; canvas: ReactNode; layoutId?: string | undefined; canvasSize?: number | undefined; className?: string | undefined; } export function ChatSplit({ open, onOpenChange, chat, canvas, layoutId = 'chat-canvas', canvasSize = 45, className, }: ChatSplitProps) { const canvasShare = Math.min(Math.max(canvasSize, 20), 75); const viewportMobile = useViewportMobile(); const container = useRef<HTMLDivElement>(null); const [availableWidth, setAvailableWidth] = useState<number | null>(null); const mobile = viewportMobile || (availableWidth !== null && availableWidth < canvasSplitMinWidth); const split = open && !mobile; useIsomorphicLayoutEffect(() => { const element = container.current; if (!element) return; const measure = () => setAvailableWidth(element.clientWidth); measure(); const observer = new ResizeObserver(measure); observer.observe(element); return () => observer.disconnect(); }, []); const layout = useResizableLayout({ id: layoutId, panelIds: split ? ['chat', 'canvas'] : ['chat'], onlySaveAfterUserInteractions: true, }); const [desktopHost, setDesktopHost] = useState<HTMLDivElement | null>(null); const [mobileHost, setMobileHost] = useState<HTMLDivElement | null>(null); const [target, setTarget] = useState<HTMLDivElement | null>(null); useIsomorphicLayoutEffect(() => { const element = document.createElement('div'); element.className = 'sprout-canvas-host'; setTarget(element); }, []); useIsomorphicLayoutEffect(() => { if (!target || !open) return; (mobile ? mobileHost : desktopHost)?.append(target); return () => target.remove(); }, [mobile, open, target, mobileHost, desktopHost]); return ( <CanvasNarrowContext value={mobile}> <div ref={container} data-slot="chat-split" data-layout={mobile ? 'sheet' : 'split'} data-open={open ? '' : undefined} className={cn('sprout-chat-split', className)} > {target && createPortal(canvas, target)} <ResizablePanelGroup orientation="horizontal" defaultLayout={layout.defaultLayout} onLayoutChanged={layout.onLayoutChanged} > <ResizablePanel id="chat" minSize={`${Math.min(40, 100 - canvasShare)}%`} defaultSize={split ? `${100 - canvasShare}%` : '100%'} > <div className="sprout-chat-split-pane">{chat}</div> </ResizablePanel> {split && ( <> <ResizableHandle withHandle aria-label="Resize canvas" /> <ResizablePanel id="canvas" minSize="320px" defaultSize={`${canvasShare}%`}> <div ref={setDesktopHost} className="sprout-chat-split-pane" /> </ResizablePanel> </> )} </ResizablePanelGroup> <Sheet open={open && mobile} onOpenChange={next => onOpenChange(next)}> <SheetContent side="right" size="full" showCloseButton={false} keepMounted finalFocus={!open} className="sprout-canvas-sheet" > <div className="sprout-canvas-sr-only"> <SheetTitle>Canvas</SheetTitle> <SheetDescription>Detailed result. Return to chat to continue the conversation.</SheetDescription> </div> <div ref={setMobileHost} className="sprout-chat-split-pane" /> </SheetContent> </Sheet> </div> </CanvasNarrowContext> ); } export interface CanvasPanelProps { tabs: readonly CanvasTab[]; activeId: string | null; onSelect: (id: string) => void; onCloseTab: (id: string) => void; onClose: () => void; children: ReactNode; activity?: ReactNode; className?: string | undefined; } export function CanvasPanel({ tabs, activeId, onSelect, onCloseTab, onClose, children, activity, className, }: CanvasPanelProps) { const viewportMobile = useViewportMobile(); const narrow = useContext(CanvasNarrowContext); const mobile = narrow ?? viewportMobile; const base = useId(); const list = useRef<HTMLDivElement>(null); const tabButtons = useRef(new Map<string, HTMLButtonElement>()); const closeButton = useRef<HTMLButtonElement>(null); const heading = useRef<HTMLHeadingElement>(null); const refocus = useRef<number | null>(null); const [hovered, setHovered] = useState<string | null>(null); const activeIndex = tabs.findIndex(tab => tab.id === activeId); const tabId = (index: number) => `${base}-tab-${index}`; const bodyId = `${base}-body`; useEffect(() => { const scroller = list.current; const tab = activeId ? tabButtons.current.get(activeId) : null; if (!scroller || !tab) return; const start = tab.offsetLeft; const end = start + tab.offsetWidth + 28; if (start < scroller.scrollLeft) scroller.scrollLeft = start; else if (end > scroller.scrollLeft + scroller.clientWidth) scroller.scrollLeft = end - scroller.clientWidth; }, [activeId, tabs.length]); useEffect(() => { const index = refocus.current; if (index === null) return; refocus.current = null; const next = tabs[Math.min(index, tabs.length - 1)]; const target = (next && tabButtons.current.get(next.id)) ?? closeButton.current ?? heading.current; target?.focus(); }, [tabs]); const closeTab = (index: number) => { const tab = tabs[index]; if (!tab) return; refocus.current = index; onCloseTab(tab.id); }; const onTabKeyDown = (event: KeyboardEvent<HTMLButtonElement>, index: number) => { if (event.key === 'Delete') { event.preventDefault(); closeTab(index); return; } const next = event.key === 'ArrowRight' ? index + 1 : event.key === 'ArrowLeft' ? index - 1 : event.key === 'Home' ? 0 : event.key === 'End' ? tabs.length - 1 : null; if (next === null || tabs.length === 0) return; event.preventDefault(); const target = tabs[(next + tabs.length) % tabs.length]; if (!target) return; onSelect(target.id); tabButtons.current.get(target.id)?.focus(); }; return ( <section data-slot="canvas" data-layout={mobile ? 'sheet' : 'split'} aria-label="Canvas" className={cn('sprout-canvas', className)} onKeyDown={event => { if (event.key === 'Escape' && !event.defaultPrevented) { event.preventDefault(); onClose(); } }} > {mobile && ( <div className="sprout-canvas-back"> <Button variant="ghost" size="sm" onClick={onClose}> <ArrowLeftIcon size="md" aria-hidden="true" /> Back to chat </Button> </div> )} <header className="sprout-canvas-header"> {tabs.length === 0 ? ( <h2 ref={heading} tabIndex={-1} className="sprout-canvas-heading"> Canvas </h2> ) : ( <div ref={list} className="sprout-canvas-tabs"> <div role="tablist" aria-label="Open in canvas" className="sprout-canvas-tablist"> {tabs.map((tab, index) => { const active = index === activeIndex; const Icon = tab.icon; return ( <button key={tab.id} type="button" role="tab" id={tabId(index)} ref={node => { if (node) tabButtons.current.set(tab.id, node); else tabButtons.current.delete(tab.id); }} data-slot="canvas-tab" data-active={active ? '' : undefined} data-busy={tab.busy ? '' : undefined} data-hover={hovered === tab.id ? '' : undefined} aria-label={tab.busy ? `${tab.title}, loading` : undefined} aria-selected={active} aria-controls={bodyId} tabIndex={active || (activeIndex === -1 && index === 0) ? 0 : -1} style={{ order: index * 2 }} onClick={() => onSelect(tab.id)} onKeyDown={event => onTabKeyDown(event, index)} onPointerEnter={() => setHovered(tab.id)} onPointerLeave={() => setHovered(null)} className="sprout-canvas-tab" > {tab.busy ? ( <Spinner size="sm" aria-hidden="true" /> ) : ( Icon && ( <span aria-hidden="true" className="sprout-canvas-tab-icon"> <Icon size={14} /> </span> ) )} <span className="sprout-canvas-tab-title">{tab.title}</span> </button> ); })} </div> {tabs.map((tab, index) => { const active = index === activeIndex; return ( <button key={tab.id} type="button" aria-label={`Close ${tab.title}`} data-active={active ? '' : undefined} data-hover={hovered === tab.id ? '' : undefined} tabIndex={active ? 0 : -1} style={{ order: index * 2 + 1 }} onClick={() => closeTab(index)} onPointerEnter={() => setHovered(tab.id)} onPointerLeave={() => setHovered(null)} className="sprout-canvas-tab-close" > <CloseIcon size="xs" aria-hidden="true" /> </button> ); })} </div> )} {!mobile && ( <Button ref={closeButton} variant="ghost" size="icon-sm" aria-label="Close canvas" title="Close canvas (Esc)" onClick={onClose} > <CloseIcon size="md" aria-hidden="true" /> </Button> )} </header> {activity} <div id={bodyId} role={tabs.length ? 'tabpanel' : undefined} aria-labelledby={activeIndex === -1 ? undefined : tabId(activeIndex)} tabIndex={tabs.length ? 0 : undefined} className="sprout-canvas-body" > {children} </div> </section> ); } export interface CanvasToggleProps { open: boolean; count: number; onToggle: () => void; className?: string | undefined; } export function CanvasToggle({ open, count, onToggle, className }: CanvasToggleProps) { return ( <Button variant="ghost" size="sm" data-slot="canvas-toggle" aria-pressed={open} aria-label={open ? 'Hide canvas' : count ? `Show canvas, ${count} open` : 'Show canvas'} title="Show detailed results beside your chat" onClick={onToggle} className={cn('sprout-canvas-toggle', className)} > <SidebarRightIcon size="md" aria-hidden="true" /> <span className="sprout-canvas-toggle-label">{open ? 'Hide canvas' : 'Show canvas'}</span> {count > 0 && ( <span aria-hidden="true" className="sprout-canvas-toggle-count"> {count} </span> )} </Button> ); } export interface CanvasSectionProps { title?: string | undefined; meta?: string | undefined; actions?: ReactNode; children: ReactNode; className?: string | undefined; } export function CanvasSection({ title, meta, actions, children, className }: CanvasSectionProps) { return ( <div data-slot="canvas-section" className={cn('sprout-canvas-section', className)}> {(title || actions) && ( <div className="sprout-canvas-section-header"> <div className="sprout-canvas-section-text"> {title && <h3 className="sprout-canvas-section-title">{title}</h3>} {meta && <p className="sprout-canvas-section-meta">{meta}</p>} </div> {actions && <div className="sprout-canvas-section-actions">{actions}</div>} </div> )} {children} </div> ); } export interface CanvasFrameProps { src: string; title: string; className?: string | undefined; } export function CanvasFrame({ src, title, className }: CanvasFrameProps) { return ( <div data-slot="canvas-frame" className={cn('sprout-canvas-frame', className)}> <iframe src={src} title={title} sandbox="allow-scripts allow-popups" referrerPolicy="no-referrer" loading="lazy" /> </div> ); }And the files it imports:
lib/sprout/icons/arrow-left-icon.tsxlib/sprout/icons/close-icon.tsxlib/sprout/icons/create-icon.tsxlib/sprout/icons/sidebar-right-icon.tsx
Add the styles to your global CSS, after
@import "tailwindcss".@layer components { .sprout-chat-split { flex: 1; min-width: 0; height: 100%; min-height: 0; display: flex; overflow: hidden; } .sprout-chat-split-pane, .sprout-canvas-host { box-sizing: border-box; flex-direction: column; width: 100%; min-width: 0; height: 100%; min-height: 0; display: flex; overflow: hidden; } .sprout-canvas-sheet { overflow: hidden; } .sprout-canvas { box-sizing: border-box; background: var(--sprout-surface); min-width: 0; height: 100%; min-height: 0; color: var(--sprout-text); font-family: var(--sprout-font); font-size: var(--sprout-text-sm); flex-direction: column; line-height: 1.25rem; display: flex; } .sprout-canvas-back { border-bottom: 1px solid var(--sprout-line); flex-shrink: 0; padding: 4px 8px; } .sprout-canvas-header { box-sizing: border-box; border-bottom: 1px solid var(--sprout-line); flex-shrink: 0; align-items: center; gap: 4px; height: 44px; padding: 0 8px 0 4px; display: flex; } .sprout-canvas-heading { min-width: 0; color: var(--sprout-text); font-size: var(--sprout-text-sm); outline: none; flex: 1; margin: 0; padding: 0 8px; font-weight: 500; line-height: 1.25rem; } .sprout-canvas-tabs { scrollbar-width: none; flex: 1; align-items: center; min-width: 0; display: flex; position: relative; overflow-x: auto; } .sprout-canvas-tabs::-webkit-scrollbar { display: none; } .sprout-canvas-tablist { display: contents; } .sprout-canvas-tab, .sprout-canvas-tab-close { height: 32px; color: var(--sprout-muted); cursor: pointer; transition: background-color var(--sprout-motion-fast) var(--sprout-motion-ease), color var(--sprout-motion-fast) var(--sprout-motion-ease), opacity var(--sprout-motion-fast) var(--sprout-motion-ease); background: none; border: 0; outline: none; flex-shrink: 0; margin: 0; } .sprout-canvas-tab { border-radius: var(--sprout-radius-control) 0 0 var(--sprout-radius-control); min-width: 0; max-width: 10.5rem; font: inherit; align-items: center; gap: 6px; padding: 0 2px 0 8px; font-size: .8125rem; font-weight: 500; line-height: 1.25rem; display: flex; } .sprout-canvas-tab-close { border-radius: 0 var(--sprout-radius-control) var(--sprout-radius-control) 0; justify-content: center; align-items: center; width: 28px; margin-right: 2px; padding: 0; display: flex; position: relative; } .sprout-canvas-tab-close > svg { opacity: 0; transition: opacity var(--sprout-motion-fast) var(--sprout-motion-ease); position: relative; } .sprout-canvas-tab-close:before { border-radius: calc(var(--sprout-radius-control) - 2px); content: ""; transition: background-color var(--sprout-motion-fast) var(--sprout-motion-ease); position: absolute; inset: 6px 4px; } .sprout-canvas-tab[data-hover], .sprout-canvas-tab-close[data-hover] { background: color-mix(in srgb, var(--sprout-hover) 70%, transparent); color: var(--sprout-text); } .sprout-canvas-tab[data-active], .sprout-canvas-tab-close[data-active] { background: var(--sprout-hover); color: var(--sprout-text); } .sprout-canvas-tab-close[data-hover] > svg, .sprout-canvas-tab-close[data-active] > svg, .sprout-canvas-tab-close:focus-visible > svg { opacity: 1; } .sprout-canvas-tab-close:hover:before { background: var(--sprout-surface); } .sprout-canvas-tab:focus-visible, .sprout-canvas-tab-close:focus-visible { outline: var(--sprout-focus-width) solid var(--sprout-focus-ring); outline-offset: -1px; } .sprout-canvas-tab-icon { flex-shrink: 0; display: inline-flex; } .sprout-canvas-tab-title { text-overflow: ellipsis; white-space: nowrap; min-width: 0; overflow: hidden; } .sprout-canvas-body { outline: none; flex-direction: column; flex: 1; min-height: 0; display: flex; overflow: auto; } .sprout-canvas-body:focus-visible { outline: var(--sprout-focus-width) solid var(--sprout-focus-ring); outline-offset: -1px; } .sprout-canvas-toggle-count { box-sizing: border-box; background: var(--sprout-secondary); min-width: 16px; color: var(--sprout-text); font-variant-numeric: tabular-nums; text-align: center; border-radius: 999px; padding: 0 4px; font-size: .6875rem; line-height: 1rem; } @media (width <= 639px) { .sprout-canvas-toggle-label { clip-path: inset(50%); white-space: nowrap; width: 1px; height: 1px; position: absolute; overflow: hidden; } } .sprout-canvas-section { box-sizing: border-box; min-width: 0; min-height: 0; color: var(--sprout-text); font-family: var(--sprout-font); font-size: var(--sprout-text-sm); flex-direction: column; flex: 1; gap: 16px; padding: 16px; line-height: 1.25rem; display: flex; } .sprout-canvas-section-header { flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; display: flex; } .sprout-canvas-section-text { min-width: 0; } .sprout-canvas-section-title { color: var(--sprout-text); font-size: var(--sprout-text-base); overflow-wrap: anywhere; margin: 0; font-weight: 500; line-height: 1.5rem; } .sprout-canvas-section-meta { color: var(--sprout-muted); font-size: var(--sprout-text-xs); overflow-wrap: anywhere; margin: 2px 0 0; line-height: 1rem; } .sprout-canvas-section-actions { flex-wrap: wrap; flex-shrink: 0; align-items: center; gap: 8px; display: flex; } @media (width >= 640px) { .sprout-canvas-section { padding: 20px; } } .sprout-canvas-frame { border: 1px solid var(--sprout-line); border-radius: var(--sprout-radius-panel); background: var(--sprout-canvas); flex: 1; min-height: 20rem; display: flex; overflow: hidden; } .sprout-canvas-frame > iframe { border: 0; flex: 1; width: 100%; height: 100%; min-height: 20rem; } .sprout-canvas-sr-only { clip-path: inset(50%); white-space: nowrap; border: 0; width: 1px; height: 1px; margin: -1px; padding: 0; position: absolute; overflow: hidden; } @media (pointer: coarse) { .sprout-canvas-tab-close { width: 32px; } .sprout-canvas-tab-close > svg { opacity: 1; } } @media (prefers-reduced-motion: reduce) { .sprout-canvas-tab, .sprout-canvas-tab-close, .sprout-canvas-tab-close > svg, .sprout-canvas-tab-close:before { transition: none; } } @media (forced-colors: active) { .sprout-canvas-tab[data-active], .sprout-canvas-tab-close[data-active] { border-block: 1px solid canvastext; } .sprout-canvas-tab-close > svg { opacity: 1; } } }Import it from
@/components/ui/canvas. Update the paths if your@/alias points elsewhere.
pnpm add @tulipfarm/sprout@import "tailwindcss";
@import "@tulipfarm/sprout/styles.css";The package keeps the source and ships fixes with each release. Import from @tulipfarm/sprout/canvas.
Launch week planning
Pull this week’s new customers, my calendar, and the pipeline for launch week.
Here is what I found. Open a result to see the details.
Customers
Calendar events
Weekly pipeline
Usage
import {
CanvasPanel,
CanvasSection,
CanvasToggle,
ChatSplit,
} from "@tulipfarm/sprout/canvas";
import { DatabaseIcon } from "@tulipfarm/sprout/icons";
<header>
<h1>Launch week planning</h1>
<CanvasToggle open={open} count={items.length} onToggle={() => setOpen(!open)} />
</header>
<ChatSplit
open={open}
onOpenChange={setOpen}
layoutId="launch-week"
chat={<Conversation />}
canvas={
<CanvasPanel
tabs={items.map((item) => ({
id: item.id,
title: item.title,
icon: DatabaseIcon,
busy: item.loading,
}))}
activeId={activeId}
onSelect={setActiveId}
onCloseTab={closeItem}
onClose={() => setOpen(false)}
>
{items.map((item) => (
<div key={item.id} hidden={item.id !== activeId}>
<CanvasSection title={item.title} meta="3 rows">
<RowsTable rows={item.rows} />
</CanvasSection>
</div>
))}
</CanvasPanel>
}
/>ChatSplit:open,onOpenChange,chat,canvas, and an optionallayoutIdthat saves the split size per screen. The canvas can benullorfalsewhile nothing is open.CanvasPanel:tabs(id,title, optionaliconandbusy),activeId,onSelect,onCloseTab,onClose, and an optionalactivitystrip under the header. With no tabs the header reads “Canvas”.CanvasToggle:open,count, andonToggle. It reads “View results” or “Hide results”, and shows the count when results are open.CanvasSection: optionaltitle,meta, andactions. Leave all three out to just pad and stack content.CanvasFrame:srcandtitle. The page runs in a sandbox with scripts and popups only, and sends no referrer.canvasSplitMinWidthis720. Compare it with the width of[data-slot="chat-split"]to know whether the canvas is a sheet.
Toggle
Sits in the screen header. Each state below is from a TulipFarm screen.
New chat
Launch week planning
Add customer storage
Review a workflow
Sections
Every section shape a TulipFarm result uses: with and without a title, meta, and actions, plus loading, empty, unavailable, and error content.
Google Calendar
- Mon 9:30 AMLaunch stand-upGoogle Meet
- Tue 2:00 PMPricing review with financeRoom 4B
- Thu 11:00 AMPress briefing dry runGoogle Meet
Events may have changed since this read. Ask in chat to read the calendar again.
Customers
- 2 added
- 1 updated
| Change | Name | Company | Status | |
|---|---|---|---|---|
| Added | Ada Park | [email protected] | Northwind | Prospect |
| Added | Rui Costa | [email protected] | Lumen Studio | Active |
| Updated | Mia Chen | [email protected] | Harbor | Inactive |
Customer storage
Recorded activity
Google Drive
- Completed:Searched Drive for “Q3 launch”
Slack
- Completed:Posted the launch summary to #marketing
- Unconfirmed:Reply in the press thread
Table changed
These fields have changed
This saved query uses an older table definition. Open the current table, or ask for these rows again.
Weekly pipeline
Launch checklist
2 of 4 done- Draft the announcement post, done
- Book the press briefing, done
- Update the pricing page, to do
- Email the beta customers, to do
Couldn’t load Google file
Check the file again.
Google Calendar
No events in this read
This completed read returned no events. Ask in chat to read a different date range.
Events may have changed since this read. Ask in chat to read the calendar again.
Couldn’t load Weekly pipeline
The result didn’t arrive. Your chat is unchanged.
Ask again in the chat.
Browser frame
Shows a web page inside the canvas with a link to open it in a new tab.
Pricing page
In TulipFarm
Approval review, workflow review, result cards, and a two-tab example. Each keeps its own saved split size.
Add customer storage
Create a Customers table with Name, Email, Company, Phone, and Status.
Here are the changes for your review.
Review a workflow
Notify #engineering whenever a pull request is opened. Include its title, author, and link.
The workflow is ready to review. Select a step in Canvas to see what it does.
New pull request alert
3 steps / view only
App result cards
Show me the results for the pitch and the investor update.
Your work is ready. Open a result to see the details.
Investor pitch
Investor update
A fictional conversation. The canvas shows a visual result, not another transcript.
Keyboard and accessibility
- Tabs use one tab stop. ← and → move between tabs and wrap. Home and End jump to the first and last tab. Delete closes the focused tab and moves focus to the next one.
- Esc anywhere in the canvas closes it. On a sheet, focus returns to whatever opened it.
- The resize handle is a focusable separator labelled “Resize canvas”. Arrow keys resize it.
- A busy tab shows a spinner and reads “loading”. The spinner stops when reduced motion is on.
- On touch screens the close buttons stay visible and grow to 32px.