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
How to Build an AI-Powered Page Builder with GrapesJS in 2026
What we learned building GJSDocs β from simple AI text generation to structured, context-aware visual editing
Tutorial
How Much Does It Cost to Build a SaaS Page Builder in 2026?
How much does it cost to build a SaaS page builder in 2026? Explore realistic development costs, timelines, features, and how using GrapesJS can reduce
Tutorial
PageKit: the GrapesJS application you'd have to build anyway
A source-available Next.js app around the open-source GrapesJS core β publishing, custom domains, leads, checkout and a plugin loader.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.