Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in miliseconds.
Comments
2
stevekrouse avatar

Nice!

  1. What are the button and bloom-button classes doing in the example?
  2. Can you have the bulmaswatch css file get added dynamically so the user has to import one less thing?
  3. In theory this could be a good use case for custom html elements, but those are funky
maxm avatar

@stevekrouse

.bloom-button is the class you need in order for the affect to be applied.

.button and the bulmaswatch stuff is just for the demo, you could style your button however you like.

#3 yes, I wondered how I'd package that up. I know @pomdtr had some examples like that but I'm not sure how I'd inject the javascript reliably. maybe just inject a script tag for every element?

Updated: May 29, 2024