uncover-co / elm-widgets-alpha / W.Styles

You will need both globalStyles and a theme to get started with elm-widgets.

view : List (Html msg)
view =
    [ W.Styles.globalStyles
    , W.Styles.baseTheme

    -- ... your application views
    ]

Custom Themes

elm-widgets is fully compatible with elm-theme. So you can use that package to create and expose new themes to your application.

e.g. This would create a dark-mode ready application based on the user system's settings.

import Theme
import W.Styles

view : List (Html msg)
view =
    [ W.Styles.globalStyles
    , Theme.globalProviderWithDarkMode
        { light = Theme.lightTheme
        , dark = Theme.darkTheme
        , strategy = Theme.systemStrategy
        }

    -- ... your application views
    ]

API

globalStyles : Html msg

baseTheme : Html msg