Node Module

Functions and values

Function or value Description

Concat nodes

Full Usage: Concat nodes

Parameters:
    nodes : seq<Node> - The HTML fragments.

Returns: Node The concatenated HTML fragments.
Modifiers: inline

Create an HTML fragment that is the concatenation of given HTML fragments.

This function can be used to build a concatenation of fragments whose structure does not vary across renders. To concatenate fragments based on a variable list of values, use M:ForEach instead.

nodes : seq<Node>

The HTML fragments.

Returns: Node

The concatenated HTML fragments.

Elt name attrs children

Full Usage: Elt name attrs children

Parameters:
    name : string - The name of the HTML element.
    attrs : seq<Attr> - The attributes of the HTML element.
    children : seq<Node> - The children of the HTML element.

Returns: Node An HTML element.
Modifiers: inline

Create an HTML element using a list of attributes and a list of children.

name : string

The name of the HTML element.

attrs : seq<Attr>

The attributes of the HTML element.

children : seq<Node>

The children of the HTML element.

Returns: Node

An HTML element.

Empty ()

Full Usage: Empty ()

Parameters:
    () : unit

Returns: Node An empty HTML fragment.
Modifiers: inline

Create an empty HTML fragment.

() : unit
Returns: Node

An empty HTML fragment.

ForEach items mkNode

Full Usage: ForEach items mkNode

Parameters:
    items : seq<'T> - The items used to generate HTML fragments.
    mkNode : 'T -> Node - The function that generates an HTML fragment from an item.

Returns: Node The HTML fragments generated and concatenated into one.
Modifiers: inline
Type parameters: 'T

Create an HTML fragment that is the concatenation of fragments obtained by mapping a function on a sequence of items.

items : seq<'T>

The items used to generate HTML fragments.

mkNode : 'T -> Node

The function that generates an HTML fragment from an item.

Returns: Node

The HTML fragments generated and concatenated into one.

Fragment fragment

Full Usage: Fragment fragment

Parameters:
Returns: Node A Bolero Node representing the Blazor RenderFragment.
Modifiers: inline

Wrap a Blazor RenderFragment in a Bolero Node.

fragment : RenderFragment

The Blazor RenderFragment.

Returns: Node

A Bolero Node representing the Blazor RenderFragment.

Match value node

Full Usage: Match value node

Parameters:
    value : 'T - The boolean or union value.
    node : Node - The HTML fragment whose structure depends on the boolean or union value.

Returns: Node The same HTML fragment wrapped in a way that Blazor can render.
Modifiers: inline
Type parameters: 'T

Create a conditional HTML fragment whose structure depends on a boolean value or the case of a union.

value : 'T

The boolean or union value.

node : Node

The HTML fragment whose structure depends on the boolean or union value.

Returns: Node

The same HTML fragment wrapped in a way that Blazor can render.

RawHtml html

Full Usage: RawHtml html

Parameters:
    html : string - The raw HTML.

Returns: Node An HTML fragment.
Modifiers: inline

Create an HTML fragment fram raw HTML.

html : string

The raw HTML.

Returns: Node

An HTML fragment.

Text text

Full Usage: Text text

Parameters:
    text : string - The text of the node.

Returns: Node An HTML text node.
Modifiers: inline

Create an HTML text node.

text : string

The text of the node.

Returns: Node

An HTML text node.