No description
  • JavaScript 89.2%
  • HTML 10.8%
Find a file
dependabot[bot] bdd7d6ac3e
Bump the linting group across 1 directory with 3 updates (#64)
* Bump the linting group across 1 directory with 3 updates

Bumps the linting group with 3 updates in the / directory: [@tree-company/eslint-config](https://github.com/tree-company/developer-handbook), [eslint](https://github.com/eslint/eslint) and [prettier](https://github.com/prettier/prettier).


Updates `@tree-company/eslint-config` from 0.5.0 to 0.6.0
- [Commits](https://github.com/tree-company/developer-handbook/commits)

Updates `eslint` from 10.2.1 to 10.5.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v10.2.1...v10.5.0)

Updates `prettier` from 3.8.3 to 3.8.4
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.8.3...3.8.4)

---
updated-dependencies:
- dependency-name: "@tree-company/eslint-config"
  dependency-version: 0.6.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: linting
- dependency-name: eslint
  dependency-version: 10.5.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: linting
- dependency-name: prettier
  dependency-version: 3.8.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: linting
...

Signed-off-by: dependabot[bot] <support@github.com>

* Use strict equality

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Robbe Van Petegem <git@robbevp.be>
2026-06-17 15:02:30 +02:00
.github Bump release-drafter/release-drafter from 6 to 7 (#54) 2026-04-01 09:14:03 +02:00
src Bump the linting group across 1 directory with 3 updates (#64) 2026-06-17 15:02:30 +02:00
.gitignore Create public release 2025-03-26 08:39:17 +01:00
CHANGELOG.md Bump version to v0.3.2 2026-01-30 08:57:10 +01:00
eslint.config.js Create public release 2025-03-26 08:39:17 +01:00
index.html Add FormAutosubmitElement (#32) 2025-10-17 13:58:18 +02:00
LICENSE Create public release 2025-03-26 08:39:17 +01:00
logo_tree.png Create public release 2025-03-26 08:39:17 +01:00
package.json Bump the linting group across 1 directory with 3 updates (#64) 2026-06-17 15:02:30 +02:00
README.md Create public release 2025-03-26 08:39:17 +01:00
vite.config.js Create public release 2025-03-26 08:39:17 +01:00
yarn.lock Bump the linting group across 1 directory with 3 updates (#64) 2026-06-17 15:02:30 +02:00

Sprinkles

Sprinkles is a small library to add small amounts of javascript to your html.

We try to simplify working with custom elements by:

  • Reducing the amount of boilerplate you have to write to add and remove event listeners
  • Providing a convention for referencing nodes within your element

This approach takes inspiration from AlpineJS and Stimulus, but is fully build around custom elements.

Using the library

Build your own elements

You can easily build your own custom element on top of SprinklesElement. A simple hello world:

import { SprinklesElement } from "sprinkles-js";

class HelloWorldElement extends SprinklesElement {
  static tagName = "hello-world";
  static events = {
    click: "greet"
  }

  greet(event) {
    console.log("Got click event: ", event);
    alert("Hello world!")
  }
}

HelloWorldElement.register();

<hello-world></hello-world>

Included components

In addition to the abstract sprinkles element, we also include some basic elements that you can use.

ClickableCard

A card that can be clicked anywhere to follow the link inside it:

import { ClickableCard } from "sprinkles-js";

ClickableCard.register();
<clickable-card>
  <p>Some text</p>
  </p>

  <a href="https://example.com" data-clickable-card-ref="link">A link</a>

  <button>A button that doesn't trigger</button>
</clickable-card>

This library was extracted from various projects at Tree company.

Tree company