Set a button from Component settings active on click
Question
So i made a custom countdown with a button
The button set the countdown but i want to make the button active like other elements on click.
my code:

Answers (2)
@artf please help
Unfortunately, the default button type is made to execute only one command, so if you have to do something fancy I'd suggest you to create your own trait https://grapesjs.com/docs/modules/Traits.html#define-new-trait-type
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2893
Can I set for loop value in components render?
Hi,I'm beginner in grapesjs. I want to make a question number by for loop when I dropped components, βI want final like this image. the div...
Issue #2583
Breakpoints don't match media query in canvas
Hey @artf I have multiple breakpoints The problem is that when i am a resolution (set using the icons) like 411 (mobile) not always the can...
Issue #2585
Countdown warning
I have a countdown on my custom trait with the type datetime-local. When i click the element this issue appears. My code: This happens also...
Issue #2865
Enable 'view components' button on panel by default
this button is currently off by default. so you have to turn it on every time, which is not obvious to everyone. how do you make it active...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins βPremium plugins ship with support, regular updates, and production-ready features β save days of integration work.
Browse premium plugins βRelated tutorials
In-depth guides on the same topic.
Tutorial
Vanilla GrapesJS vs GrapesJS With Plugins: What You Actually Get Out of the Box (2026)
New to GrapesJS? See exactly what the stock editor gives you, where it falls short, and which plugins close the gaps β a beginner-friendly 2026 comparison
Tutorial
Lighthouse for GrapesJS: Audit Accessibility and SEO Without Leaving the Editor
Live WCAG 2.1/2.2 accessibility auditor + SEO manager for GrapesJS. Every finding is bound to the exact component β click to select, then one-click fix.
Tutorial
GrapesJS DevTools: A Developer Panel Inside Your Editor
If you've ever debugged GrapesJS with console.log(editor.getSelected()) and a dozen throwaway event listeners β this post is for you.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.