Supported Attributes
Because of the characteristics of the platforms primarily targeted by React Facet, only a subset of HTML attributes and event handlers is supported by the components already included in the packages.
The following are the props available for both the DOM Components and the fast-*
Components:
#
Basic React Propschildren
: works as React children. In thefast-*
Components, the type is set toStrictReactNode
key
className
ref
(innerRef
in the case of DOM Components)dangerouslySetInnerHTML
: only forfast-*
Componentsstyle
: thestyle
object itself cannot be aFacet
, but each of the properties of the object can either be aFacet
or a plain value.
#
EventsAs a reminder: these events are different than the ones supported by React DOM, since the synthetic events and other cross-browser and usability features have been stripped away to make the library leaner. This is possible because they are not necessary in the target platforms.
Instead, these events address the native events in the DOM directly, as implemented in modern browsers.
#
Pointer EventsonClick
: (MouseEvent) =>void
onMouseDown
: (MouseEvent) =>void
onMouseUp
: (MouseEvent) =>void
onTouchStart
: (MouseEvent) =>void
onTouchMove
: (MouseEvent) =>void
onTouchEnd
: (MouseEvent) =>void
onMouseEnter
: (MouseEvent) =>void
onMouseLeave
: (MouseEvent) =>void
#
Focus EventsonFocus
: (FocusEvent =>void
onBlur
: (FocusEvent =>void
#
Keyboard EventsonKeyPress
: (KeyboardEvent) =>void
onKeyDown
: (KeyboardEvent) =>void
onKeyUp
: (KeyboardEvent) =>void
#
Component specific propertiesimg
/ fast-img
/ fast.img
#
src
a
/ fast-a
/ fast.a
#
href
target
input
/ fast-input
/ fast.input
#
disabled
maxLength
type
value
textarea
/ fast-textarea
/ fast.textarea
#
disabled
maxLength
rows
value