Module
Solid.DOM
- Package
- purescript-purs-solid
- Repository
- arazorda/purs-solid
Elements take a record of props and their children:
H.div { id: "card", class: { selected: isSelected }, "data-testid": "card" }
[ H.a { href: "/docs", onClick: \_ -> track } "Docs"
, H.span {} (show <$> count)
]
Each field is checked against the element's row (Solid.DOM.HTML,
Solid.DOM.SVG), and every attribute takes a value or an Accessor.
Event fields (onClick, …) take event -> Effect Unit. Besides the row:
ref: gets the element once it's created, typed by the element (HTMLInputElementonH.input). It runs before the element is attached, without an owner.class: a string, or a record of class toggles ({ done: isDone }).style: CSS text, or a record of properties ({ color: colour }).bindValue/bindChecked: bind a field's value or a checkbox's checked state to aSignalboth ways.innerHTML(not escaped: pass only trusted or sanitized HTML) andtextContent: replace the children.role, and the"aria-*"attributes inSolid.DOM.Aria, typed by the spec ("aria-expanded": isOpen,"aria-checked": Aria.Mixed)."data-*": any such attribute, as a string."on:name": any event by DOM name. Solid delegates it when it's one of the events Solid delegates.
Children are one element, text (a String or an Accessor String) or an
array of elements; mix text into an array with Solid.JSX.text.
Re-exports from Solid.Internal.Props
#UntypedProps Source
class UntypedProps :: Row Type -> Constraintclass UntypedProps props
Instances
(RowToList props list, PropsRL Untyped list props) => UntypedProps props
#targetValue Source
targetValue :: Event -> Effect StringThe value of the element the handler is on (an input, select or textarea).
#targetChecked Source
targetChecked :: Event -> Effect BooleanThe checked state of the checkbox or radio the handler is on.
Re-exports from Solid.Internal.View
- Modules
- Solid.
Action - Solid.
Async - Solid.
Component - Solid.
Component. JS - Solid.
Context - Solid.
Control - Solid.
DOM - Solid.
DOM. Aria - Solid.
DOM. AttrValue - Solid.
DOM. HTML - Solid.
DOM. SVG - Solid.
Errors - Solid.
Internal. Action - Solid.
Internal. Equality - Solid.
Internal. Identity - Solid.
Internal. Names - Solid.
Internal. Optimistic - Solid.
Internal. Props - Solid.
Internal. Reply - Solid.
Internal. Serializable - Solid.
Internal. ServerFunction - Solid.
Internal. Setup - Solid.
Internal. Store - Solid.
Internal. Tracked - Solid.
Internal. View - Solid.
JSX - Solid.
Lifecycle - Solid.
Meta - Solid.
Owner - Solid.
Reactivity - Solid.
Root - Solid.
Router - Solid.
Router. Action - Solid.
Router. Path - Solid.
Router. Query - Solid.
Router. Search - Solid.
Setup - Solid.
Signal - Solid.
Start. Middleware - Solid.
Start. RequestEvent - Solid.
Start. Response - Solid.
Start. ServerFunction - Solid.
Start. UseServer - Solid.
Store - Solid.
Testing - Solid.
Utility - Solid.
Web - Solid.
Web. SSR