Skip to content

matthunz/conduct

Repository files navigation

Conduct

CI

Examples

A cross-platform UI framework for Haskell.

This package provides an Elm-style user interface library for Tauri.

import Attribute
import EventLoop (run)
import Html (Html (..))
import qualified Html

data Message = Increment | Decrement

view :: Int -> Html Message
view count =
  Html.div
    []
    [ Text $ "High five count: " ++ show count,
      Html.button [onClick Increment] [Text "Up high!"],
      Html.button [onClick Decrement] [Text "Down low!"]
    ]

update :: Int -> Message -> IO Int
update count msg = return $ case msg of
  Increment -> count + 1
  Decrement -> count - 1

main :: IO ()
main = run view 0 update

About

A cross-platform UI framework for Haskell

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published