vault66-crt-effect
Version:
A customizable CRT (retro monitor) visual effect for React, Vue, and Web Components
30 lines (29 loc) • 980 B
text/typescript
/**
* `<crt-effect>` Web Component.
*
* Framework-agnostic: works in plain HTML, Astro, Vue, Svelte, Solid — anywhere
* that renders DOM. It uses Shadow DOM with an adopted stylesheet, so it is
* fully self-contained: no separate CSS import is needed. Your content is
* projected through a <slot> and keeps its own page styles.
*
* ```html
* <crt-effect preset="fallout" fill>
* <h1>Welcome to the Wasteland</h1>
* </crt-effect>
* ```
*/
export declare const CRT_EFFECT_TAG = "crt-effect";
export declare class CRTEffectElement extends HTMLElement {
static get observedAttributes(): string[];
private root;
private mount;
private connected;
constructor();
connectedCallback(): void;
attributeChangedCallback(): void;
private readOptions;
private render;
}
/** Register `<crt-effect>` (idempotent). Called automatically on import. */
export declare function defineCrtEffect(tag?: string): void;
export default CRTEffectElement;