reflex-dom-0.3: Functional Reactive Web Apps with Reflex

Safe HaskellNone




textInput :: MonadWidget t m => TextInputConfig t -> m (TextInput t) Source

Create an input whose value is a string. By default, the "type" attribute is set to "text", but it can be changed using the _textInputConfig_inputType field. Note that only types for which the value is always a string will work - types whose value may be null will not work properly with this widget.

checkbox :: MonadWidget t m => Bool -> CheckboxConfig t -> m (Checkbox t) Source

Create an editable checkbox Note: if the "type" or "checked" attributes are provided as attributes, they will be ignored

data Dropdown t k Source




HasValue (Dropdown t k) Source 
type Value (Dropdown t k) = Dynamic t k Source 

dropdown :: forall k t m. (MonadWidget t m, Ord k, Show k, Read k) => k -> Dynamic t (Map k String) -> DropdownConfig t k -> m (Dropdown t k) Source

Create a dropdown box The first argument gives the initial value of the dropdown; if it is not present in the map of options provided, it will be added with an empty string as its text

dropdown_value :: forall t k. Lens' (Dropdown t k) (Dynamic t k) Source

dropdown_change :: forall t k. Lens' (Dropdown t k) (Event t k) Source

class HasValue a where Source

Associated Types

type Value a :: * Source


value :: a -> Value a Source

def :: Default a => a

The default value for this type.

(&) :: a -> (a -> b) -> b infixl 1

& is a reverse application operator. This provides notational convenience. Its precedence is one higher than that of the forward application operator $, which allows & to be nested in $.


(.~) :: ASetter s t a b -> b -> s -> t infixr 4

Replace the target of a Lens or all of the targets of a Setter or Traversal with a constant value.

This is an infix version of set, provided for consistency with (.=).

f <$ a ≡ mapped .~ f $ a
>>> (a,b,c,d) & _4 .~ e
>>> (42,"world") & _1 .~ "hello"
>>> (a,b) & both .~ c
(.~) :: Setter s t a b    -> b -> s -> t
(.~) :: Iso s t a b       -> b -> s -> t
(.~) :: Lens s t a b      -> b -> s -> t
(.~) :: Traversal s t a b -> b -> s -> t