# swing-ui > Cross-platform GUI module for building desktop applications in JavaScript with Node.js, Bun and Deno 2+. All classes, functions, enums and the `ui` constant are **globals**. After swing-ui is loaded, use them directly (`new Window(...)`, `alert(...)`, `MouseButton.Left`) without importing them. ## Docs - [Overview](https://swing-ui.com/ai/jsdocs/index.md): the global `ui` constant and an index of everything - [Functions](https://swing-ui.com/ai/jsdocs/functions.md): global dialog functions (error, alert, prompt, confirm, dialog) - [Enums](https://swing-ui.com/ai/jsdocs/enums.md): global enums such as MouseButton, Cursor and Orientation - [Type Definitions](https://swing-ui.com/ai/jsdocs/types.md): option objects, event objects and media info shapes ## Classes - [SwingUI](https://swing-ui.com/ai/jsdocs/classes/SwingUI.md): Main SwingUI class that handles all communication between JavaScript and GUI and provides many utility methods not related to specific GUI components. - [Arc](https://swing-ui.com/ai/jsdocs/classes/Arc.md): An `Arc` shape that extends the `Shape` class. - [Button](https://swing-ui.com/ai/jsdocs/classes/Button.md): Button UI component that extends UIComponent class. - [CheckBox](https://swing-ui.com/ai/jsdocs/classes/CheckBox.md): Check box UI component that extends UIComponent class. - [CheckBoxMenuItem](https://swing-ui.com/ai/jsdocs/classes/CheckBoxMenuItem.md): Check box menu item UI component that extends MenuItem class. - [ComboBox](https://swing-ui.com/ai/jsdocs/classes/ComboBox.md): ComboBox UI component that extends UIComponent class. - [ComponentContainer](https://swing-ui.com/ai/jsdocs/classes/ComponentContainer.md): ComponentContainer is not a standalone component and should not be instantiated. - [ContextMenu](https://swing-ui.com/ai/jsdocs/classes/ContextMenu.md): ContextMenu UI component that extends ComponentContainer, which extends UIComponent class. - [DocumentEditor](https://swing-ui.com/ai/jsdocs/classes/DocumentEditor.md): DocumentEditor UI component that extends TextComponent and ScrollableComponent, which extend UIComponent class. - [Ellipse](https://swing-ui.com/ai/jsdocs/classes/Ellipse.md): `Ellipse` shape can draw an oval (when height and width are different) or a circle (when height and width are same). - [InternalWindow](https://swing-ui.com/ai/jsdocs/classes/InternalWindow.md): InternalWindow UI component. - [InternalWindowContainer](https://swing-ui.com/ai/jsdocs/classes/InternalWindowContainer.md): InternalWindowContainer UI component, extends ScrollableComponent class. - [Label](https://swing-ui.com/ai/jsdocs/classes/Label.md): Label UI component, extends UIComponent class. - [Line](https://swing-ui.com/ai/jsdocs/classes/Line.md): A `Line` shape that extends the `Shape` class. - [List](https://swing-ui.com/ai/jsdocs/classes/List.md): List UI component, extends ScrollableComponent class, which extends UIComponent class. - [MediaPlayer](https://swing-ui.com/ai/jsdocs/classes/MediaPlayer.md): Media player is an audio and video player component capable of playing video & audio files, video & audio live streams, video & audio from URL, and from audio & video capture devices, like microphone, web cam and other video capture devices. - [Menu](https://swing-ui.com/ai/jsdocs/classes/Menu.md): Menu UI component is used to create menus in a menu bar or create a submenu in context menu. - [MenuBar](https://swing-ui.com/ai/jsdocs/classes/MenuBar.md): MenuBar UI component is used to create a menu bar at the top of the application. - [MenuItem](https://swing-ui.com/ai/jsdocs/classes/MenuItem.md): Menu item UI component that extends UIComponent class. - [Panel](https://swing-ui.com/ai/jsdocs/classes/Panel.md): Panel UI component, a rectangular UI component with a transparent background by default, that can be used in many different ways: - [PasswordField](https://swing-ui.com/ai/jsdocs/classes/PasswordField.md): Password field is used to type masked text. - [Polygon](https://swing-ui.com/ai/jsdocs/classes/Polygon.md): Polygon is a shape with multiple corners at specified points. - [Polyline](https://swing-ui.com/ai/jsdocs/classes/Polyline.md): Polyline is a shape with multiple lines drawn from point to point for each provided point. - [ProgressBar](https://swing-ui.com/ai/jsdocs/classes/ProgressBar.md): Progress bar component is used to show progress visually, from 0% to 100%. - [RadioButton](https://swing-ui.com/ai/jsdocs/classes/RadioButton.md): RadioButton is a component used to select one of multiple option by clicking on it. - [RadioButtonMenuItem](https://swing-ui.com/ai/jsdocs/classes/RadioButtonMenuItem.md): Radio button menu item UI component. - [Rectangle](https://swing-ui.com/ai/jsdocs/classes/Rectangle.md): Rectangle shape can draw a rectangles (if width and height are different) and a square (when width and height are same. - [ScrollableComponent](https://swing-ui.com/ai/jsdocs/classes/ScrollableComponent.md): ScrollableComponent is not a standalone component. - [ScrollPane](https://swing-ui.com/ai/jsdocs/classes/ScrollPane.md): ScrollPane is a UI component used to display content that may not fit within the visible area, such as large images, scrollable lists, or lengthy forms. - [Separator](https://swing-ui.com/ai/jsdocs/classes/Separator.md): A Separator is used to create a separator line between menu items in a menu or between components in a ToolBar. - [Shape](https://swing-ui.com/ai/jsdocs/classes/Shape.md): Shape class is used to create shapes that can be drawn in the background of `Window` or `Panel` components. - [ShapeContainer](https://swing-ui.com/ai/jsdocs/classes/ShapeContainer.md): ShapeContainer is not a standalone component. - [Slider](https://swing-ui.com/ai/jsdocs/classes/Slider.md): Slider UI component is used to set value by sliding a thumb (handle) horizontally or vertically. - [Spinner](https://swing-ui.com/ai/jsdocs/classes/Spinner.md): Component that can hold a number, list items, date/time, and IP addresses. - [SplitView](https://swing-ui.com/ai/jsdocs/classes/SplitView.md): A SplitView is a container component that holds two child components separated by a movable divider. - [Stroke](https://swing-ui.com/ai/jsdocs/classes/Stroke.md): Stroke (border) of any Shape (objects that extend `Shape` class). - [Table](https://swing-ui.com/ai/jsdocs/classes/Table.md): A Table UI component displays data in a structured grid of rows and columns, making it easy to read, sort, and interact with. - [Tabs](https://swing-ui.com/ai/jsdocs/classes/Tabs.md): A Tabs UI component is a set of linked panels where only one panel is visible at a time, and users can switch between them by clicking tab headers. - [TextArea](https://swing-ui.com/ai/jsdocs/classes/TextArea.md): TextArea is a multi-line text field with multiple text-wrapping modes. - [TextComponent](https://swing-ui.com/ai/jsdocs/classes/TextComponent.md): TextComponent is not a standalone component. - [TextField](https://swing-ui.com/ai/jsdocs/classes/TextField.md): TextField component is the most popular text input component used for name, address, email, and many other data types. - [TextShape](https://swing-ui.com/ai/jsdocs/classes/TextShape.md): TextShape is used to draw text as a shape. - [ToggleButton](https://swing-ui.com/ai/jsdocs/classes/ToggleButton.md): ToggleButton UI component that is similar to a `Button` component, but can be selected. - [ToolBar](https://swing-ui.com/ai/jsdocs/classes/ToolBar.md): A toolbar component that is usually used at the top of window and can hold `Label`, `Button`, `TextField`, `PasswordField`, `Spinner`, `ComboBox`, `CheckBox`, `RadioButton` and a `Separator` to display useful tools for a user. - [TrayIcon](https://swing-ui.com/ai/jsdocs/classes/TrayIcon.md): TrayIcon is a system icon usually displayed in a tray of icons for applications running or capable of running in the background. - [Tree](https://swing-ui.com/ai/jsdocs/classes/Tree.md): A Tree component shows a list items but in a child/parent structure. - [UIComponent](https://swing-ui.com/ai/jsdocs/classes/UIComponent.md): Base component class that other UI components extend. - [Window](https://swing-ui.com/ai/jsdocs/classes/Window.md): Window UI component that extends ShapesContainer class which extends UIComponent. ## Optional - [Full API reference](https://swing-ui.com/ai/jsdocs/llms-full.txt): all pages above in a single file