Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Provides a type and utilities for the "swap style" for hx-swap https://htmx.org/attributes/hx-swap/
Synopsis
- data Swap
Documentation
https://htmx.org/attributes/hx-swap/
The different styles that can be used for swapping in content.
Usually defaults to InnerHTML
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
Render Swap Source # | |
FromHttpApiData Swap Source # | |
Defined in Htmx.Swap parseUrlPiece :: Text -> Either Text Swap # parseHeader :: ByteString -> Either Text Swap # | |
ToHttpApiData Swap Source # | |
Defined in Htmx.Swap toUrlPiece :: Swap -> Text # toEncodedUrlPiece :: Swap -> Builder # toHeader :: Swap -> ByteString # toQueryParam :: Swap -> Text # toEncodedQueryParam :: Swap -> Builder # |