Extension: omni.kit.widget.spinner-1.0.10 |
Documentation Generated: Sep 22, 2025 |
Overview#
omni.kit.widget.spinner provides a set of spinner widgets for the Omniverse Kit SDK, enabling users to adjust numeric values through a value field and arrow buttons. The extension implements multiple spinner types including float and integer spinners, as well as a draggable variant for integers. It is designed to integrate smoothly with Omni UI, delivering consistent behavior and appearance throughout applications.

Concepts#
Value Field with Arrows: The spinner widgets combine a text field with directional arrows (or drag gestures) to change numeric values.
Interaction Modes: The spinners support both single-click and long-click (continuous update) actions with adjustable step sizes.
Flexible Layouts: Options to use vertical (up/down) or horizontal (left/right) orientations suit different UI contexts.
Functionality#
AbstractSpinner: Acts as the base class for spinner controls, managing common properties such as minimum/maximum limits, step values, and precision.
FloatSpinner: Specializes in floating point numbers, ensuring values are rounded to a specified precision.
IntSpinner: Designed for integer inputs, providing standard increment/decrement functionality with configurable bounds.
IntDragSpinner: Offers a draggable integer field, allowing users to adjust values through drag gestures for rapid and precise changes.
Usage Examples#
A quick instantiation of a spinner widget might look like:
from omni.kit.widget.spinner import FloatSpinner, IntSpinner, IntDragSpinner
# Create a float spinner with default settings
float_spinner = FloatSpinner()
# Create an integer spinner with a minimum and maximum constraint
int_spinner = IntSpinner(min=0, max=100)
# Create an integer drag spinner for rapid adjustments
int_drag_spinner = IntDragSpinner()
These examples demonstrate how the extension simplifies incorporating numeric input controls in your Omniverse Kit SDK applications.
Relationships#
Omni UI Dependency: This extension builds on the Omni UI library for rendering widgets and handling user interactions.
Integration: It is designed to work seamlessly within the broader suite of Omniverse Kit SDK UI components, making it easy to include numeric input functionality in complex applications.
Considerations#
The spinner widgets are primarily intended for numeric adjustments, so any non-numeric value handling must be managed at the application level.
Customization of styles is achieved by passing an optional style dictionary, which leverages the extension’s built-in UI style settings.
This overview provides a practical understanding of the extension’s purpose and highlights how to use its key components within your applications.