htmx-0.1.0.0: Use htmx with various haskell libraries
Safe HaskellSafe-Inferred
LanguageHaskell2010

Htmx.Swap

Description

Provides a type and utilities for the "swap style" for hx-swap https://htmx.org/attributes/hx-swap/

Synopsis

Documentation

data Swap Source #

https://htmx.org/attributes/hx-swap/ The different styles that can be used for swapping in content. Usually defaults to InnerHTML

Constructors

InnerHTML

Replace the inner html of the target element

OuterHTML

Replace the entire target element with the response

TextContent

Replace the text content of the target element, without parsing the response as HTML

BeforeBegin

Insert the response before the target element

AfterBegin

Insert the response before the first child of the target element

BeforeEnd

Insert the response after the last child of the target element

AfterEnd

Insert the response after the target element

Delete

Deletes the target element regardless of the response

None

Does not append content from response (out of band items will still be processed).

Instances

Instances details
Render Swap Source # 
Instance details

Defined in Htmx.Swap

Methods

render :: Swap -> Text Source #

FromHttpApiData Swap Source # 
Instance details

Defined in Htmx.Swap

ToHttpApiData Swap Source # 
Instance details

Defined in Htmx.Swap