DocumentProps
HTML attributes accepted by Document, including its debug flag.
Compatibility
ReactAvailable in this renderer's browser integration.
React SSRAvailable to this renderer's SSR integration; browser event handlers run after hydration.
PreactAvailable in this renderer's browser integration.
Preact SSRAvailable to this renderer's SSR integration; browser event handlers run after hydration.
Import from @kasperrt/smolter/preact/document @kasperrt/smolter/react/document
Signature
interface DocumentProps extends ComponentProps<"html"> {
"data-debug"?: boolean;
}Usage
Extends Preact's HTML element props and adds an optional boolean data-debug field. The client reconciliation behavior of Document applies to className, lang, and data-debug; other attributes belong to the server markup.
import type { DocumentProps } from "@kasperrt/smolter/preact/document";
const attributes: DocumentProps = {
lang: "en",
className: "app",
"data-debug": false,
};Fields
"data-debug"
"data-debug"?: boolean;