Release Notes
Version history, breaking changes, dependency updates, and migration steps for each UI Kit release.
- Snapchat: not supported
- SPECS: fully supported
- Camera Kit Web: not supported
- Camera Kit Mobile: not supported
- SnapchatNot supported
- SPECSFully supported
- Camera Kit WebNot supported
- Camera Kit MobileNot supported
v4.0.0
Spectacles UI Kit is now UIKit, built on InteractionKit 4.0. This release adds input-pause and
press-end events to every element, code-first ScrollBar setup, a Button corner-radius API, and
Slider.isDragging, and takes its System 3.0 theme colors from the design system.
Dependencies
| Package | Version |
|---|---|
| InteractionKit | 4.0.0 |
| Icons | 4.0.0 |
| Motion | 4.0.0 |
| Lens Studio | 5.25.0+ |
UIKit 3.0.0 depended on SpectaclesInteractionKit 3.1.0, Icons 3.0.0, and Motion 3.0.0.
⚠️ Breaking Changes
1. Package Renamed to UIKit
Previous Behavior: The package was SpectaclesUIKit.lspkg and imported
SpectaclesInteractionKit.lspkg.
New Behavior: The package is UIKit.lspkg and imports InteractionKit.lspkg. Module paths
inside the package are unchanged.
Migration: Replace the SpectaclesUIKit.lspkg/ import prefix with UIKit.lspkg/, and update
InteractionKit imports as described in the InteractionKit v4.0.0 release notes. UIKit 4.0 needs
InteractionKit 4.0.
import { Button } from "UIKit.lspkg/Scripts/Components/Button/Button";
2. Localization Keys Renamed
Previous Behavior: UIKit strings used the @spectacles-uikit: key prefix, for example
@spectacles-uikit:text-input-field:clear.
New Behavior: The prefix is @uikit:, for example @uikit:text-input-field:clear.
Migration: Rename the keys in any custom localization files that override UIKit strings.
3. Press-End Events Are Paired and Complete
Previous Behavior: A press that ended off the element, was canceled, or was released while the element was inactive raised no end event on the element.
New Behavior: Every onTriggerDown ends with exactly one of onTriggerUp,
onTriggerEndOutside, or onTriggerCanceled. A release while the element is inactive raises
onTriggerCanceled, not onTriggerUp. Text inputs raise onTriggerUp on every release.
Migration: If your code resets state in onTriggerUp only, also handle onTriggerEndOutside
and onTriggerCanceled.
4. Inactive Elements Take No Drag
Previous Behavior: An inactive element ignored hover and press input but could still start
and update a drag, for example when a host such as VirtualizedLayout turned its Interactable
back on.
New Behavior: Inactive or paused elements never start or update a drag, and
VirtualizedLayout no longer turns on the Interactable of an inactive element. A drag that was in
progress when the element became inactive still finishes. onHoverExit now fires only after a
reported onHoverEnter. A toggle button that is on stays on while inactive and shows its toggled
look when it becomes active again.
5. Theme Colors from the Design System
Previous Behavior: System 3.0 theme colors were hard-coded values.
New Behavior: System 3.0 colors come from the SPECS 3.0 design system, in the new
Themes/System-3.0/DesignSystemColors module. Some colors changed, including the body text,
slider hover, progress bar, spinner, loading bar, and skeleton colors. Button, LongPressButton,
VoiceInputButton, RectangleButton, RoundButton, and CapsuleButton content now uses dedicated
idle, hovered, and pressed colors.
Migration: Check screenshots or color-matched custom visuals against the new palette. The
existing token names in Colors.ts, such as UIlevel0 and ContentWhite, are still exported.
6. System 2.0 Theme Removed
Previous Behavior: UIKit shipped two themes, System 2.0 and System 3.0. Theme dropdowns offered both, and System 2.0 had its own Button styles and Frame options.
New Behavior: System 3.0 is the only theme. The Themes/System-2.0/ folder, System2, and
System2Styles are removed, and theme dropdowns offer only Inherited and System 3.0. A
project that names "System 2.0", "System2", or "SnapOS2" gets System 3.0 and a one-time
warning. These System 2.0 surfaces are removed with it:
- The Button
_styleSystem2and_shapeSystem2inputs, and the styles only System 2.0 had, such as PrimaryNeutral and Special. Frame.appearanceand theFrameAppearanceenum (Large and Small). Frames use one fixed size.Frame.roundedRectangle, deprecated in the previous release.- The classic Frame's follow button.
Frame.autoShowHideis no longer an Inspector input, and it is off by default.
Migration: Set buttons with setVariant({ shape, style }) using System 3.0 styles. Replace
Frame.roundedRectangle with Frame.cornerRadius or the FrameVisual interface. To fade a
frame's body in on hover and out when idle, set frame.autoShowHide = true after it initializes.
New Features
Element
inputPausedtakes any element out of input without the inactive look. Use it while a panel moves or while a command the control started is running. Pausing drops a hover or press in progress, and that press ends withonTriggerEndOutsideoronTriggerCanceled. It persists when the element or an ancestor is turned off and on again, which turning off the collider does not.onTriggerEndOutsidefires when a press ends with the interactor off the element.onTriggerCanceledfires when a press ends without a release, for example when a parent ScrollWindow takes over the gesture, tracking loses the hand, or the element turns off or becomes inactive mid-press. It fires once, when the last interactor holding the element lets go.
Button
cornerRadius(cm) andresetCornerRadius()set the corner radius of a Rectangle button before or afterinitialize(). Unlike writes tobutton.visual.cornerRadius, the value survives size changes and also updates the drop shadow. Capsule and Round buttons still derive their radius from their size.
Slider
isDraggingistrueonly while the user drags the knob.resetToValue,updateCurrentValue, thecurrentValuesetter, the release commit, and knob layout updates readfalse, so anonKnobMovedhandler can tell a drag from a programmatic sync. Write live drag values fromonKnobMovedwhileisDragging, and taps and release commits fromonValueChange.- ColorSlider, ConfirmationSlider, and Switch writes follow the same rule.
ScrollBar
- A ScrollBar can now be built from code: call
setScrollWindow(window)before it starts, plussetOrientation()andsetThemeOverride()if needed. A bar that starts without a window builds once it gets one. The setters have no effect after the bar has built. - A bar always draws along its object's X axis. Rotate a vertical bar's object 90 degrees around Z.
Other Additions
- Spinner:
opacity(0–1) multiplies the start and stop fades so a spinner fades with its panel. - Switch: setting
knobSizefrom script withcustomKnobSizeenabled keeps that size instead of the style's knob aspect. - RoundedRectangle and RoundedRectangleVisual:
cullWhenTransparentandcullIncludesOpacityskip drawing when the shape is fully transparent.
Fixes and Performance
- ScrollWindow:
maskingEnabledandinteractableEnabledset beforeinitialize()now take effect. SetmaskingEnabled = falsebeforeinitialize()when content never crosses the window's edge, which saves GPU time. - Frame: a border-only Frame body no longer renders while its hover border is hidden, and it no longer writes depth, so content behind the Frame stays visible on hover.
- Toolbar: a fully transparent background is no longer drawn.
- ElementContent: label text and icon writes that don't change anything are skipped.
- LongPressButton: a repeatable button re-arms when it turns off mid-press.
- TextInputField: a release after drag-to-adjust changes the value no longer opens the field for editing. The clear button keeps its corner radius.
- VoiceInputButton: the recording chip and progress outline follow the button's corner radius.