question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Theme property in options

See original GitHub issue

Options should have a theme option that can be used to specify which options should be used, like the array index configuration.

This should help create particles themes creating a general preset that will be added to the tsParticles instance and the named options with customisations.

This is an example of how should work:

tsParticles.load("tsparticles", {
  themes: [
    {
      name: "light",
      default: true,
      options: {
        background: {
          color: "#fff"
        },
        particles: {
          color: {
            value: "#000" // black particles on light background
          }
        }
      }
    },
    {
      name: "dark",
      default: false, // this property defaults to false
      options: {
        background: {
          color: "#000"
        },
        particles: {
          color: {
            value: "#fff" // white particles on dark background
          }
        }
      }
    }
  ]
  /* all your cool options */
});

tsParticles.useTheme('light');
tsParticles.useTheme('dark');

This is what I think this feature should be

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
matteobrunicommented, Aug 8, 2020

Hi @Himanshunitrr,

Welcome and thanks! If you want to discuss this issue or need help you can join Slack so we can talk more freely, otherwise we can discuss here if you don’t want. No pressure 😉

1reaction
Himanshunitrrcommented, Aug 8, 2020

I will like to fix this issue with some help!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Theme Options - TwentyThree
Using Theme options, developers can turn simple designs into customizable themes where ordinary users can modify logos, colours, fonts, and sizes in a ......
Read more >
Theme Options - Design - Property Page Settings
To manage the property page display options navigate to Theme Options > Design > Property Page > Property Page Settings and locate the...
Read more >
An Introduction to Theme Options - Shopify
To build out a theme, theme options require four mandatory properties: Type, which defines what property is being rendered; ID, ...
Read more >
Add Options to Your Theme | Weebly Developer Documentation
You configure theme options in the manifest file where you declare the option, it's type, default value, and if a dropdown type, the...
Read more >
Theme options property Settings. - YouTube
Theme options property Settings. 162 views 3 years ago. zozothemes. zozothemes. 87 subscribers. Subscribe. 2. I like this. I dislike this.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found