Skip to main content

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

Platform details

  • Snapchat — Not supported.

  • SPECS — Fully supported.

  • Camera Kit Web — Not supported.

  • Camera Kit Mobile — Not 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

PackageVersion
InteractionKit4.0.0
Icons4.0.0
Motion4.0.0
Lens Studio5.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 _styleSystem2 and _shapeSystem2 inputs, and the styles only System 2.0 had, such as PrimaryNeutral and Special.
  • Frame.appearance and the FrameAppearance enum (Large and Small). Frames use one fixed size.
  • Frame.roundedRectangle, deprecated in the previous release.
  • The classic Frame's follow button. Frame.autoShowHide is 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

  • inputPaused takes 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 with onTriggerEndOutside or onTriggerCanceled. It persists when the element or an ancestor is turned off and on again, which turning off the collider does not.
  • onTriggerEndOutside fires when a press ends with the interactor off the element.
  • onTriggerCanceled fires 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) and resetCornerRadius() set the corner radius of a Rectangle button before or after initialize(). Unlike writes to button.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

  • isDragging is true only while the user drags the knob. resetToValue, updateCurrentValue, the currentValue setter, the release commit, and knob layout updates read false, so an onKnobMoved handler can tell a drag from a programmatic sync. Write live drag values from onKnobMoved while isDragging, and taps and release commits from onValueChange.
  • ColorSlider, ConfirmationSlider, and Switch writes follow the same rule.

ScrollBar

  • A ScrollBar can now be built from code: call setScrollWindow(window) before it starts, plus setOrientation() and setThemeOverride() 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 knobSize from script with customKnobSize enabled keeps that size instead of the style's knob aspect.
  • RoundedRectangle and RoundedRectangleVisual: cullWhenTransparent and cullIncludesOpacity skip drawing when the shape is fully transparent.

Fixes and Performance

  • ScrollWindow: maskingEnabled and interactableEnabled set before initialize() now take effect. Set maskingEnabled = false before initialize() 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.