Categorizing the component categories
There are three types of component found within the jQuery UI library, as follows:
Low-level interaction helpers: These components are designed to work primarily with mouse events
Widgets: These components produces visible objects on the page
Core components: These are the components that the other parts of the library rely on
Let us take a moment to consider the components that make up each of these categories, beginning with the core components.
The core components consist of:
Core
Widget
Mouse
Position
The core file sets up the construct that all components use to function, and adds some core functionality that is shared by all of the library components, such as keyboard mappings, parent-scrolling, and a z-index manager. This file isn't designed to be used on its own, and exposes no functionality that can be used outside of another component.
The interaction helpers are comprised of the following components:
Draggable
Droppable
Resizable
Selectable
Sortable
The interaction helpers add basic mouse-based behaviors to any element; this allows you to create sortable lists, resize elements (such as dialog boxes) on the fly or even build functionality (such as a drag-and-drop based shopping cart).
The higher-level widgets (at the time of writing) include:
Accordion
Autocomplete
Button
Datepicker
Dialog
Menu
Progressbar
Slider
Tabs
Menu
Tooltips
The widgets are UI controls that bring the richness of desktop application functionality to the Web. Each of the widgets can be fully customized, appearance and their behavior.
Introducing the widget factory and effects
When working with jQuery UI's widgets, you will come across the widget factory. This literally creates the basis for all of the visible widgets exposed by the library. It implements the shared API common to all widgets, such as create
and destroy
methods, and provides the event callback logic. It also allows us to create custom jQuery UI widgets that inherit the shared API. We will cover the Widget Factory in detail later on in this chapter.
Apart from these components and interaction helpers, there are also a series of UI effects that produce different animations or transitions on targeted elements on the page. These are excellent for adding flair and style to our pages. We'll be looking at these effects in the final chapter of this book, Chapter 14, UI Effects.
The great thing about jQuery UI's simplified API is that once you have learned to use all of the existing components (as this book will show you), you'll be able to pick up any new components very quickly. There are plans for many more components in future versions, including a move to merge jQuery Mobile into the library!