This module defines a type of link targets, which can be used as the target of a hyperlink or button.
This type is quite useful when defining reusable components.
data URL
A type-safe wrapper for a URL
instance eqURL :: Eq URL
instance semigroupURL :: Semigroup URL
instance showURL :: Show URL
url :: String -> URL
Create a URL
runURL :: URL -> String
Unwrap a URL
data Target a
= LinkTarget URL
| DataTarget a
There are two types of target:
LinkTarget
creates a target which links to a URL.DataTarget
creates a target which carries data which may be used to generate inputs or requests.
target :: forall i. Target i -> [A.Attr i]
Attach a Target
to an element using the href
or onclick
attribute as appropriate