TemplateElementParams

@mvuijs/core / TemplateElementParams

TemplateElementParams<T, Params, Props> #

<T, Params, Props> object

{
    attrs?: Partial<{ [Property in keyof Params["attributes"]]: MaybeSubscribable<Params["attributes"][Property]> | MaybeSubscribable<ToStringable> } & {
        class: MaybeSubscribable<ToStringable>;
    } & {
    }>;
    classes?: {
    };
    events?: Partial<{ [Property in Exclude<keyof GlobalEventHandlersEventMapWithTarget<T>, keyof Params["events"]>]: Function } & { [Property in keyof Params["events"]]: Function }>;
    fields?: Partial<{ [Property in keyof T]: MaybeSubscribable<T[Property]> }>;
    props: Props extends undefined ? never : PropsDefToTemplate<Props>;
    ref?: {
        current: HTMLElement;
    };
    slots?: Partial<{ [Property in keyof Params["slots"]]: TemplateElementChildren<Params["slots"] extends Object ? Params["slots"][Property] : any> }>;
    style?: Partial<{ [key in keyof CSSStyleDeclaration]: MaybeSubscribable<ToStringable> }>;
    styleOverrides?: MvuiCSSSheet;
}

Type parameters #

  • T extends HTMLElement
  • Params extends ParamSpec = {}
  • Props extends {

} = {}

Type declaration #

Member Type
attrs? Partial<{ [Property in keyof Params["attributes"]]: MaybeSubscribable<Params["attributes"][Property]> | MaybeSubscribable<ToStringable> } & { class: MaybeSubscribable < ToStringable >; } & { }>
classes? { }
events? Partial<{ [Property in Exclude<keyof GlobalEventHandlersEventMapWithTarget<T>, keyof Params["events"]>]: Function } & { [Property in keyof Params["events"]]: Function }>
fields? Partial<{ [Property in keyof T]: MaybeSubscribable<T[Property]> }>
props Props extends undefined ? never : PropsDefToTemplate<Props>
ref? object
ref.current HTMLElement
slots? Partial<{ [Property in keyof Params["slots"]]: TemplateElementChildren<Params["slots"] extends Object ? Params["slots"][Property] : any> }>
style? Partial<{ [key in keyof CSSStyleDeclaration]: MaybeSubscribable<ToStringable> }>
styleOverrides? MvuiCSSSheet

Defined in: packages/core/src/template-element.ts:148