Documentation v1.0.11

Preview Purchase

Quick Setup

Craft supports full Dark Mode  that you can preview here and easiliy setup following the below instructions.

  1. Run gulp task with --dark-modeflag in theme/tools/folder to generate the Dark Mode of CSS files.
    gulp --dark-mode
    
    For Webpack user, use below command.
    npm run build --dark-mode
    
  2. Switch CSS files to their Dark Mode. For example style.dark.bundle.cssand plugins.dark.bundle.cssare generated in assets folder:
    <!--begin::Global Stylesheets Bundle(used by all pages)-->
    <link href="assets/plugins/global/plugins.dark.bundle.css" rel="stylesheet" type="text/css" />
    <link href="assets/css/style.dark.bundle.css" rel="stylesheet" type="text/css" />
    <!--end::Global Stylesheets Bundle-->
    
  3. Add dark-modeclass name to the <body>tag. Keep other bodyclass names.
    <body class="dark-mode ...">
    <!-- HTML content -->
    </body>
    
  4. Use Javascript API methods KTApp.setThemeMode(mode String, callback Function)to set the theme mode dynamically without refreshing the page:
    KTApp.setThemeMode("dark", function() {
        console.log("changed to dark mode");
    }); // set dark mode
    
    KTApp.setThemeMode("light", function() {
        console.log("changed to light mode");
    }); // set light mode
    
  5. Some images have special dark versions that can be flipped by just appending -darkprefix to the file name:
    <img src="assets/media/illustrations/sketchy-1/1.png"/>
    
    to:
    <img src="assets/media/illustrations/sketchy-1/1-dark.png"/>
    
Learn & Get Inspired

Support at devs.keenthemes.com

Join our developers community to find answer to your question and help others. FAQs
Get Support
Documentation
From guides and how-tos, to live demos and code examples to get started right away.
Plugins & Components
Check out our 300+ in-house components and customized 3rd-party plugins.
Layout Builder
Build your layout, preview it and export the HTML for server side integration.
What's New
Latest features and improvements added with our users feedback in mind.
Buy now