A web component library built on top of LitElement and lit-html, providing building blocks for creating Sling-based web components. Current stable version is 1.12.5. It offers SlingElement (extended from LitElement), html tagged template literal, withRequest decorator for API handling, and withSetState for state management. Key differentiators include direct integration with Sling ecosystem and added decorators for common patterns. Release cadence is sporadic with no recent updates.
npm install sling-frameworkNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a star rating web component using SlingElement and html template literal.
Use correct import: import { withRequest } from 'sling-framework/decorators';Consider using lit-element v2.x or migrating to a newer solution like Lit.
Install type definitions or use TypeScript with 'any'.
Ensure lit-html v1.x is installed as a peer dependency.
Use import { withRequest } from 'sling-framework/decorators'; or check if decorators are exported from main entry.Use import { html } from 'sling-framework'; (named export, not default).Install lit-html@^1.0.0 as a peer dependency.