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 :: Type -> Row Type -> (Type -> Type) -> Type
type ComponentHTML action slots m = HTML (ComponentSlot 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 w i. PlainHTML -> HTML w i
Relaxes the type of PlainHTML
to make it compatible with all HTML
.
#slot Source
slot :: forall query action input output slots m label slot _1. Cons label (Slot query output slot) _1 slots => IsSymbol label => Ord slot => Proxy label -> slot -> Component query input output m -> input -> (output -> 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
#slot_ Source
slot_ :: forall query action input output slots m label slot _1. Cons label (Slot query output slot) _1 slots => IsSymbol label => Ord slot => Proxy label -> slot -> Component query input output m -> input -> ComponentHTML action slots m
Defines a slot for a child component, ignoring its output.
This variant may be used when the component produces output, but it is not
needed in the current context, or instead of passing absurd
to slot
when the output type is Void
.
Takes:
- the slot address label
- the slot address index
- the component for the slot
- the input value to pass to the component
#memoized Source
memoized :: forall a action slots m. (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 a action slots m. (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 a b action slots m. (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 a b c action slots m. (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 AutocompleteType
IsProp OrderedListType
IsProp PreloadValue
IsProp ScopeValue
IsProp StepValue
IsProp WrapValue
IsProp InputAcceptType
Re-exports from Halogen.HTML.Elements
#textarea Source
textarea :: forall w i. Leaf HTMLtextarea w i
#summary Source
summary :: forall w i. Node HTMLsummary w i
#strong Source
strong :: forall w i. Node HTMLstrong w i
#source Source
source :: forall w i. Leaf HTMLsource w i
#select Source
select :: forall w i. Node HTMLselect w i
#section Source
section :: forall w i. Node HTMLsection w i
#script Source
script :: forall w i. Node HTMLscript w i
#progress Source
progress :: forall w i. Node HTMLprogress w i
#output Source
output :: forall w i. Node HTMLoutput w i
#option Source
option :: forall w i. Node HTMLoption w i
#optgroup Source
optgroup :: forall w i. Node HTMLoptgroup w i
#object Source
object :: forall w i. Node HTMLobject w i
#noscript Source
noscript :: forall w i. Node HTMLnoscript w i
#legend Source
legend :: forall w i. Node HTMLlegend w i
#iframe Source
iframe :: forall w i. Leaf HTMLiframe w i
#header Source
header :: forall w i. Node HTMLheader w i
#figure Source
figure :: forall w i. Node HTMLfigure w i
#fieldset Source
fieldset :: forall w i. Node HTMLfieldset w i
#dialog Source
dialog :: forall w i. Node HTMLdialog w i
#details Source
details :: forall w i. Node HTMLdetails w i
#datalist Source
datalist :: forall w i. Node HTMLdatalist w i
#command Source
command :: forall w i. Leaf HTMLcommand w i
#colgroup Source
colgroup :: forall w i. Node HTMLcolgroup w i
#canvas Source
canvas :: forall w i. Leaf HTMLcanvas w i
#button Source
button :: forall w i. Node HTMLbutton w i
#blockquote Source
blockquote :: forall w i. Node HTMLblockquote w i
#article Source
article :: forall w i. Node HTMLarticle w i
#address Source
address :: forall w i. 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. Event - Halogen.
Query. HalogenM - Halogen.
Query. HalogenQ - Halogen.
Query. Input - Halogen.
VDom. Driver