Halogen.HTML
- Package
- purescript-halogen
- Repository
- purescript-halogen/purescript-halogen
This module re-exports the types for the HTML
DSL, and values for all
supported HTML elements.
#ComponentHTML Source
type ComponentHTML action slots m = HTML (ComponentSlot HTML slots m action) action
A convenience synonym for the output type of a render
function for a
component that renders HTML.
action
is the type of actions, events internal to the component that can be evaluated with thehandleAction
functionslots
is the set of child component types that can be used in the HTMLm
is the monad used by the child component during evaluation
#PlainHTML Source
type PlainHTML = HTML Void Void
A type useful for a chunk of HTML with no slot-embedding or query-raising.
Often a polymorphic usage of HTML
is good enough for this, but sometimes
it's useful to have a type like this (and accompanying coercion) when doing
things like creating components that accept a chunk of HTML as part of
their configuration.
#fromPlainHTML Source
fromPlainHTML :: forall i w. PlainHTML -> HTML w i
Relaxes the type of PlainHTML
to make it compatible with all HTML
.
#slot Source
slot :: forall _1 slot label m slots output input action query. Cons label (Slot query output slot) _1 slots => IsSymbol label => Ord slot => SProxy label -> slot -> Component HTML query input output m -> input -> (output -> Maybe action) -> ComponentHTML action slots m
Defines a slot for a child component. Takes:
- the slot address label
- the slot address index
- the component for the slot
- the input value to pass to the component
- a function mapping outputs from the component to a query in the parent
#memoized Source
memoized :: forall m slots action a. (a -> a -> Boolean) -> (a -> ComponentHTML action slots m) -> a -> ComponentHTML action slots m
Optimizes rendering of a subtree given an equality predicate. If an argument
is deemed equivalent to the previous value, rendering and diffing will be
skipped. You should not use this function fully saturated, but instead
partially apply it for use within a Component's scope. For example, to skip
rendering for equal states, just wrap your render
function.
myComponent = component
{ render: memoized eq render
, ...
}
#lazy Source
lazy :: forall m slots action a. (a -> ComponentHTML action slots m) -> a -> ComponentHTML action slots m
Skips rendering for referentially equal arguments. You should not use this function fully saturated, but instead partially apply it for use within a Component's scope.
#lazy2 Source
lazy2 :: forall m slots action b a. (a -> b -> ComponentHTML action slots m) -> a -> b -> ComponentHTML action slots m
Like lazy
, but for a rendering function which takes 2 arguments.
#lazy3 Source
lazy3 :: forall m slots action c b a. (a -> b -> c -> ComponentHTML action slots m) -> a -> b -> c -> ComponentHTML action slots m
Like lazy
, but for a rendering function which takes 3 arguments.
Re-exports from Halogen.HTML.Core
#IsProp Source
class IsProp a
Instances
IsProp String
IsProp Int
IsProp Number
IsProp Boolean
IsProp MediaType
IsProp ButtonType
IsProp CrossOriginValue
IsProp DirValue
IsProp FormMethod
IsProp InputType
IsProp KindValue
IsProp MenuitemType
IsProp MenuType
IsProp OnOff
IsProp OrderedListType
IsProp PreloadValue
IsProp ScopeValue
IsProp StepValue
IsProp WrapValue
IsProp InputAcceptType
Re-exports from Halogen.HTML.Elements
#textarea Source
textarea :: forall i w. Leaf HTMLtextarea w i
#summary Source
summary :: forall i w. Node HTMLsummary w i
#strong Source
strong :: forall i w. Node HTMLstrong w i
#source Source
source :: forall i w. Leaf HTMLsource w i
#select Source
select :: forall i w. Node HTMLselect w i
#section Source
section :: forall i w. Node HTMLsection w i
#script Source
script :: forall i w. Node HTMLscript w i
#progress Source
progress :: forall i w. Node HTMLprogress w i
#output Source
output :: forall i w. Node HTMLoutput w i
#option Source
option :: forall i w. Node HTMLoption w i
#optgroup Source
optgroup :: forall i w. Node HTMLoptgroup w i
#object Source
object :: forall i w. Node HTMLobject w i
#noscript Source
noscript :: forall i w. Node HTMLnoscript w i
#legend Source
legend :: forall i w. Node HTMLlegend w i
#iframe Source
iframe :: forall i w. Leaf HTMLiframe w i
#header Source
header :: forall i w. Node HTMLheader w i
#figure Source
figure :: forall i w. Node HTMLfigure w i
#fieldset Source
fieldset :: forall i w. Node HTMLfieldset w i
#dialog Source
dialog :: forall i w. Node HTMLdialog w i
#details Source
details :: forall i w. Node HTMLdetails w i
#datalist Source
datalist :: forall i w. Node HTMLdatalist w i
#command Source
command :: forall i w. Leaf HTMLcommand w i
#colgroup Source
colgroup :: forall i w. Node HTMLcolgroup w i
#canvas Source
canvas :: forall i w. Leaf HTMLcanvas w i
#button Source
button :: forall i w. Node HTMLbutton w i
#blockquote Source
blockquote :: forall i w. Node HTMLblockquote w i
#article Source
article :: forall i w. Node HTMLarticle w i
#address Source
address :: forall i w. Node HTMLaddress w i
Re-exports from Halogen.HTML.Properties
- Modules
- Halogen
- Halogen.
Aff - Halogen.
Aff. Driver - Halogen.
Aff. Driver. Eval - Halogen.
Aff. Driver. State - Halogen.
Aff. Util - Halogen.
Component - Halogen.
Component. Profunctor - Halogen.
Data. OrdBox - Halogen.
Data. Slot - Halogen.
HTML - Halogen.
HTML. Core - Halogen.
HTML. Elements - Halogen.
HTML. Elements. Keyed - Halogen.
HTML. Events - Halogen.
HTML. Properties - Halogen.
HTML. Properties. ARIA - Halogen.
Query - Halogen.
Query. ChildQuery - Halogen.
Query. EventSource - Halogen.
Query. HalogenM - Halogen.
Query. HalogenQ - Halogen.
Query. Input - Halogen.
VDom. Driver