Created
January 7, 2026 16:52
-
-
Save librasteve/a81f38f1ced57744e434c13e3571fe2f to your computer and use it in GitHub Desktop.
Air Lit Thoughts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {html, css, LitElement} from 'lit'; | |
| import {customElement, property} from 'lit/decorators.js'; | |
| @customElement('simple-greeting') | |
| export class SimpleGreeting extends LitElement { | |
| static styles = css`p { color: blue }`; | |
| @property() | |
| name = 'Somebody'; | |
| render() { | |
| return html`<p>Hello, ${this.name}!</p>`; | |
| } | |
| } | |
| #then consume | |
| <!DOCTYPE html> | |
| <head> | |
| <script type="module" src="./simple-greeting.js"></script> | |
| </head> | |
| <body> | |
| <simple-greeting name="World"></simple-greeting> | |
| </body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment