With Jotform’s Dark Mode widget, you can let visitors switch between light and dark themes on your website. This gives them more control over how your site appears in different lighting conditions.
Whether you’re creating a blog, portfolio, online store, or business website, the widget makes it easy to offer both viewing options without changing your site’s overall design.
Adding the Dark Mode feature to your website only takes a few steps. Here’s how to set it up:
- On the top-left side of your Workspace page, click on Create.
- Then, in the menu that opens up, select Website Widget.
- Next, in the Search bar in the upper-left corner of Choose Website Widget, enter Dark Mode.
- Then, at the bottom of the Dark Mode widget, click on Use Widget.
- Now, in the Widget Properties menu that opens on the right side of Website Widgets, click and hold the slider handle, then drag it left or right to adjust the transition speed between light and dark mode.
- Next, under the Style tab, customize these properties:
- Theme Preset — Click on the Downward Arrow icon and select a preset theme to apply to the widget.
- Corner Radius — Choose the corner style of the widget elements: Square, Rounded, or Circular.
- Button Size — Click on and hold the slider handle, then drag it to set the width and height of the Dark Mode button.
- Custom CSS — Toggle this on, and then in the Code Editor below it, enter custom CSS code to apply advanced styling to the widget.
- Next, under the Layout tab, configure these options:
- Button Behavior — Choose whether the Dark Mode button stays fixed on the page or appears inline with your content.
- Button Position — Click on the Downward Arrow icon and select where the Dark Mode button appears on the page.
- Once everything’s set, in the pink navigation bar at the top of the page, click on Publish.
Note
You’ll be asked to log in to your Jotform account, if you’re not already, or sign up for one. Once you’ve done that, you’ll be able to get the embed code for your widget.
- Then, in the Embed section, click on Copy Code, and, if you already know how, paste that into the Embed section on your platform, and you’re good to go.
- To view embedding instructions for your widget, click on Platforms in the menu on the left side of the page.
- Next, in the Platforms section on the right, select the platform you want to view embedding instructions for. Or, use the Search bar at the top of the section to find it easily.
- Then, follow the steps in the How to Embed Your Widget section to add it to your website.
That’s it! Your Dark Mode widget will appear on your website based on how you set it up. Take a look at the screenshot below to see how it’ll look:
Note
You can manage the website widgets you’ve created at any time from your account. For a full breakdown of how to do it, head over to our guide on How to Manage Website Widgets.










Send Comment: