prop:*
Edit this pageprop:* forces a JSX key to be written as a DOM property instead of an attribute.
Strong-Typing Custom Properties
Type definitions are required when using TypeScript. See the TypeScript page for examples.
Syntax
<div prop:scrollTop={value} />Value
- Type: property value
Value assigned directly to the property after the prop: prefix is removed.
Behavior
- On the client,
prop:name={value}strips theprop:prefix and assigns the value directly to thenameproperty. prop:*does not produce SSR output.- Use
prop:*when a DOM property must receive the value directly. Solid can still assign some custom-element properties withoutprop:*.
Examples
Basic usage
<input type="checkbox" prop:indeterminate={true} />