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) -> Typetype 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.
actionis the type of actions, events internal to the component that can be evaluated with thehandleActionfunctionslotsis the set of child component types that can be used in the HTMLmis the monad used by the child component during evaluation
#PlainHTML Source
type PlainHTML = HTML Void VoidA 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 iRelaxes 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 mDefines 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 mDefines 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 mOptimizes 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 mSkips 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 mLike 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 mLike lazy, but for a rendering function which takes 3 arguments.
Re-exports from Halogen.HTML.Core
#IsProp Source
class IsProp a Instances
IsProp StringIsProp IntIsProp NumberIsProp BooleanIsProp MediaTypeIsProp ButtonTypeIsProp CrossOriginValueIsProp DirValueIsProp FormMethodIsProp InputTypeIsProp KindValueIsProp MenuitemTypeIsProp MenuTypeIsProp AutocompleteTypeIsProp OrderedListTypeIsProp PreloadValueIsProp ScopeValueIsProp StepValueIsProp WrapValueIsProp 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#figcaption Source
figcaption :: forall w i. Node HTMLfigcaption 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#caption Source
caption :: forall w i. Node HTMLcaption 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 iRe-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