UNPKG

ranui

Version:

A framework-agnostic Web Components UI library built on native custom elements, with TypeScript types, light/dark theming, SSR and PWA support.

33 lines (32 loc) 1.27 kB
import { RanElement } from '../../utils'; export declare class Card extends RanElement { _shadowDom: ShadowRoot; _titleEl: HTMLElement; _descriptionEl: HTMLElement; _headerEl: HTMLElement; _footerEl: HTMLElement; static get observedAttributes(): string[]; constructor(); /** * Heading text. * * Not `title`: that is a native `HTMLElement` attribute, and the browser renders it as a * tooltip. A component using it for a heading makes every instance sprout a tooltip * repeating the text already on screen, and there is no way to switch that off once the * attribute is set. */ get heading(): string; set heading(value: string); get description(): string; set description(value: string); get sheet(): string; set sheet(value: string); /** Interactive card (Geist): hover darkens the border and lifts to the elevated shadow tier. Purely presentational — gate it to cards that are actually clickable. */ get hoverable(): boolean; set hoverable(value: boolean); private _syncTitle; private _syncDescription; connectedCallback(): void; attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void; } export default Card;