Minimized layout applies only to the Headed Web SDK. It requires Web SDK
3.1.0 or later.Layout values from the hosted iframe
The hosted iframe sends one layout value at a time. Treatminimized and minimized-paused the same in your host layout: both mean the small overlay is active, so you should free the area you reserved for the full headed panel. When the value is expanded, give that slot back to the full panel.
How to implement Minimized layout
1
Initialize and Mount
Use a root element reserved for the iframe, the same as the
rootElement you pass to mount in @suki-sdk/js, or the parent tree where you render SukiAssistant in @suki-sdk/react.2
Collapse your Mount Wrapper
When
layout is not expanded, set width, minWidth, height, and minHeight to 0, or hide the column with flex rules (including flex-basis when that is what reserves space).3
Maintain Visibility on the Mount
Keep
overflow: visible on the mount node while minimized so the fixed-position iframe is not clipped by a scrolling or clipping ancestor.4
Restore Dimensions when Expanded
When
layout returns to expanded, restore your normal CSS dimensions or flex basis for the headed panel.5
Reclaim Space for Core Content
The iframe remains a child of your mount node even when minimized. Because it is fixed-positioned, the parent does not need to stay large; your application should reclaim that space for core content next to or behind the widget.
In React
- The
SukiAssistantcomponent does not automatically collapse its container when the SDK minimizes. - You must use the
onLayoutChangeprop to collapse, hide, or restyle the container in your layout.
Code examples
Subscribe toui:layout-change on the @suki-sdk/js instance after initialize.
In @suki-sdk/react, drive a wrapper around SukiAssistant from onLayoutChange so your slot tracks the SDK (the React sample shows a typical wrapper with inline styles; use classes or tokens in production if you prefer).
JavaScript
What you do not need to do
- Iframe sizing: do not re-implement iframe width, height, or positioning. The
@suki-sdk/jspackage controls iframe geometry for expanded and minimized states when minimize is allowed. You only adjust your mount container. - Space recovery: if your layout does not have an empty slot to reclaim (for example the SDK sits in a dedicated overlay and nothing else needs to grow into a reserved column), you can skip handling
ui:layout-changefor layout recovery. You should still follow Configure the mount point on the overview so fixed positioning and stacking behave predictably.
Validate in a test environment
Follow these steps to verify your integration end to end.1
Enable the Feature
To enable the feature for your organization, contact support.
2
Start a Session
Initiate ambient capture from the headed SDK UI or your controlled entry point. When capability and session state allow it, the iframe should become a small floating widget.
3
Confirm the Layout Shift
-
In JavaScript: after
ui:layout-changefires and you collapse the mount, your main content should grow into the reclaimed space. -
In React: use
onLayoutChangeto collapse your container wheneverlayoutis notexpanded, and confirm the shift matches what you expect.
4
Verify Ambient Dialogs
Confirm that ambient dialogs (for example cancel, insufficient context, and audio-below-threshold) appear correctly on the minimized UI when the product allows them there.
If you are unsure how minimize is enabled for staging or production, ask your Suki integration contact for the current rollout process.
Troubleshooting
Widget is Misplaced or Clipped
Widget is Misplaced or Clipped
This is usually caused by
transform, filter, or will-change on an ancestor of the mount. Relocate the mount outside transformed or filtered containers, set overflow: visible on the mount while minimized, and retest.Read Avoid transformed ancestors to learn more about how to avoid this issue.Chart Does Not Expand when the SDK Minimizes
Chart Does Not Expand when the SDK Minimizes
Explicitly set
width, height, minWidth, minHeight, or flex-basis to zero (or hide the column) when layout is not expanded. Without collapsing, the layout keeps reserving the prior panel size (for example 360Ć640). In React, drive that collapse from onLayoutChange.Ambient Dialogs are Hard to See
Ambient Dialogs are Hard to See
Verify the feature flag or Remote Config rollout enables minimize for the user or organization, and confirm the iframe is not clipped. Check
z-index stacking and overflow on ancestors.