{"library":"sling-framework","title":"Sling Framework","description":"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.","language":"javascript","status":"maintenance","last_verified":"Fri May 01","install":{"commands":["npm install sling-framework"],"cli":null},"imports":["import { SlingElement } from 'sling-framework'","import { html } from 'sling-framework'","import { withRequest } from 'sling-framework/decorators';"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { SlingElement, html } from 'sling-framework';\n\nexport const StarRating = (Base = class {}) => class extends Base {\n  static get properties() {\n    return {\n      rate: {\n        type: Number,\n        reflectToAttribute: true,\n      },\n    };\n  }\n\n  render() {\n    return html`\n      <style>\n        button { color: grey; border: none; font-size: 32px; }\n        button.selected { color: gold; }\n      </style>\n      ${[1, 2, 3, 4, 5].map(index => html`\n        <button className=\"${index <= this.rate ? ' selected' : ''}\">★</button>\n      `)}\n    `;\n  }\n}\n\ncustomElements.define('star-rating', StarRating(SlingElement));","lang":"javascript","description":"Creates a star rating web component using SlingElement and html template literal.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}