Last active
May 15, 2024 11:29
-
-
Save adoublef/186b24f60fdd413935e38ca1dbf1763c to your computer and use it in GitHub Desktop.
JSX for HTMX
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Booleanish = boolean | "true" | "false"; | |
type CrossOrigin = "anonymous" | "use-credentials" | "" | undefined; | |
// export = JSX; | |
// export as namespace JSX; | |
declare namespace JSX { | |
interface HTMLProps<T> extends AllHTMLAttributes<T> {} | |
// type DetailedHTMLProps<E extends HTMLAttributes<T>, T> = E; | |
interface SVGProps<T> extends SVGAttributes<T> {} | |
interface SVGLineElementAttributes<T> extends SVGProps<T> {} | |
interface SVGTextElementAttributes<T> extends SVGProps<T> {} | |
interface DOMAttributes<T> { | |
children?: | |
| string | |
| (string & { isEscaped: true }) | |
| (string & { isEscaped: true })[] | |
| undefined; | |
dangerouslySetInnerHTML?: { __html: string } | undefined; | |
} | |
// All the HTMX attributes from https://htmx.org/reference/ | |
interface HtmxAttributes { | |
/** Add or remove progressive enhancement for links and forms */ | |
"hx-boost"?: Booleanish | undefined; | |
/** Issues a `GET` to the specified URL */ | |
"hx-get"?: string | undefined; | |
/** Issues a `POST` to the specified URL */ | |
"hx-post"?: string | undefined; | |
/** Handle any event with a script inline */ | |
"hx-on"?: string | undefined; | |
"hx-push-url"?: Booleanish | string | undefined; | |
"hx-select"?: string | undefined; | |
"hx-select-oob"?: string | undefined; | |
/** Controls how content is swapped in */ | |
"hx-swap"?: SwapTarget | undefined; | |
/** Marks content in a response to be out of band (should swap in somewhere other than the target) */ | |
"hx-swap-oob"?: true | SwapTarget | string | undefined; | |
/** Specifies the target element to be swapped */ | |
"hx-target"?: string | undefined; | |
/** Specifies the event that triggers the request */ | |
"hx-trigger"?: string | undefined; | |
/** Adds values to the parameters to submit with the request (JSON-formatted) */ | |
"hx-vals"?: string | undefined; | |
/** Shows a `confirm()` dialog before issuing a request */ | |
"hx-confirm"?: string | undefined; | |
/** Issues a `DELETE` to the specified URL */ | |
"hx-delete"?: string | undefined; | |
/** Disables htmx processing for the given node and any children nodes */ | |
"hx-disable"?: Booleanish | undefined; | |
/** Control and disable automatic attribute inheritance for child nodes */ | |
"hx-disinherit"?: string | undefined; | |
/** Changes the request encoding type */ | |
"hx-encoding"?: | |
| "application/x-www-form-urlencoded" | |
| "multipart/form-data" | |
| undefined; | |
/** Extensions to use for this element */ | |
"hx-ext"?: string | undefined; | |
/** Adds to the headers that will be submitted with the request */ | |
"hx-headers"?: string | undefined; | |
/** Prevent sensitive data being saved to the history cache */ | |
"hx-history"?: Booleanish | undefined; | |
/** The element to snapshot and restore during history navigation */ | |
"hx-history-elt"?: Booleanish | undefined; | |
/** Include additional data in requests */ | |
"hx-include"?: string | undefined; | |
/** The element to put the `htmx-request` class on during the request */ | |
"hx-indicator"?: string | undefined; | |
/** Filters the parameters that will be submitted with a request. Default is "*" */ | |
"hx-params"?: "*" | "none" | string | undefined; | |
/** Issues a `PATCH` to the specified URL */ | |
"hx-patch"?: string | undefined; | |
/** Specifies elements to keep unchanged between requests */ | |
"hx-preserve"?: Booleanish | undefined; | |
/** Shows a `prompt()` before submitting a request */ | |
"hx-prompt"?: string | undefined; | |
/** Issues a `PUT` to the specified URL */ | |
"hx-put"?: string | undefined; | |
/** Replace the URL in the browser location bar */ | |
"hx-replace-url"?: Booleanish | string | undefined; | |
/** Configures various aspects of the request */ | |
"hx-request"?: string | undefined; | |
/** @deprecated Has been moved to an extension. */ | |
"hx-sse"?: string | undefined; | |
/** Control how requests made by different elements are synchronized */ | |
"hx-sync"?: string | undefined; | |
/** Force elements to validate themselves before a request */ | |
// "hx-validate"?: string | undefined; | |
/** @deprecated Adds values dynamically to the parameters to submit with the request (deprecated, please use hx-vals) */ | |
"hx-vars"?: string | undefined; | |
/** @deprecated Has been moved to an extension. */ | |
"hx-ws"?: string | undefined; | |
/** | |
* To use, the extension script must be included in the markup: | |
* ```js | |
* <script src="https://unpkg.com/[email protected]"></script> | |
* ``` | |
* | |
* Example using a a button to send a message to a form element: | |
* ```js | |
* <button _="on click send hello to <form />">Send</button> | |
* ``` | |
* | |
* [More info](https://hyperscript.org/) | |
*/ | |
_?: string | undefined; | |
} | |
type SwapTarget = | |
| "innerHTML" | |
| "outerHTML" | |
| "beforebegin" | |
| "afterbegin" | |
| "beforend" | |
| "afterend" | |
| "delete" | |
| "none"; | |
// All the WAI-ARIA 1.1 attributes from https://www.w3.org/TR/wai-aria-1.1/ | |
interface AriaAttributes { | |
/** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */ | |
"aria-activedescendant"?: string | undefined; | |
/** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. */ | |
"aria-atomic"?: Booleanish | undefined; | |
/** | |
* Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be | |
* presented if they are made. | |
*/ | |
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined; | |
/** Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. */ | |
/** | |
* Defines a string value that labels the current element, which is intended to be converted into Braille. | |
* @see aria-label. | |
*/ | |
"aria-braillelabel"?: string | undefined; | |
/** | |
* Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille. | |
* @see aria-roledescription. | |
*/ | |
"aria-brailleroledescription"?: string | undefined; | |
"aria-busy"?: Booleanish | undefined; | |
/** | |
* Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. | |
* @see aria-pressed @see aria-selected. | |
*/ | |
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined; | |
/** | |
* Defines the total number of columns in a table, grid, or treegrid. | |
* @see aria-colindex. | |
*/ | |
"aria-colcount"?: number | undefined; | |
/** | |
* Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. | |
* @see aria-colcount @see aria-colspan. | |
*/ | |
"aria-colindex"?: number | undefined; | |
/** | |
* Defines a human readable text alternative of aria-colindex. | |
* @see aria-rowindextext. | |
*/ | |
"aria-colindextext"?: string | undefined; | |
/** | |
* Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. | |
* @see aria-colindex @see aria-rowspan. | |
*/ | |
"aria-colspan"?: number | undefined; | |
/** | |
* Identifies the element (or elements) whose contents or presence are controlled by the current element. | |
* @see aria-owns. | |
*/ | |
"aria-controls"?: string | undefined; | |
/** Indicates the element that represents the current item within a container or set of related elements. */ | |
"aria-current"?: | |
| boolean | |
| "false" | |
| "true" | |
| "page" | |
| "step" | |
| "location" | |
| "date" | |
| "time" | |
| undefined; | |
/** | |
* Identifies the element (or elements) that describes the object. | |
* @see aria-labelledby | |
*/ | |
"aria-describedby"?: string | undefined; | |
/** | |
* Defines a string value that describes or annotates the current element. | |
* @see related aria-describedby. | |
*/ | |
"aria-description"?: string | undefined; | |
/** | |
* Identifies the element that provides a detailed, extended description for the object. | |
* @see aria-describedby. | |
*/ | |
"aria-details"?: string | undefined; | |
/** | |
* Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. | |
* @see aria-hidden @see aria-readonly. | |
*/ | |
"aria-disabled"?: Booleanish | undefined; | |
/** | |
* Indicates what functions can be performed when a dragged object is released on the drop target. | |
* @deprecated in ARIA 1.1 | |
*/ | |
"aria-dropeffect"?: | |
| "none" | |
| "copy" | |
| "execute" | |
| "link" | |
| "move" | |
| "popup" | |
| undefined; | |
/** | |
* Identifies the element that provides an error message for the object. | |
* @see aria-invalid @see aria-describedby. | |
*/ | |
"aria-errormessage"?: string | undefined; | |
/** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */ | |
"aria-expanded"?: Booleanish | undefined; | |
/** | |
* Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, | |
* allows assistive technology to override the general default of reading in document source order. | |
*/ | |
"aria-flowto"?: string | undefined; | |
/** | |
* Indicates an element's "grabbed" state in a drag-and-drop operation. | |
* @deprecated in ARIA 1.1 | |
*/ | |
"aria-grabbed"?: Booleanish | undefined; | |
/** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */ | |
"aria-haspopup"?: | |
| boolean | |
| "false" | |
| "true" | |
| "menu" | |
| "listbox" | |
| "tree" | |
| "grid" | |
| "dialog" | |
| undefined; | |
/** | |
* Indicates whether the element is exposed to an accessibility API. | |
* @see aria-disabled. | |
*/ | |
"aria-hidden"?: Booleanish | undefined; | |
/** | |
* Indicates the entered value does not conform to the format expected by the application. | |
* @see aria-errormessage. | |
*/ | |
"aria-invalid"?: | |
| boolean | |
| "false" | |
| "true" | |
| "grammar" | |
| "spelling" | |
| undefined; | |
/** Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. */ | |
"aria-keyshortcuts"?: string | undefined; | |
/** | |
* Defines a string value that labels the current element. | |
* @see aria-labelledby. | |
*/ | |
"aria-label"?: string | undefined; | |
/** | |
* Identifies the element (or elements) that labels the current element. | |
* @see aria-describedby. | |
*/ | |
"aria-labelledby"?: string | undefined; | |
/** Defines the hierarchical level of an element within a structure. */ | |
"aria-level"?: number | undefined; | |
/** Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. */ | |
"aria-live"?: "off" | "assertive" | "polite" | undefined; | |
/** Indicates whether an element is modal when displayed. */ | |
"aria-modal"?: Booleanish | undefined; | |
/** Indicates whether a text box accepts multiple lines of input or only a single line. */ | |
"aria-multiline"?: Booleanish | undefined; | |
/** Indicates that the user may select more than one item from the current selectable descendants. */ | |
"aria-multiselectable"?: Booleanish | undefined; | |
/** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */ | |
"aria-orientation"?: "horizontal" | "vertical" | undefined; | |
/** | |
* Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship | |
* between DOM elements where the DOM hierarchy cannot be used to represent the relationship. | |
* @see aria-controls. | |
*/ | |
"aria-owns"?: string | undefined; | |
/** | |
* Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. | |
* A hint could be a sample value or a brief description of the expected format. | |
*/ | |
"aria-placeholder"?: string | undefined; | |
/** | |
* Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. | |
* @see aria-setsize. | |
*/ | |
"aria-posinset"?: number | undefined; | |
/** | |
* Indicates the current "pressed" state of toggle buttons. | |
* @see aria-checked @see aria-selected. | |
*/ | |
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined; | |
/** | |
* Indicates that the element is not editable, but is otherwise operable. | |
* @see aria-disabled. | |
*/ | |
"aria-readonly"?: Booleanish | undefined; | |
/** | |
* Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. | |
* @see aria-atomic. | |
*/ | |
"aria-relevant"?: | |
| "additions" | |
| "additions removals" | |
| "additions text" | |
| "all" | |
| "removals" | |
| "removals additions" | |
| "removals text" | |
| "text" | |
| "text additions" | |
| "text removals" | |
| undefined; | |
/** Indicates that user input is required on the element before a form may be submitted. */ | |
"aria-required"?: Booleanish | undefined; | |
/** Defines a human-readable, author-localized description for the role of an element. */ | |
"aria-roledescription"?: string | undefined; | |
/** | |
* Defines the total number of rows in a table, grid, or treegrid. | |
* @see aria-rowindex. | |
*/ | |
"aria-rowcount"?: number | undefined; | |
/** | |
* Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. | |
* @see aria-rowcount @see aria-rowspan. | |
*/ | |
"aria-rowindex"?: number | undefined; | |
/** | |
* Defines a human readable text alternative of aria-rowindex. | |
* @see aria-colindextext. | |
*/ | |
"aria-rowindextext"?: string | undefined; | |
/** | |
* Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. | |
* @see aria-rowindex @see aria-colspan. | |
*/ | |
"aria-rowspan"?: number | undefined; | |
/** | |
* Indicates the current "selected" state of various widgets. | |
* @see aria-checked @see aria-pressed. | |
*/ | |
"aria-selected"?: Booleanish | undefined; | |
/** | |
* Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. | |
* @see aria-posinset. | |
*/ | |
"aria-setsize"?: number | undefined; | |
/** Indicates if items in a table or grid are sorted in ascending or descending order. */ | |
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined; | |
/** Defines the maximum allowed value for a range widget. */ | |
"aria-valuemax"?: number | undefined; | |
/** Defines the minimum allowed value for a range widget. */ | |
"aria-valuemin"?: number | undefined; | |
/** | |
* Defines the current value for a range widget. | |
* @see aria-valuetext. | |
*/ | |
"aria-valuenow"?: number | undefined; | |
/** Defines the human readable text alternative of aria-valuenow for a range widget. */ | |
"aria-valuetext"?: string | undefined; | |
} | |
// All the WAI-ARIA 1.1 role attribute values from https://www.w3.org/TR/wai-aria-1.1/#role_definitions | |
type AriaRole = | |
| "alert" | |
| "alertdialog" | |
| "application" | |
| "article" | |
| "banner" | |
| "button" | |
| "cell" | |
| "checkbox" | |
| "columnheader" | |
| "combobox" | |
| "complementary" | |
| "contentinfo" | |
| "definition" | |
| "dialog" | |
| "directory" | |
| "document" | |
| "feed" | |
| "figure" | |
| "form" | |
| "grid" | |
| "gridcell" | |
| "group" | |
| "heading" | |
| "img" | |
| "link" | |
| "list" | |
| "listbox" | |
| "listitem" | |
| "log" | |
| "main" | |
| "marquee" | |
| "math" | |
| "menu" | |
| "menubar" | |
| "menuitem" | |
| "menuitemcheckbox" | |
| "menuitemradio" | |
| "navigation" | |
| "none" | |
| "note" | |
| "option" | |
| "presentation" | |
| "progressbar" | |
| "radio" | |
| "radiogroup" | |
| "region" | |
| "row" | |
| "rowgroup" | |
| "rowheader" | |
| "scrollbar" | |
| "search" | |
| "searchbox" | |
| "separator" | |
| "slider" | |
| "spinbutton" | |
| "status" | |
| "switch" | |
| "tab" | |
| "table" | |
| "tablist" | |
| "tabpanel" | |
| "term" | |
| "textbox" | |
| "timer" | |
| "toolbar" | |
| "tooltip" | |
| "tree" | |
| "treegrid" | |
| "treeitem" | |
| (string & {}); | |
// https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes | |
interface HTMLAttributes<T> | |
extends AriaAttributes, | |
DOMAttributes<T>, | |
HtmxAttributes { | |
// Standard HTML Attributes | |
accessKey?: string | undefined; | |
autoFocus?: boolean | undefined; | |
class?: string | undefined; | |
contentEditable?: Booleanish | "inherit" | undefined; | |
contextMenu?: string | undefined; | |
dir?: string | undefined; | |
draggable?: Booleanish | undefined; | |
hidden?: boolean | undefined; | |
id?: string | undefined; | |
lang?: string | undefined; | |
nonce?: string | undefined; | |
placeholder?: string | undefined; | |
slot?: string | undefined; | |
spellCheck?: Booleanish | undefined; | |
// style?: CSSProperties | undefined; | |
tabIndex?: number | undefined; | |
title?: string | undefined; | |
translate?: "yes" | "no" | undefined; | |
// WAI-ARIA | |
role?: AriaRole | undefined; | |
// Non-standard Attributes | |
autoCapitalize?: string | undefined; | |
autoCorrect?: string | undefined; | |
autoSave?: string | undefined; | |
color?: string | undefined; | |
itemProp?: string | undefined; | |
itemScope?: boolean | undefined; | |
itemType?: string | undefined; | |
itemID?: string | undefined; | |
itemRef?: string | undefined; | |
results?: number | undefined; | |
security?: string | undefined; | |
unselectable?: "on" | "off" | undefined; | |
// Living Standard | |
/** | |
* Hints at the type of data that might be entered by the user while editing the element or its contents | |
* @see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute | |
*/ | |
inputmode?: | |
| "none" | |
| "text" | |
| "tel" | |
| "url" | |
| "email" | |
| "numeric" | |
| "decimal" | |
| "search" | |
| undefined; | |
/** | |
* Specify that a standard HTML element should behave like a defined custom built-in element | |
* @see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is | |
*/ | |
is?: string | undefined; | |
} | |
interface AllHTMLAttributes<T> extends HTMLAttributes<T> { | |
// Standard HTML Attributes | |
accept?: string | undefined; | |
acceptCharset?: string | undefined; | |
action?: string | undefined; | |
allowFullScreen?: boolean | undefined; | |
allowTransparency?: boolean | undefined; | |
alt?: string | undefined; | |
as?: string | undefined; | |
async?: boolean | undefined; | |
autoComplete?: string | undefined; | |
autoPlay?: boolean | undefined; | |
capture?: boolean | "user" | "environment" | undefined; | |
cellPadding?: number | string | undefined; | |
cellSpacing?: number | string | undefined; | |
charSet?: string | undefined; | |
challenge?: string | undefined; | |
checked?: boolean | undefined; | |
cite?: string | undefined; | |
classID?: string | undefined; | |
cols?: number | undefined; | |
colSpan?: number | undefined; | |
controls?: boolean | undefined; | |
coords?: string | undefined; | |
crossOrigin?: CrossOrigin; | |
data?: string | undefined; | |
dateTime?: string | undefined; | |
default?: boolean | undefined; | |
defer?: boolean | undefined; | |
disabled?: boolean | undefined; | |
download?: any; | |
encType?: string | undefined; | |
form?: string | undefined; | |
formAction?: string | undefined; | |
formEncType?: string | undefined; | |
formMethod?: string | undefined; | |
formNoValidate?: boolean | undefined; | |
formTarget?: string | undefined; | |
frameBorder?: number | string | undefined; | |
headers?: string | undefined; | |
height?: number | string | undefined; | |
high?: number | undefined; | |
href?: string | undefined; | |
hrefLang?: string | undefined; | |
for?: string | undefined; | |
httpEquiv?: string | undefined; | |
integrity?: string | undefined; | |
keyParams?: string | undefined; | |
keyType?: string | undefined; | |
kind?: string | undefined; | |
label?: string | undefined; | |
list?: string | undefined; | |
loop?: boolean | undefined; | |
low?: number | undefined; | |
manifest?: string | undefined; | |
marginHeight?: number | undefined; | |
marginWidth?: number | undefined; | |
max?: number | string | undefined; | |
maxLength?: number | undefined; | |
media?: string | undefined; | |
mediaGroup?: string | undefined; | |
method?: string | undefined; | |
min?: number | string | undefined; | |
minLength?: number | undefined; | |
multiple?: boolean | undefined; | |
muted?: boolean | undefined; | |
name?: string | undefined; | |
noValidate?: boolean | undefined; | |
open?: boolean | undefined; | |
optimum?: number | undefined; | |
pattern?: string | undefined; | |
placeholder?: string | undefined; | |
playsInline?: boolean | undefined; | |
poster?: string | undefined; | |
preload?: string | undefined; | |
readOnly?: boolean | undefined; | |
required?: boolean | undefined; | |
reversed?: boolean | undefined; | |
rows?: number | undefined; | |
rowSpan?: number | undefined; | |
sandbox?: string | undefined; | |
scope?: string | undefined; | |
scoped?: boolean | undefined; | |
scrolling?: string | undefined; | |
seamless?: boolean | undefined; | |
selected?: boolean | undefined; | |
shape?: string | undefined; | |
size?: number | undefined; | |
sizes?: string | undefined; | |
span?: number | undefined; | |
src?: string | undefined; | |
srcDoc?: string | undefined; | |
srcLang?: string | undefined; | |
srcSet?: string | undefined; | |
start?: number | undefined; | |
step?: number | string | undefined; | |
summary?: string | undefined; | |
target?: string | undefined; | |
type?: string | undefined; | |
useMap?: string | undefined; | |
value?: string | ReadonlyArray<string> | number | undefined; | |
width?: number | string | undefined; | |
wmode?: string | undefined; | |
wrap?: string | undefined; | |
} | |
type HTMLAttributeReferrerPolicy = | |
| "" | |
| "no-referrer" | |
| "no-referrer-when-downgrade" | |
| "origin" | |
| "origin-when-cross-origin" | |
| "same-origin" | |
| "strict-origin" | |
| "strict-origin-when-cross-origin" | |
| "unsafe-url"; | |
type HTMLAttributeAnchorTarget = | |
| "_self" | |
| "_blank" | |
| "_parent" | |
| "_top" | |
| (string & {}); | |
interface AnchorHTMLAttributes<T> extends HTMLAttributes<T> { | |
download?: any; | |
href?: string | undefined; | |
hrefLang?: string | undefined; | |
media?: string | undefined; | |
ping?: string | undefined; | |
target?: HTMLAttributeAnchorTarget | undefined; | |
type?: string | undefined; | |
referrerPolicy?: HTMLAttributeReferrerPolicy | undefined; | |
} | |
interface AudioHTMLAttributes<T> extends MediaHTMLAttributes<T> {} | |
interface AreaHTMLAttributes<T> extends HTMLAttributes<T> { | |
alt?: string | undefined; | |
coords?: string | undefined; | |
download?: any; | |
href?: string | undefined; | |
hrefLang?: string | undefined; | |
media?: string | undefined; | |
referrerPolicy?: HTMLAttributeReferrerPolicy | undefined; | |
shape?: string | undefined; | |
target?: string | undefined; | |
} | |
interface BaseHTMLAttributes<T> extends HTMLAttributes<T> { | |
href?: string | undefined; | |
target?: string | undefined; | |
} | |
interface BlockquoteHTMLAttributes<T> extends HTMLAttributes<T> { | |
cite?: string | undefined; | |
} | |
interface ButtonHTMLAttributes<T> extends HTMLAttributes<T> { | |
disabled?: boolean | undefined; | |
form?: string | undefined; | |
formAction?: string | undefined; | |
formEncType?: string | undefined; | |
formMethod?: string | undefined; | |
formNoValidate?: boolean | undefined; | |
formTarget?: string | undefined; | |
name?: string | undefined; | |
type?: "submit" | "reset" | "button" | undefined; | |
value?: string | ReadonlyArray<string> | number | undefined; | |
} | |
interface CanvasHTMLAttributes<T> extends HTMLAttributes<T> { | |
height?: number | string | undefined; | |
width?: number | string | undefined; | |
} | |
interface ColHTMLAttributes<T> extends HTMLAttributes<T> { | |
span?: number | undefined; | |
width?: number | string | undefined; | |
} | |
interface ColgroupHTMLAttributes<T> extends HTMLAttributes<T> { | |
span?: number | undefined; | |
} | |
interface DataHTMLAttributes<T> extends HTMLAttributes<T> { | |
value?: string | ReadonlyArray<string> | number | undefined; | |
} | |
interface DetailsHTMLAttributes<T> extends HTMLAttributes<T> { | |
open?: boolean | undefined; | |
// onToggle?: ReactEventHandler<T> | undefined; | |
} | |
interface DelHTMLAttributes<T> extends HTMLAttributes<T> { | |
cite?: string | undefined; | |
dateTime?: string | undefined; | |
} | |
interface DialogHTMLAttributes<T> extends HTMLAttributes<T> { | |
// onCancel?: ReactEventHandler<T> | undefined; | |
// onClose?: ReactEventHandler<T> | undefined; | |
open?: boolean | undefined; | |
} | |
interface EmbedHTMLAttributes<T> extends HTMLAttributes<T> { | |
height?: number | string | undefined; | |
src?: string | undefined; | |
type?: string | undefined; | |
width?: number | string | undefined; | |
} | |
interface FieldsetHTMLAttributes<T> extends HTMLAttributes<T> { | |
disabled?: boolean | undefined; | |
form?: string | undefined; | |
name?: string | undefined; | |
} | |
interface FormHTMLAttributes<T> extends HTMLAttributes<T> { | |
acceptCharset?: string | undefined; | |
action?: string | undefined; | |
autoComplete?: string | undefined; | |
encType?: string | undefined; | |
method?: string | undefined; | |
name?: string | undefined; | |
noValidate?: boolean | undefined; | |
target?: string | undefined; | |
} | |
interface HtmlHTMLAttributes<T> extends HTMLAttributes<T> { | |
manifest?: string | undefined; | |
} | |
interface IframeHTMLAttributes<T> extends HTMLAttributes<T> { | |
allow?: string | undefined; | |
allowFullScreen?: boolean | undefined; | |
allowTransparency?: boolean | undefined; | |
/** @deprecated */ | |
frameBorder?: number | string | undefined; | |
height?: number | string | undefined; | |
loading?: "eager" | "lazy" | undefined; | |
/** @deprecated */ | |
marginHeight?: number | undefined; | |
/** @deprecated */ | |
marginWidth?: number | undefined; | |
name?: string | undefined; | |
referrerPolicy?: HTMLAttributeReferrerPolicy | undefined; | |
sandbox?: string | undefined; | |
/** @deprecated */ | |
scrolling?: string | undefined; | |
seamless?: boolean | undefined; | |
src?: string | undefined; | |
srcDoc?: string | undefined; | |
width?: number | string | undefined; | |
} | |
interface ImgHTMLAttributes<T> extends HTMLAttributes<T> { | |
alt?: string | undefined; | |
crossOrigin?: CrossOrigin; | |
decoding?: "async" | "auto" | "sync" | undefined; | |
height?: number | string | undefined; | |
loading?: "eager" | "lazy" | undefined; | |
referrerPolicy?: HTMLAttributeReferrerPolicy | undefined; | |
sizes?: string | undefined; | |
src?: string | undefined; | |
srcSet?: string | undefined; | |
useMap?: string | undefined; | |
width?: number | string | undefined; | |
} | |
interface InsHTMLAttributes<T> extends HTMLAttributes<T> { | |
cite?: string | undefined; | |
dateTime?: string | undefined; | |
} | |
type HTMLInputTypeAttribute = | |
| "button" | |
| "checkbox" | |
| "color" | |
| "date" | |
| "datetime-local" | |
| "email" | |
| "file" | |
| "hidden" | |
| "image" | |
| "month" | |
| "number" | |
| "password" | |
| "radio" | |
| "range" | |
| "reset" | |
| "search" | |
| "submit" | |
| "tel" | |
| "text" | |
| "time" | |
| "url" | |
| "week" | |
| (string & {}); | |
interface InputHTMLAttributes<T> extends HTMLAttributes<T> { | |
accept?: string | undefined; | |
alt?: string | undefined; | |
autoComplete?: string | undefined; | |
capture?: boolean | "user" | "environment" | undefined; // https://www.w3.org/TR/html-media-capture/#the-capture-attribute | |
checked?: boolean | undefined; | |
disabled?: boolean | undefined; | |
enterKeyHint?: | |
| "enter" | |
| "done" | |
| "go" | |
| "next" | |
| "previous" | |
| "search" | |
| "send" | |
| undefined; | |
form?: string | undefined; | |
formAction?: string | undefined; | |
formEncType?: string | undefined; | |
formMethod?: string | undefined; | |
formNoValidate?: boolean | undefined; | |
formTarget?: string | undefined; | |
height?: number | string | undefined; | |
list?: string | undefined; | |
max?: number | string | undefined; | |
maxLength?: number | undefined; | |
min?: number | string | undefined; | |
minLength?: number | undefined; | |
multiple?: boolean | undefined; | |
name?: string | undefined; | |
pattern?: string | undefined; | |
placeholder?: string | undefined; | |
readOnly?: boolean | undefined; | |
required?: boolean | undefined; | |
size?: number | undefined; | |
src?: string | undefined; | |
step?: number | string | undefined; | |
type?: HTMLInputTypeAttribute | undefined; | |
value?: string | ReadonlyArray<string> | number | undefined; | |
width?: number | string | undefined; | |
// onChange?: ChangeEventHandler<T> | undefined; | |
} | |
interface KeygenHTMLAttributes<T> extends HTMLAttributes<T> { | |
challenge?: string | undefined; | |
disabled?: boolean | undefined; | |
form?: string | undefined; | |
keyType?: string | undefined; | |
keyParams?: string | undefined; | |
name?: string | undefined; | |
} | |
interface LabelHTMLAttributes<T> extends HTMLAttributes<T> { | |
form?: string | undefined; | |
for?: string | undefined; | |
} | |
interface LiHTMLAttributes<T> extends HTMLAttributes<T> { | |
value?: string | ReadonlyArray<string> | number | undefined; | |
} | |
interface LinkHTMLAttributes<T> extends HTMLAttributes<T> { | |
as?: string | undefined; | |
crossOrigin?: CrossOrigin; | |
fetchPriority?: "high" | "low" | "auto"; | |
href?: string | undefined; | |
hrefLang?: string | undefined; | |
integrity?: string | undefined; | |
media?: string | undefined; | |
imageSrcSet?: string | undefined; | |
imageSizes?: string | undefined; | |
referrerPolicy?: HTMLAttributeReferrerPolicy | undefined; | |
sizes?: string | undefined; | |
type?: string | undefined; | |
charSet?: string | undefined; | |
} | |
interface MapHTMLAttributes<T> extends HTMLAttributes<T> { | |
name?: string | undefined; | |
} | |
interface MenuHTMLAttributes<T> extends HTMLAttributes<T> { | |
type?: string | undefined; | |
} | |
interface MediaHTMLAttributes<T> extends HTMLAttributes<T> { | |
autoplay?: boolean | undefined; | |
controls?: boolean | undefined; | |
controlsList?: string | undefined; | |
crossOrigin?: CrossOrigin; | |
loop?: boolean | undefined; | |
mediaGroup?: string | undefined; | |
muted?: boolean | undefined; | |
playsInline?: boolean | undefined; | |
preload?: string | undefined; | |
src?: string | undefined; | |
} | |
interface MetaHTMLAttributes<T> extends HTMLAttributes<T> { | |
charSet?: string | undefined; | |
httpEquiv?: string | undefined; | |
name?: string | undefined; | |
media?: string | undefined; | |
content?: string | undefined; | |
} | |
interface MeterHTMLAttributes<T> extends HTMLAttributes<T> { | |
form?: string | undefined; | |
high?: number | undefined; | |
low?: number | undefined; | |
max?: number | string | undefined; | |
min?: number | string | undefined; | |
optimum?: number | undefined; | |
value?: string | ReadonlyArray<string> | number | undefined; | |
} | |
interface QuoteHTMLAttributes<T> extends HTMLAttributes<T> { | |
cite?: string | undefined; | |
} | |
interface ObjectHTMLAttributes<T> extends HTMLAttributes<T> { | |
classID?: string | undefined; | |
data?: string | undefined; | |
form?: string | undefined; | |
height?: number | string | undefined; | |
name?: string | undefined; | |
type?: string | undefined; | |
useMap?: string | undefined; | |
width?: number | string | undefined; | |
wmode?: string | undefined; | |
} | |
interface OlHTMLAttributes<T> extends HTMLAttributes<T> { | |
reversed?: boolean | undefined; | |
start?: number | undefined; | |
type?: "1" | "a" | "A" | "i" | "I" | undefined; | |
} | |
interface OptgroupHTMLAttributes<T> extends HTMLAttributes<T> { | |
disabled?: boolean | undefined; | |
label?: string | undefined; | |
} | |
interface OptionHTMLAttributes<T> extends HTMLAttributes<T> { | |
disabled?: boolean | undefined; | |
label?: string | undefined; | |
selected?: boolean | undefined; | |
value?: string | ReadonlyArray<string> | number | undefined; | |
} | |
interface OutputHTMLAttributes<T> extends HTMLAttributes<T> { | |
form?: string | undefined; | |
for?: string | undefined; | |
name?: string | undefined; | |
} | |
interface ParamHTMLAttributes<T> extends HTMLAttributes<T> { | |
name?: string | undefined; | |
value?: string | ReadonlyArray<string> | number | undefined; | |
} | |
interface ProgressHTMLAttributes<T> extends HTMLAttributes<T> { | |
max?: number | string | undefined; | |
value?: string | ReadonlyArray<string> | number | undefined; | |
} | |
interface SlotHTMLAttributes<T> extends HTMLAttributes<T> { | |
name?: string | undefined; | |
} | |
interface ScriptHTMLAttributes<T> extends HTMLAttributes<T> { | |
async?: boolean | undefined; | |
/** @deprecated */ | |
charSet?: string | undefined; | |
crossOrigin?: CrossOrigin; | |
defer?: boolean | undefined; | |
integrity?: string | undefined; | |
noModule?: boolean | undefined; | |
referrerPolicy?: HTMLAttributeReferrerPolicy | undefined; | |
src?: string | undefined; | |
type?: string | undefined; | |
} | |
interface SelectHTMLAttributes<T> extends HTMLAttributes<T> { | |
autoComplete?: string | undefined; | |
disabled?: boolean | undefined; | |
form?: string | undefined; | |
multiple?: boolean | undefined; | |
name?: string | undefined; | |
required?: boolean | undefined; | |
size?: number | undefined; | |
value?: string | ReadonlyArray<string> | number | undefined; | |
// onChange?: ChangeEventHandler<T> | undefined; | |
} | |
interface SourceHTMLAttributes<T> extends HTMLAttributes<T> { | |
height?: number | string | undefined; | |
media?: string | undefined; | |
sizes?: string | undefined; | |
src?: string | undefined; | |
srcSet?: string | undefined; | |
type?: string | undefined; | |
width?: number | string | undefined; | |
} | |
interface StyleHTMLAttributes<T> extends HTMLAttributes<T> { | |
media?: string | undefined; | |
scoped?: boolean | undefined; | |
type?: string | undefined; | |
} | |
interface TableHTMLAttributes<T> extends HTMLAttributes<T> { | |
align?: "left" | "center" | "right" | undefined; | |
bgcolor?: string | undefined; | |
border?: number | undefined; | |
cellPadding?: number | string | undefined; | |
cellSpacing?: number | string | undefined; | |
frame?: boolean | undefined; | |
rules?: "none" | "groups" | "rows" | "columns" | "all" | undefined; | |
summary?: string | undefined; | |
width?: number | string | undefined; | |
} | |
interface TextareaHTMLAttributes<T> extends HTMLAttributes<T> { | |
autoComplete?: string | undefined; | |
cols?: number | undefined; | |
dirName?: string | undefined; | |
disabled?: boolean | undefined; | |
form?: string | undefined; | |
maxLength?: number | undefined; | |
minLength?: number | undefined; | |
name?: string | undefined; | |
placeholder?: string | undefined; | |
readOnly?: boolean | undefined; | |
required?: boolean | undefined; | |
rows?: number | undefined; | |
value?: string | ReadonlyArray<string> | number | undefined; | |
wrap?: string | undefined; | |
// onChange?: ChangeEventHandler<T> | undefined; | |
} | |
interface TdHTMLAttributes<T> extends HTMLAttributes<T> { | |
align?: "left" | "center" | "right" | "justify" | "char" | undefined; | |
colSpan?: number | undefined; | |
headers?: string | undefined; | |
rowSpan?: number | undefined; | |
scope?: string | undefined; | |
abbr?: string | undefined; | |
height?: number | string | undefined; | |
width?: number | string | undefined; | |
valign?: "top" | "middle" | "bottom" | "baseline" | undefined; | |
} | |
interface ThHTMLAttributes<T> extends HTMLAttributes<T> { | |
align?: "left" | "center" | "right" | "justify" | "char" | undefined; | |
colSpan?: number | undefined; | |
headers?: string | undefined; | |
rowSpan?: number | undefined; | |
scope?: string | undefined; | |
abbr?: string | undefined; | |
} | |
interface TimeHTMLAttributes<T> extends HTMLAttributes<T> { | |
dateTime?: string | undefined; | |
} | |
interface TrackHTMLAttributes<T> extends HTMLAttributes<T> { | |
default?: boolean | undefined; | |
kind?: string | undefined; | |
label?: string | undefined; | |
src?: string | undefined; | |
srcLang?: string | undefined; | |
} | |
interface VideoHTMLAttributes<T> extends MediaHTMLAttributes<T> { | |
height?: number | string | undefined; | |
playsInline?: boolean | undefined; | |
poster?: string | undefined; | |
width?: number | string | undefined; | |
disablePictureInPicture?: boolean | undefined; | |
disableRemotePlayback?: boolean | undefined; | |
} | |
// this list is "complete" in that it contains every SVG attribute | |
// that React supports, but the types can be improved. | |
// Full list here: https://facebook.github.io/react/docs/dom-elements.html | |
// | |
// The three broad type categories are (in order of restrictiveness): | |
// - "number | string" | |
// - "string" | |
// - union of string literals | |
interface SVGAttributes<T> extends AriaAttributes, DOMAttributes<T> { | |
// React-specific Attributes | |
suppressHydrationWarning?: boolean | undefined; | |
// Attributes which also defined in HTMLAttributes | |
// See comment in SVGDOMPropertyConfig.js | |
className?: string | undefined; | |
color?: string | undefined; | |
height?: number | string | undefined; | |
id?: string | undefined; | |
lang?: string | undefined; | |
max?: number | string | undefined; | |
media?: string | undefined; | |
method?: string | undefined; | |
min?: number | string | undefined; | |
name?: string | undefined; | |
// style?: CSSProperties | undefined; | |
target?: string | undefined; | |
type?: string | undefined; | |
width?: number | string | undefined; | |
// Other HTML properties supported by SVG elements in browsers | |
role?: AriaRole | undefined; | |
tabIndex?: number | undefined; | |
crossOrigin?: CrossOrigin; | |
// SVG Specific attributes | |
accentHeight?: number | string | undefined; | |
accumulate?: "none" | "sum" | undefined; | |
additive?: "replace" | "sum" | undefined; | |
alignmentBaseline?: | |
| "auto" | |
| "baseline" | |
| "before-edge" | |
| "text-before-edge" | |
| "middle" | |
| "central" | |
| "after-edge" | |
| "text-after-edge" | |
| "ideographic" | |
| "alphabetic" | |
| "hanging" | |
| "mathematical" | |
| "inherit" | |
| undefined; | |
allowReorder?: "no" | "yes" | undefined; | |
alphabetic?: number | string | undefined; | |
amplitude?: number | string | undefined; | |
arabicForm?: "initial" | "medial" | "terminal" | "isolated" | undefined; | |
ascent?: number | string | undefined; | |
attributeName?: string | undefined; | |
attributeType?: string | undefined; | |
autoReverse?: Booleanish | undefined; | |
azimuth?: number | string | undefined; | |
baseFrequency?: number | string | undefined; | |
baselineShift?: number | string | undefined; | |
baseProfile?: number | string | undefined; | |
bbox?: number | string | undefined; | |
begin?: number | string | undefined; | |
bias?: number | string | undefined; | |
by?: number | string | undefined; | |
calcMode?: number | string | undefined; | |
capHeight?: number | string | undefined; | |
clip?: number | string | undefined; | |
clipPath?: string | undefined; | |
clipPathUnits?: number | string | undefined; | |
clipRule?: number | string | undefined; | |
colorInterpolation?: number | string | undefined; | |
colorInterpolationFilters?: | |
| "auto" | |
| "sRGB" | |
| "linearRGB" | |
| "inherit" | |
| undefined; | |
colorProfile?: number | string | undefined; | |
colorRendering?: number | string | undefined; | |
contentScriptType?: number | string | undefined; | |
contentStyleType?: number | string | undefined; | |
cursor?: number | string | undefined; | |
cx?: number | string | undefined; | |
cy?: number | string | undefined; | |
d?: string | undefined; | |
decelerate?: number | string | undefined; | |
descent?: number | string | undefined; | |
diffuseConstant?: number | string | undefined; | |
direction?: number | string | undefined; | |
display?: number | string | undefined; | |
divisor?: number | string | undefined; | |
dominantBaseline?: number | string | undefined; | |
dur?: number | string | undefined; | |
dx?: number | string | undefined; | |
dy?: number | string | undefined; | |
edgeMode?: number | string | undefined; | |
elevation?: number | string | undefined; | |
enableBackground?: number | string | undefined; | |
end?: number | string | undefined; | |
exponent?: number | string | undefined; | |
externalResourcesRequired?: Booleanish | undefined; | |
fill?: string | undefined; | |
fillOpacity?: number | string | undefined; | |
fillRule?: "nonzero" | "evenodd" | "inherit" | undefined; | |
filter?: string | undefined; | |
filterRes?: number | string | undefined; | |
filterUnits?: number | string | undefined; | |
floodColor?: number | string | undefined; | |
floodOpacity?: number | string | undefined; | |
focusable?: Booleanish | "auto" | undefined; | |
fontFamily?: string | undefined; | |
fontSize?: number | string | undefined; | |
fontSizeAdjust?: number | string | undefined; | |
fontStretch?: number | string | undefined; | |
fontStyle?: number | string | undefined; | |
fontVariant?: number | string | undefined; | |
fontWeight?: number | string | undefined; | |
format?: number | string | undefined; | |
fr?: number | string | undefined; | |
from?: number | string | undefined; | |
fx?: number | string | undefined; | |
fy?: number | string | undefined; | |
g1?: number | string | undefined; | |
g2?: number | string | undefined; | |
glyphName?: number | string | undefined; | |
glyphOrientationHorizontal?: number | string | undefined; | |
glyphOrientationVertical?: number | string | undefined; | |
glyphRef?: number | string | undefined; | |
gradientTransform?: string | undefined; | |
gradientUnits?: string | undefined; | |
hanging?: number | string | undefined; | |
horizAdvX?: number | string | undefined; | |
horizOriginX?: number | string | undefined; | |
href?: string | undefined; | |
ideographic?: number | string | undefined; | |
imageRendering?: number | string | undefined; | |
in2?: number | string | undefined; | |
in?: string | undefined; | |
intercept?: number | string | undefined; | |
k1?: number | string | undefined; | |
k2?: number | string | undefined; | |
k3?: number | string | undefined; | |
k4?: number | string | undefined; | |
k?: number | string | undefined; | |
kernelMatrix?: number | string | undefined; | |
kernelUnitLength?: number | string | undefined; | |
kerning?: number | string | undefined; | |
keyPoints?: number | string | undefined; | |
keySplines?: number | string | undefined; | |
keyTimes?: number | string | undefined; | |
lengthAdjust?: number | string | undefined; | |
letterSpacing?: number | string | undefined; | |
lightingColor?: number | string | undefined; | |
limitingConeAngle?: number | string | undefined; | |
local?: number | string | undefined; | |
markerEnd?: string | undefined; | |
markerHeight?: number | string | undefined; | |
markerMid?: string | undefined; | |
markerStart?: string | undefined; | |
markerUnits?: number | string | undefined; | |
markerWidth?: number | string | undefined; | |
mask?: string | undefined; | |
maskContentUnits?: number | string | undefined; | |
maskUnits?: number | string | undefined; | |
mathematical?: number | string | undefined; | |
mode?: number | string | undefined; | |
numOctaves?: number | string | undefined; | |
offset?: number | string | undefined; | |
opacity?: number | string | undefined; | |
operator?: number | string | undefined; | |
order?: number | string | undefined; | |
orient?: number | string | undefined; | |
orientation?: number | string | undefined; | |
origin?: number | string | undefined; | |
overflow?: number | string | undefined; | |
overlinePosition?: number | string | undefined; | |
overlineThickness?: number | string | undefined; | |
paintOrder?: number | string | undefined; | |
panose1?: number | string | undefined; | |
path?: string | undefined; | |
pathLength?: number | string | undefined; | |
patternContentUnits?: string | undefined; | |
patternTransform?: number | string | undefined; | |
patternUnits?: string | undefined; | |
pointerEvents?: number | string | undefined; | |
points?: string | undefined; | |
pointsAtX?: number | string | undefined; | |
pointsAtY?: number | string | undefined; | |
pointsAtZ?: number | string | undefined; | |
preserveAlpha?: Booleanish | undefined; | |
preserveAspectRatio?: string | undefined; | |
primitiveUnits?: number | string | undefined; | |
r?: number | string | undefined; | |
radius?: number | string | undefined; | |
refX?: number | string | undefined; | |
refY?: number | string | undefined; | |
renderingIntent?: number | string | undefined; | |
repeatCount?: number | string | undefined; | |
repeatDur?: number | string | undefined; | |
requiredExtensions?: number | string | undefined; | |
requiredFeatures?: number | string | undefined; | |
restart?: number | string | undefined; | |
result?: string | undefined; | |
rotate?: number | string | undefined; | |
rx?: number | string | undefined; | |
ry?: number | string | undefined; | |
scale?: number | string | undefined; | |
seed?: number | string | undefined; | |
shapeRendering?: number | string | undefined; | |
slope?: number | string | undefined; | |
spacing?: number | string | undefined; | |
specularConstant?: number | string | undefined; | |
specularExponent?: number | string | undefined; | |
speed?: number | string | undefined; | |
spreadMethod?: string | undefined; | |
startOffset?: number | string | undefined; | |
stdDeviation?: number | string | undefined; | |
stemh?: number | string | undefined; | |
stemv?: number | string | undefined; | |
stitchTiles?: number | string | undefined; | |
stopColor?: string | undefined; | |
stopOpacity?: number | string | undefined; | |
strikethroughPosition?: number | string | undefined; | |
strikethroughThickness?: number | string | undefined; | |
string?: number | string | undefined; | |
stroke?: string | undefined; | |
strokeDasharray?: string | number | undefined; | |
strokeDashoffset?: string | number | undefined; | |
strokeLinecap?: "butt" | "round" | "square" | "inherit" | undefined; | |
strokeLinejoin?: "miter" | "round" | "bevel" | "inherit" | undefined; | |
strokeMiterlimit?: number | string | undefined; | |
strokeOpacity?: number | string | undefined; | |
strokeWidth?: number | string | undefined; | |
surfaceScale?: number | string | undefined; | |
systemLanguage?: number | string | undefined; | |
tableValues?: number | string | undefined; | |
targetX?: number | string | undefined; | |
targetY?: number | string | undefined; | |
textAnchor?: string | undefined; | |
textDecoration?: number | string | undefined; | |
textLength?: number | string | undefined; | |
textRendering?: number | string | undefined; | |
to?: number | string | undefined; | |
transform?: string | undefined; | |
u1?: number | string | undefined; | |
u2?: number | string | undefined; | |
underlinePosition?: number | string | undefined; | |
underlineThickness?: number | string | undefined; | |
unicode?: number | string | undefined; | |
unicodeBidi?: number | string | undefined; | |
unicodeRange?: number | string | undefined; | |
unitsPerEm?: number | string | undefined; | |
vAlphabetic?: number | string | undefined; | |
values?: string | undefined; | |
vectorEffect?: number | string | undefined; | |
version?: string | undefined; | |
vertAdvY?: number | string | undefined; | |
vertOriginX?: number | string | undefined; | |
vertOriginY?: number | string | undefined; | |
vHanging?: number | string | undefined; | |
vIdeographic?: number | string | undefined; | |
viewBox?: string | undefined; | |
viewTarget?: number | string | undefined; | |
visibility?: number | string | undefined; | |
vMathematical?: number | string | undefined; | |
widths?: number | string | undefined; | |
wordSpacing?: number | string | undefined; | |
writingMode?: number | string | undefined; | |
x1?: number | string | undefined; | |
x2?: number | string | undefined; | |
x?: number | string | undefined; | |
xChannelSelector?: string | undefined; | |
xHeight?: number | string | undefined; | |
xlinkActuate?: string | undefined; | |
xlinkArcrole?: string | undefined; | |
xlinkHref?: string | undefined; | |
xlinkRole?: string | undefined; | |
xlinkShow?: string | undefined; | |
xlinkTitle?: string | undefined; | |
xlinkType?: string | undefined; | |
xmlBase?: string | undefined; | |
xmlLang?: string | undefined; | |
xmlns?: string | undefined; | |
xmlnsXlink?: string | undefined; | |
xmlSpace?: string | undefined; | |
y1?: number | string | undefined; | |
y2?: number | string | undefined; | |
y?: number | string | undefined; | |
yChannelSelector?: string | undefined; | |
z?: number | string | undefined; | |
zoomAndPan?: string | undefined; | |
} | |
interface WebViewHTMLAttributes<T> extends HTMLAttributes<T> { | |
allowFullScreen?: boolean | undefined; | |
allowpopups?: boolean | undefined; | |
autosize?: boolean | undefined; | |
blinkfeatures?: string | undefined; | |
disableblinkfeatures?: string | undefined; | |
disableguestresize?: boolean | undefined; | |
disablewebsecurity?: boolean | undefined; | |
guestinstance?: string | undefined; | |
httpreferrer?: string | undefined; | |
nodeintegration?: boolean | undefined; | |
partition?: string | undefined; | |
plugins?: boolean | undefined; | |
preload?: string | undefined; | |
src?: string | undefined; | |
useragent?: string | undefined; | |
webpreferences?: string | undefined; | |
} | |
interface IntrinsicElements { | |
a: AnchorHTMLAttributes<HTMLAnchorElement>; | |
abbr: HTMLAttributes<HTMLElement>; | |
address: HTMLAttributes<HTMLElement>; | |
area: AreaHTMLAttributes<HTMLAreaElement>; | |
article: HTMLAttributes<HTMLElement>; | |
aside: HTMLAttributes<HTMLElement>; | |
audio: AudioHTMLAttributes<HTMLAudioElement>; | |
b: HTMLAttributes<HTMLElement>; | |
base: BaseHTMLAttributes<HTMLBaseElement>; | |
bdi: HTMLAttributes<HTMLElement>; | |
bdo: HTMLAttributes<HTMLElement>; | |
big: HTMLAttributes<HTMLElement>; | |
blockquote: BlockquoteHTMLAttributes<HTMLQuoteElement>; | |
body: HTMLAttributes<HTMLBodyElement>; | |
br: HTMLAttributes<HTMLBRElement>; | |
button: ButtonHTMLAttributes<HTMLButtonElement>; | |
canvas: CanvasHTMLAttributes<HTMLCanvasElement>; | |
caption: HTMLAttributes<HTMLElement>; | |
center: HTMLAttributes<HTMLElement>; | |
cite: HTMLAttributes<HTMLElement>; | |
code: HTMLAttributes<HTMLElement>; | |
col: ColHTMLAttributes<HTMLTableColElement>; | |
colgroup: ColgroupHTMLAttributes<HTMLTableColElement>; | |
data: DataHTMLAttributes<HTMLDataElement>; | |
datalist: HTMLAttributes<HTMLDataListElement>; | |
dd: HTMLAttributes<HTMLElement>; | |
del: DelHTMLAttributes<HTMLModElement>; | |
details: DetailsHTMLAttributes<HTMLDetailsElement>; | |
dfn: HTMLAttributes<HTMLElement>; | |
dialog: DialogHTMLAttributes<HTMLDialogElement>; | |
div: HTMLAttributes<HTMLDivElement>; | |
dl: HTMLAttributes<HTMLDListElement>; | |
dt: HTMLAttributes<HTMLElement>; | |
em: HTMLAttributes<HTMLElement>; | |
embed: EmbedHTMLAttributes<HTMLEmbedElement>; | |
fieldset: FieldsetHTMLAttributes<HTMLFieldSetElement>; | |
figcaption: HTMLAttributes<HTMLElement>; | |
figure: HTMLAttributes<HTMLElement>; | |
footer: HTMLAttributes<HTMLElement>; | |
form: FormHTMLAttributes<HTMLFormElement>; | |
h1: HTMLAttributes<HTMLHeadingElement>; | |
h2: HTMLAttributes<HTMLHeadingElement>; | |
h3: HTMLAttributes<HTMLHeadingElement>; | |
h4: HTMLAttributes<HTMLHeadingElement>; | |
h5: HTMLAttributes<HTMLHeadingElement>; | |
h6: HTMLAttributes<HTMLHeadingElement>; | |
head: HTMLAttributes<HTMLHeadElement>; | |
header: HTMLAttributes<HTMLElement>; | |
hgroup: HTMLAttributes<HTMLElement>; | |
hr: HTMLAttributes<HTMLHRElement>; | |
html: HtmlHTMLAttributes<HTMLHtmlElement>; | |
i: HTMLAttributes<HTMLElement>; | |
iframe: IframeHTMLAttributes<HTMLIFrameElement>; | |
img: ImgHTMLAttributes<HTMLImageElement>; | |
input: InputHTMLAttributes<HTMLInputElement>; | |
ins: InsHTMLAttributes<HTMLModElement>; | |
kbd: HTMLAttributes<HTMLElement>; | |
keygen: KeygenHTMLAttributes<HTMLElement>; | |
label: LabelHTMLAttributes<HTMLLabelElement>; | |
legend: HTMLAttributes<HTMLLegendElement>; | |
li: LiHTMLAttributes<HTMLLIElement>; | |
link: LinkHTMLAttributes<HTMLLinkElement>; | |
main: HTMLAttributes<HTMLElement>; | |
map: MapHTMLAttributes<HTMLMapElement>; | |
mark: HTMLAttributes<HTMLElement>; | |
menu: MenuHTMLAttributes<HTMLElement>; | |
menuitem: HTMLAttributes<HTMLElement>; | |
meta: MetaHTMLAttributes<HTMLMetaElement>; | |
meter: MeterHTMLAttributes<HTMLMeterElement>; | |
nav: HTMLAttributes<HTMLElement>; | |
noindex: HTMLAttributes<HTMLElement>; | |
noscript: HTMLAttributes<HTMLElement>; | |
object: ObjectHTMLAttributes<HTMLObjectElement>; | |
ol: OlHTMLAttributes<HTMLOListElement>; | |
optgroup: OptgroupHTMLAttributes<HTMLOptGroupElement>; | |
option: OptionHTMLAttributes<HTMLOptionElement>; | |
output: OutputHTMLAttributes<HTMLOutputElement>; | |
p: HTMLAttributes<HTMLParagraphElement>; | |
param: ParamHTMLAttributes<HTMLParamElement>; | |
picture: HTMLAttributes<HTMLElement>; | |
pre: HTMLAttributes<HTMLPreElement>; | |
progress: ProgressHTMLAttributes<HTMLProgressElement>; | |
q: QuoteHTMLAttributes<HTMLQuoteElement>; | |
rp: HTMLAttributes<HTMLElement>; | |
rt: HTMLAttributes<HTMLElement>; | |
ruby: HTMLAttributes<HTMLElement>; | |
s: HTMLAttributes<HTMLElement>; | |
samp: HTMLAttributes<HTMLElement>; | |
search: HTMLAttributes<HTMLElement>; | |
slot: SlotHTMLAttributes<HTMLSlotElement>; | |
script: ScriptHTMLAttributes<HTMLScriptElement>; | |
section: HTMLAttributes<HTMLElement>; | |
select: SelectHTMLAttributes<HTMLSelectElement>; | |
small: HTMLAttributes<HTMLElement>; | |
source: SourceHTMLAttributes<HTMLSourceElement>; | |
span: HTMLAttributes<HTMLSpanElement>; | |
strong: HTMLAttributes<HTMLElement>; | |
style: StyleHTMLAttributes<HTMLStyleElement>; | |
sub: HTMLAttributes<HTMLElement>; | |
summary: HTMLAttributes<HTMLElement>; | |
sup: HTMLAttributes<HTMLElement>; | |
table: TableHTMLAttributes<HTMLTableElement>; | |
template: HTMLAttributes<HTMLTemplateElement>; | |
tbody: HTMLAttributes<HTMLTableSectionElement>; | |
td: TdHTMLAttributes<HTMLTableCellElement>; //<HTMLTableDataCellElement>; | |
textarea: TextareaHTMLAttributes<HTMLTextAreaElement>; | |
tfoot: HTMLAttributes<HTMLTableSectionElement>; | |
th: ThHTMLAttributes<HTMLTableCellElement>; //<HTMLTableHeaderCellElement>; | |
thead: HTMLAttributes<HTMLTableSectionElement>; | |
time: TimeHTMLAttributes<HTMLTimeElement>; | |
title: HTMLAttributes<HTMLTitleElement>; | |
tr: HTMLAttributes<HTMLTableRowElement>; | |
track: TrackHTMLAttributes<HTMLTrackElement>; | |
u: HTMLAttributes<HTMLElement>; | |
ul: HTMLAttributes<HTMLUListElement>; | |
var: HTMLAttributes<HTMLElement>; | |
video: VideoHTMLAttributes<HTMLVideoElement>; | |
wbr: HTMLAttributes<HTMLElement>; | |
// webview: WebViewHTMLAttributes<HTMLWebViewElement>; | |
// SVG | |
svg: SVGProps<SVGSVGElement>; | |
animate: SVGProps<SVGElement>; // TODO: It is SVGAnimateElement but is not in TypeScript's lib.dom.d.ts for now. | |
animateMotion: SVGProps<SVGElement>; | |
animateTransform: SVGProps<SVGElement>; // TODO: It is SVGAnimateTransformElement but is not in TypeScript's lib.dom.d.ts for now. | |
circle: SVGProps<SVGCircleElement>; | |
clipPath: SVGProps<SVGClipPathElement>; | |
defs: SVGProps<SVGDefsElement>; | |
desc: SVGProps<SVGDescElement>; | |
ellipse: SVGProps<SVGEllipseElement>; | |
feBlend: SVGProps<SVGFEBlendElement>; | |
feColorMatrix: SVGProps<SVGFEColorMatrixElement>; | |
feComponentTransfer: SVGProps<SVGFEComponentTransferElement>; | |
feComposite: SVGProps<SVGFECompositeElement>; | |
feConvolveMatrix: SVGProps<SVGFEConvolveMatrixElement>; | |
feDiffuseLighting: SVGProps<SVGFEDiffuseLightingElement>; | |
feDisplacementMap: SVGProps<SVGFEDisplacementMapElement>; | |
feDistantLight: SVGProps<SVGFEDistantLightElement>; | |
feDropShadow: SVGProps<SVGFEDropShadowElement>; | |
feFlood: SVGProps<SVGFEFloodElement>; | |
feFuncA: SVGProps<SVGFEFuncAElement>; | |
feFuncB: SVGProps<SVGFEFuncBElement>; | |
feFuncG: SVGProps<SVGFEFuncGElement>; | |
feFuncR: SVGProps<SVGFEFuncRElement>; | |
feGaussianBlur: SVGProps<SVGFEGaussianBlurElement>; | |
feImage: SVGProps<SVGFEImageElement>; | |
feMerge: SVGProps<SVGFEMergeElement>; | |
feMergeNode: SVGProps<SVGFEMergeNodeElement>; | |
feMorphology: SVGProps<SVGFEMorphologyElement>; | |
feOffset: SVGProps<SVGFEOffsetElement>; | |
fePointLight: SVGProps<SVGFEPointLightElement>; | |
feSpecularLighting: SVGProps<SVGFESpecularLightingElement>; | |
feSpotLight: SVGProps<SVGFESpotLightElement>; | |
feTile: SVGProps<SVGFETileElement>; | |
feTurbulence: SVGProps<SVGFETurbulenceElement>; | |
filter: SVGProps<SVGFilterElement>; | |
foreignObject: SVGProps<SVGForeignObjectElement>; | |
g: SVGProps<SVGGElement>; | |
image: SVGProps<SVGImageElement>; | |
line: SVGLineElementAttributes<SVGLineElement>; | |
linearGradient: SVGProps<SVGLinearGradientElement>; | |
marker: SVGProps<SVGMarkerElement>; | |
mask: SVGProps<SVGMaskElement>; | |
metadata: SVGProps<SVGMetadataElement>; | |
mpath: SVGProps<SVGElement>; | |
path: SVGProps<SVGPathElement>; | |
pattern: SVGProps<SVGPatternElement>; | |
polygon: SVGProps<SVGPolygonElement>; | |
polyline: SVGProps<SVGPolylineElement>; | |
radialGradient: SVGProps<SVGRadialGradientElement>; | |
rect: SVGProps<SVGRectElement>; | |
stop: SVGProps<SVGStopElement>; | |
switch: SVGProps<SVGSwitchElement>; | |
symbol: SVGProps<SVGSymbolElement>; | |
text: SVGTextElementAttributes<SVGTextElement>; | |
textPath: SVGProps<SVGTextPathElement>; | |
tspan: SVGProps<SVGTSpanElement>; | |
use: SVGProps<SVGUseElement>; | |
view: SVGProps<SVGViewElement>; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
incredible, thanks for this