Skip to content
This repository has been archived by the owner on Apr 18, 2020. It is now read-only.

whitefusionhq/stimulus-jolt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stimulus-jolt

Jolt is a simple view rendering library for Stimulus to supercharge your targets. Instead of writing code like this:

this.nameTarget.textContent = "ACME Widgets, Inc."
this.nameTarget.classList.add('text-bold')
this.nameTarget.dataset.id = 25
this.descriptionTarget.innerHTML = descriptionValue

You can write code like this:

this.renderTargets({
  name: [
    "ACME Widgets, Inc.",
    {class: 'text-bold', toggle: true},
    {data: 'id', value: 25}
  ],
  description: {html: descriptionValue}
})

In addition, you can tell Jolt to render an HTML template into your controller element automatically, and it also supports transformation callbacks so text or HTML content can be modified by your controller before it flows into the target.

About

Jolt is a simple view rendering library for Stimulus to supercharge your targets.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published