How to Add Dark Mode to Your Website

September 14, 2026

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:

  1. On the top-left side of your Workspace page, click on Create.
Jotform Workspace page with the Create button visible in the top-left corner for starting a new Jotform project
  1. Then, in the menu that opens up, select Website Widget.
Jotform Workspace Create menu showing the Website Widget option for creating a new website widget
  1. Next, in the Search bar in the upper-left corner of Choose Website Widget, enter Dark Mode.
  2. Then, at the bottom of the Dark Mode widget, click on Use Widget.
Jotform Choose Website Widget window with Dark Mode entered in the upper-left Search bar, and the Use Widget button visible at the bottom of the Dark Mode widget
  1. 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.
Jotform Dark Mode widget properties showing the transition speed slider, with the slider handle being dragged left or right to adjust the speed of switching between light and dark mode
  1. 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.
Jotform Dark Mode widget Style tab showing Theme Preset, Corner Radius, Button Size slider, and Custom CSS options for customizing the widget’s appearance and styling
  1. 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.
  2. Once everything’s set, in the pink navigation bar at the top of the page, click on Publish.
Jotform Dark Mode widget Layout tab showing Button Behavior and Button Position settings, with the Publish button visible in the pink navigation bar at the top

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.

  1. 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.
Jotform Dark Mode widget Embed section showing the Copy Code button for copying the widget’s embed code and adding it to a website or other platform
  1. To view embedding instructions for your widget, click on Platforms in the menu on the left side of the page.
  2. 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.
Jotform Dark Mode widget Platforms section showing platform options and a Search bar for finding platform-specific embedding instructions
  1. Then, follow the steps in the How to Embed Your Widget section to add it to your website.
Jotform Dark Mode widget How to Embed Your Widget section displaying step-by-step instructions for adding the widget to a 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:

Jotform Dark Mode widget displayed on a website according to the selected settings, showing the widget’s configured appearance and placement

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:

Jotform Avatar
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Podo Comment Be the first to comment.
Still have unanswered questions?

We’re here for you 24/7, anytime you need us day or night. Have a question or need a hand with something? Our team is always ready to help out.