Retired Document
Important: This document may not represent best practices for current development. Links to downloads and other resources may no longer be valid.
Getting Started with Dashboard Widgets
Dashboard widgets are mini applications that appear when users run Apple’s Dashboard application in Mac OS X v10.4 and later. A widget relies on HTML, CSS, and JavaScript to perform a narrowly focused task in a visually pleasing way.
Start Here
To develop a Dashboard widget you need to:
Choose a simple task for your widget to perform
Design an attractive appearance that follows Apple’s guidelines
Implement your widget in HTML, CSS, and JavaScript
Choose next how you want to get started—by reading about the basics, getting your hands on some code, or diving into specific technologies.
Want to get familiar with the fundamentals?
Widget Basics uses a very simple example to show widget structure and how to create a widget’s files.
Designing Widgets covers the user interface guidelines that govern great widgets.
Prefer to learn by doing?
Widget Tutorial walks you through using Dashcode to create a simple widget you can run in Dashboard.
Hello World is a sample project you can use to find out how to create a basic widget.
Resizer is a sample project you can use to find out how to animate widget resizing.
Want to find out how Dashboard widgets use the web technologies you know?
Widget Object describes the properties and methods of the JavaScript Widget object.
Introduction to the Apple Classes describes the JavaScript classes Apple provides to make it easy to incorporate common controls and utilities in your widget.
Using the Canvas describes how to use the JavaScript canvas object to draw custom content in your widget.
Go In Depth
Sometimes you need task-focused information or answers to specific questions to get started. Browse the popular tasks described below for a more targeted way to start development on your Dashboard widget.
Display preferences on the back of your widget. Widget Backs and Preferences describes how to store and retrieve preferences and shows how to display the back of your widget.
Support cut, copy, and paste operations on your HTML content. Using the Pasteboard From JavaScript describes how to handle the necessary JavaScript events and explains how to manipulate pasteboard data.
Localize your widget. Localizing Widgets explains how Dashboard supports localization and describes what you need to do.
Ready for More?
The Safari Reference Library holds plenty more resources that make your job easier. To narrow the list of resources, you can set filters to focus on specific resource types (such as guides or sample code) or on specific topics (such as user experience or data management).
Copyright © 2009 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2009-02-17