zfb
GitHub repository

Type to search...

to open search from anywhere

Supported HTML and SVG vocabulary

The current tag names, attribute names, value categories, and rejected React spellings for zudo-react.

What the renderer accepts

The renderer uses the finite names below for standard HTML and SVG elements. Attribute acceptance is per name across the namespace, not per element: for example, loading is accepted on iframe, img, video, and div. The HTML and SVG attribute sets are separate; common attributes and the listed open-ended families apply in both namespaces. These counts and tables come from the current vocabulary.ts source, including rb.

The svg tag starts the SVG namespace. A foreignObject switches its children to HTML; a nested svg switches back to SVG. An unsupported tag in the active namespace reports ZR_TAG.

Element names

HTML tags (118)

TagTagTagTag
htmlheadbodytitle
baselinkmetastyle
scriptdivspanp
abrhrmain
headerfooternavsection
articleasidesearchhgroup
menuh1h2h3
h4h5h6ul
ollidldt
ddblockquoteprecode
strongembi
smallmarktimefigure
figcaptionimgpicturesource
videoaudiotrackcanvas
formlabelinputbutton
textareaselectoptionoptgroup
fieldsetlegendoutputprogress
meterdatalisttablecaption
theadtbodytfoottr
thtdcolcolgroup
detailssummarydialogtemplate
slotiframenoscriptaddress
abbrbdibdocite
datadeldfnins
kbdmapareaobject
paramqrprb
rtrubyssamp
subsupuvar
wbrembedxmpnoembed
noframesplaintext

An HTML custom element name matching ^[a-z][a-z0-9]*(?:-[a-z0-9]+)+$ (for example, x-card) is also accepted. Custom element attributes follow their separate string-only rule below. Custom elements also support on:<event> listeners and reserved runtime props.

SVG tags (26)

TagTagTagTag
svggpathcircle
ellipserectlinepolyline
polygontexttspandefs
symboluseclipPathmask
linearGradientradialGradientstoptitle
descforeignObjectpatternfilter
markerimage

Attribute names

The lists below are flat name sets, not per-tag HTML tables. A name in the HTML set is accepted on any supported HTML tag; a name in the SVG set is accepted on any supported SVG tag. Some names occur in more than one set.

Name groupCountNames
Common on HTML and SVG19accesskey, class, contenteditable, dir, draggable, hidden, id, inert
lang, onclick, onerror, onload, role, slot, spellcheck, style
tabindex, title, translate
HTML namespace83accept, accept-charset, action, allow, allowfullscreen, alt, as, async
autocapitalize, autocomplete, autofocus, autoplay, charset, checked, cite, closedby
cols, colspan, content, controls, crossorigin, datetime, decoding, defer
disabled, download, enctype, fetchpriority, for, form, formnovalidate, height
href, hreflang, http-equiv, inputmode, integrity, itemprop, label, loading
loop, max, maxlength, media, method, min, minlength, multiple
muted, name, nonce, novalidate, open, pattern, placeholder, playsinline
popover, popovertarget, popovertargetaction, poster, preload, property, readonly, referrerpolicy
rel, required, reversed, rows, rowspan, sandbox, scope, selected
sizes, src, srcdoc, srcset, start, step, target, type
value, width, wrap
SVG namespace44clip-rule, cx, cy, d, fill, fill-opacity, fill-rule, focusable
gradientTransform, gradientUnits, height, href, markerHeight, markerWidth, offset, opacity
points, preserveAspectRatio, r, refX, refY, rx, ry, stop-color
stop-opacity, stroke, stroke-dasharray, stroke-linecap, stroke-linejoin, stroke-width, text-anchor, transform
viewBox, width, x, x1, x2, xlink:href, xml:lang, xmlns
xmlns:xlink, y, y1, y2

These families are accepted on standard HTML and SVG elements:

FamilyAccepted namesValue rule
Data attributesdata-[\w.-]+Strings and finite numbers; booleans serialize as "true" or "false".
ARIA attributesaria-[\w.-]+Strings and finite numbers; booleans serialize as "true" or "false".
Inline event attributeson[a-z]+ (for example, onclick, onload)Strings, including reactive string values; null and undefined omit the attribute. The renderer escapes and updates the browser's inline-handler attribute. The browser may execute it when the event fires, so use trusted strings. Function values are rejected.
Native event listenerson:<event> or on:<event>:captureA function prop with a case-sensitive event name matching [A-Za-z][A-Za-z0-9_-]*; it installs a native listener and emits no HTML attribute.

The attribute name must match ^[A-Za-z_:][A-Za-z0-9_:.-]*$. Null and undefined values are omitted. For standard attributes not listed in a special value category, strings and finite numbers are accepted.

Attribute value categories

The following value rules apply to the names shown whenever those names are accepted in the active namespace. The sets can overlap with the common, HTML, and SVG name groups.

CategoryCountNamesValue handling
Boolean presence21allowfullscreen, async, autofocus, autoplay, checked, controls
defer, disabled, formnovalidate, hidden, inert, loop
multiple, muted, novalidate, open, playsinline, readonly
required, reversed, selected
Boolean only: true emits a bare attribute; false is omitted.
Enumerated boolean3contenteditable, draggable, spellcheckString or boolean; booleans serialize as the strings true or false.
Overloaded boolean1downloadString or boolean; true emits an empty value, false is omitted.
Numeric1startString or finite number.
String only24as, autocapitalize, closedby, fetchpriority, focusable, form
href, hreflang, inputmode, integrity, itemprop, label
nonce, popover, popovertarget, popovertargetaction, preload, property
srcdoc, stroke-dasharray, text-anchor, wrap, xmlns, xmlns:xlink
A string; numbers and booleans are rejected.

style is common to both namespaces but has a dedicated handler: CSS strings pass through, while plain object styles are validated. It is not a string-only standard attribute. Custom element attributes take precedence over these standard categories and must be strings; reactive string values are supported, and null and undefined are omitted.

Rejected React spellings and suggestions (35)

These are diagnostic suggestions, not accepted aliases: the authored React spelling fails and is neither rewritten nor emitted. The suggestion is available only when its target spelling is valid in the current namespace. dangerouslySetInnerHTML suggests the special renderer prop rawHtml, which is not an HTML attribute. on[A-Z] event props are handled separately: for example, onClick suggests on:click, and onDoubleClick suggests on:dblclick.

Rejected spellingSuggested spellingNamespace where ZR_PROP_DIALECT suggests the targetCustom element behavior
classNameclassHTML, SVGAlso rejected on custom elements
htmlForforHTMLAlso rejected on custom elements
charSetcharsetHTMLAlso rejected on custom elements
dateTimedatetimeHTMLAlso rejected on custom elements
tabIndextabindexHTML, SVGAlso rejected on custom elements
readOnlyreadonlyHTMLAlso rejected on custom elements
autoCompleteautocompleteHTMLOrdinary string attribute
autoFocusautofocusHTMLOrdinary string attribute
maxLengthmaxlengthHTMLOrdinary string attribute
minLengthminlengthHTMLOrdinary string attribute
crossOrigincrossoriginHTMLOrdinary string attribute
srcSetsrcsetHTMLOrdinary string attribute
acceptCharsetaccept-charsetHTMLOrdinary string attribute
httpEquivhttp-equivHTMLOrdinary string attribute
encTypeenctypeHTMLOrdinary string attribute
noValidatenovalidateHTMLOrdinary string attribute
formNoValidateformnovalidateHTMLOrdinary string attribute
colSpancolspanHTMLOrdinary string attribute
rowSpanrowspanHTMLOrdinary string attribute
referrerPolicyreferrerpolicyHTMLOrdinary string attribute
allowFullScreenallowfullscreenHTMLOrdinary string attribute
autoPlayautoplayHTMLOrdinary string attribute
contentEditablecontenteditableHTML, SVGOrdinary string attribute
spellCheckspellcheckHTML, SVGOrdinary string attribute
accessKeyaccesskeyHTML, SVGOrdinary string attribute
dangerouslySetInnerHTMLrawHtmlHTMLAlso rejected on custom elements
strokeWidthstroke-widthSVGAlso rejected on custom elements
fillRulefill-ruleSVGOrdinary string attribute
clipRuleclip-ruleSVGOrdinary string attribute
strokeLinecapstroke-linecapSVGOrdinary string attribute
strokeLinejoinstroke-linejoinSVGOrdinary string attribute
stopColorstop-colorSVGOrdinary string attribute
stopOpacitystop-opacitySVGOrdinary string attribute
xlinkHrefxlink:hrefSVGOrdinary string attribute
xmlLangxml:langSVGOrdinary string attribute

Ordinary aliases are not checked specially on custom elements, which accept otherwise valid attribute names as strings. The legacy spellings listed here remain rejected on custom elements, as do React-style on[A-Z] props. A legacy spelling is also rejected in other namespaces, but has no suggestion there when its target is invalid. Other mappings produce ZR_PROP_DIALECT only in the listed namespace; in other namespaces they fail with ZR_ATTRIBUTE as unsupported attribute names.

Runtime props are not attributes

  • key belongs to the description, and children supplies child content; neither is emitted as an attribute.

  • ref is a client runtime object prop. Native listeners use on:<event> as described above.

  • modelValue, modelChecked, defaultValue, and defaultChecked are form runtime props, not HTML attributes. See the forms guide.

  • rawHtml supplies trusted renderer-owned markup, is mutually exclusive with children, and is unsupported in SVG. See Components and JSX.

  • style uses a dedicated handler: CSS strings pass through, while plain object styles are validated.

Read a vocabulary error

An unsupported attribute name or value reports ZR_ATTRIBUTE; an unsupported tag reports ZR_TAG. For static rendering, the message includes the tag or attribute, element path, and phase:

ZR_TAG: madeuptag at root in static render
ZR_ATTRIBUTE: input.enterkeyhint at root in static render

See server rendering for the full diagnostic format.

Revision History

CreatedUpdated