Create HTML elements, attributes and event handlers. [category: HTML]
Modules | Description |
Function or value | Description |
Full Usage:
fragment frag
Parameters:
RenderFragment
Returns: Node
A Bolero Node representing the Blazor RenderFragment.
Modifiers: inline |
|
Function or value | Description |
|
Example
namespace Microsoft
val homeLink: obj
|
Full Usage:
ecomp model dispatch
Parameters:
'model
-
The Elmish model.
dispatch : Dispatch<'msg>
-
The Elmish dispatch function.
Returns: ComponentWithAttrsAndNoChildrenBuilder<'T>
A computation expression builder to insert attributes and children in the component.
Modifiers: inline Type parameters: 'T, 'model, 'msg |
|
|
|
Full Usage:
lazyComp2 viewFunction model dispatch
Parameters:
'model -> Dispatch<'msg> -> Node
-
The view function.
model : 'model
-
The model passed to the view function.
dispatch : Dispatch<'msg>
-
The Elmish dispatch function.
Returns: Node
Modifiers: inline Type parameters: 'model, 'msg |
|
Full Usage:
lazyComp2By equal viewFunction model dispatch
Parameters:
'model -> 'a
-
The function used to extract the equality key that determines if the view needs re-rendering.
viewFunction : 'model -> Dispatch<'msg> -> Node
-
The view function.
model : 'model
-
The model passed to the view function.
dispatch : Dispatch<'msg>
-
The Elmish dispatch function.
Returns: Node
Modifiers: inline Type parameters: 'model, 'a, 'msg |
|
Full Usage:
lazyComp2With equal viewFunction model dispatch
Parameters:
'model -> 'model -> bool
-
The equality function used to determine if the view needs re-rendering.
viewFunction : 'model -> Dispatch<'msg> -> Node
-
The view function.
model : 'model
-
The model passed to the view function.
dispatch : Dispatch<'msg>
-
The Elmish dispatch function.
Returns: Node
Modifiers: inline Type parameters: 'model, 'msg |
|
Full Usage:
lazyComp3 viewFunction model1 model2 dispatch
Parameters:
'model1 * 'model2' -> Dispatch<'msg> -> Node
-
The view function.
model1 : 'model1
-
The first model passed to the view function.
model2 : 'model2
-
The second model passed to the view function.
dispatch : Dispatch<'msg>
-
The Elmish dispatch function.
Returns: Node
Modifiers: inline Type parameters: 'model1, 'model2', 'msg, 'model2 |
|
Full Usage:
lazyComp3By equal viewFunction model1 model2 dispatch
Parameters:
'model1 * 'model2 -> 'a
-
The function used to extract the equality key that determines if the view needs re-rendering.
viewFunction : 'model1 * 'model2 -> Dispatch<'msg> -> Node
-
The view function.
model1 : 'model1
-
The first model passed to the view function.
model2 : 'model2
-
The second model passed to the view function.
dispatch : Dispatch<'msg>
-
The Elmish dispatch function.
Returns: Node
Modifiers: inline Type parameters: 'model1, 'model2, 'a, 'msg |
Create a fragment with a lazily rendered view function, two model values and custom equality on model field.
|
Full Usage:
lazyComp3With equal viewFunction model1 model2 dispatch
Parameters:
'model1 * 'model2 -> 'model1 * 'model2 -> bool
-
The equality function used to determine if the view needs re-rendering.
viewFunction : 'model1 * 'model2' -> Dispatch<'msg> -> Node
-
The view function.
model1 : 'model1
-
The first model passed to the view function.
model2 : 'model2
-
The second model passed to the view function.
dispatch : Dispatch<'msg>
-
The Elmish dispatch function.
Returns: Node
Modifiers: inline Type parameters: 'model1, 'model2, 'model2', 'msg |
|
Full Usage:
lazyCompBy equal viewFunction model
Parameters:
'model -> 'a
-
The function used to extract the equality key that determines if the view needs re-rendering.
viewFunction : 'model -> Node
-
The view function.
model : 'model
-
The model passed to the view function.
Returns: Node
Modifiers: inline Type parameters: 'model, 'a |
|
Full Usage:
lazyCompWith equal viewFunction model
Parameters:
'model -> 'model -> bool
-
The equality function used to determine if the view needs re-rendering.
viewFunction : 'model -> Node
-
The view function.
model : 'model
-
The model passed to the view function.
Returns: Node
Modifiers: inline Type parameters: 'model |
|
Full Usage:
navLink match
Parameters:
NavLinkMatch
-
The URL match behavior.
Returns: ComponentWithAttrsBuilder<NavLink>
Modifiers: inline |
Computation expression builder to create a navigation link which toggles its
Example
namespace Microsoft
val homeLink: obj
|
Function or value | Description |
|
|
Function or value | Description |
Full Usage:
name => value
Parameters:
string
-
The name of the attribute or parameter.
value : 'a
-
The value of the attribute or parameter.
Returns: Attr
An HTML attribute or component parameter.
Modifiers: inline |
Functions such as id also exist for all standard HTML attributes. In general, it is only useful to call M:op_EqualsGreater to create a non-standard attribute or a component parameter.
Example
val helloWorld: obj
|
|
Computation expression to create a Node that is the concatenation of multiple elements and components.
|
Full Usage:
cond matching mkNode
Parameters:
'T
-
The value on which the structure of the fragment depends.
Must be either a boolean or an F# union.
mkNode : 'T -> Node
-
The function that creates the node. If matching is a union,
then mkNode must only match on the case, without nested patterns.
Returns: Node
The generated HTML fragment wrapped in a way that Blazor can render.
Modifiers: inline Type parameters: 'T |
ExampleThis function is necessary because Blazor cannot properly render HTML whose structure changes depending on some runtime state. For example, the following would fail at runtime:
val failing: isBold: bool -> 'a
val isBold: bool
type bool = System.Boolean
Instead, M:cond must be used:
val succeeding: isBold: bool -> 'a
val isBold: bool
type bool = System.Boolean
|
Full Usage:
elt name
Parameters:
string
-
The name of the element.
Returns: ElementBuilder
A computation expression builder to insert attributes and children in the element.
Modifiers: inline |
Builders such as P:div also exist for all standard HTML elements. In general, it is only useful to call M:elt to create a non-standard element.
Example
val helloWorld: obj
|
|
|
|
|
Full Usage:
rawHtml str
Parameters:
string
-
The raw HTML string.
Returns: Node
Modifiers: inline |
|
When inside an HTML computation expression, a text node can be inserted by simply yielding a string, without having to wrap it in M:text.
val helloWorld: obj
|
|
Full Usage:
textf format
Parameters:
StringFormat<'a, Node>
-
The ExtraTopLevelOperators.printf-style format string.
Returns: 'a
Modifiers: inline |
|