Now, you might be wondering if it's possible to customize the appearance of the widgets provided by jQuery UI. You probably have your own custom CSS and appearance in your web application, and you want to make sure that the widgets that you're going to use from jQuery UI look the same inside your web page. And the answer of course is yes. You can customize the way that they look. That's what we're going to do in this movie. So, let's go ahead and click on the Themes link right here. That will take me to the ThemeRoller application, and here is where I can customize the way that the widgets look.
Now, before I get started, let me just point out that this page, the ThemeRoller application, contains all of the user interface elements that jQuery UI provides. So we can see, at a glance, how each thing is going to look when we change the appearance. Right, here's the Accordion, the Buttons, the Autocomplete, the Spinner, the Datepicker, the Tabs and so on. So all the controls are right here on one page. Now, there's two ways to use ThemeRoller to build a custom appearance. The first way is to simply roll your own, in which case you have a whole bunch of categories that you can expand out and change the various settings for the theme that you can then download.
The other way to do it is to use the gallery of prebuilt themes that you can apply to the various user interface elements. So let me begin by just choosing a couple of the prebuilt themes so you can see what they look like. So, you can see here when I click on UI lightness, I get a nice prebuilt look and feel for these components. If I click on UI darkness, I get a completely different look and feel, and if I scroll down here to the bottom of the page, you'll see that below the section over here, there is a Reverse page background color option.
So, I can click that to see what the theme will look like on a dark-themed page. And you can see in this case the UI darkness looks a lot better on a dark theme page than it does on a light theme page. So, let's try a few more. Here's the Smoothness theme. Here's is the Start theme. Here is the Sunny theme. In fact let me go back and turn of that setting to go back to the light-colored page. Let's scroll back up. And this one, the Sunny one, looks kind of nice, and you know what? I think I am going to use this one in my practical example for later.
Now, one of the other things I want to point out is that you can customize the way that any one of these prebuilt themes looks by going back over to the Roll Your Own category after selecting the one that you want to use. So, in this case, if I go back to Roll Your Own, you'll see that now these categories have picked up all the settings that are predefined by default in the Sunny category. So, let me go scroll down a little bit and show you how some of these changes might look.
So here's the Alert Sample, right. This is what an error message might look like using the Sunny UI sample. So, let me scroll back up and choose the Error category. Let me choose a different background color. So right now it's kind of this reddish kind of color. Let me make it purple, okay, and you can see that when I scroll back down now, you can see there it's changed. I'll scroll back up. And let me choose a different icon color. Let's make the icon nice and green, and when we scroll back down, you can see that the icon is now green.
So, you can customize the way that any one of the prebuilt themes looks inside of the ThemeRoller application. Now, when you're ready to download, you can download the theme just by itself. If you click on Download Theme, this will take me to the Download Builder application, which will allow me to download all of jQuery UI as well as the theme. But if I scroll down, you'll see that this has now been set to Custom Theme. It lets me choose the name of the folder. I can rename it here if I want to.
So, I could rename it Joe's Sunny theme or whatever. Let me go back to the ThemeRoller application. All right! So that's how we use ThemeRoller to build a custom appearance or a predefined appearance for the widgets that you want to use in your application using jQuery UI.
Get unlimited access to all courses for just $25/month.Become a member