I currently have this simple stimulus JS controller which removes an element from DOM
import { Controller } from "stimulus"
export default class extends Controller {
static targets = [ "element" ]
close () {
this.elementTarget.remove()
}
}
Is there a way to fade out the element before removal?