Skip to content

@arcmantle/lit-jsx / runtime/rest-directive

runtime/rest-directive

Variables

__$rest

const __$rest: DirectiveResult<typeof RestDirective>

Defined in: runtime/rest-directive.ts:63

Lit directive for applying rest/spread props to DOM elements.

This directive efficiently applies an object of properties and attributes to a DOM element, handling the differences between properties and attributes automatically.

Example

tsx
const props = { className: 'my-class', disabled: true };
<div {...__$rest(props)}>Content</div>

Released under the Apache-2.0 License.