ProductPromotion
Logo

Elm

made by https://0x3d.site

GitHub - kalutheo/elm-ui-explorer
Contribute to kalutheo/elm-ui-explorer development by creating an account on GitHub.
Visit Site

GitHub - kalutheo/elm-ui-explorer

GitHub - kalutheo/elm-ui-explorer

Elm UI Explorer

logo

Build Status

UI Component Explorers and Style Guides have been around for a while now. We don't build pages anymore but components that are assembled together to build systems.

In the Elm world, components are just called views, and are defined as pure functions. Elm UI Explorer takes advantage of the composability and the purity of Elm and offers a way to showcase your views and their states in a single tool. This project is inspired by React Storybook and styled with Tailwind

How to use it ?

Quick Start

First install the cli.

npm install @kalutheo/uie

Then initialize your project.

uie init

To run your explorer:

npm run uie

Finally, you should be able to see your explorer by visiting http://localhost:8000

Manual Setup

Here is a basic example of a button showcased in Elm UI Explorer:

Add this to your Main.elm file.

import Html
import Html.Attributes exposing (style)
import UIExplorer exposing (UIExplorerProgram, defaultConfig, explore, storiesOf)


button : String -> String -> Html.Html msg
button label bgColor =
    Html.button
        [ style "background-color" bgColor ]
        [ Html.text label ]


main : UIExplorerProgram {} () {}
main =
    explore
        defaultConfig
        [ storiesOf
            "Button"
            [ ( "SignIn", \_ -> button "Sign In" "pink", {} )
            , ( "SignOut", \_ -> button "Sign Out" "cyan", {} )
            , ( "Loading", \_ -> button "Loading please wait..." "white", {} )
            ]
        ]

Then in your Html add a link to the Elm UI Explorer stylesheet

<link
  rel="stylesheet"
  type="text/css"
  href="https://cdn.jsdelivr.net/gh/kalutheo/elm-ui-explorer@master/assets/styles.css"
/>

You can now run the Main.elm application with the tool of your choice.

Examples

Checkout all examples source code here

Main Features

  • Deep linking: You can easily share UI Explorer states by copying and pasting the url ( ex: attach them to your JIRA tickets, Pull Request etc... )

  • Categories: Your UI Explorer can be divided into categories. Convenient if you have many views and you want to group them by family.

  • Plugins: Elm UI Explorer has a mechanism that let you extend the tool by creating your own plugins. By defaults the library comes with built in plugins.
  • Customization: You can make the header match your brand identity by changing colors, title and icons.

  • Responsivness: The explorer navigation is adapted for devices with small screens.

  • Dark mode: For aesthetic purposes, Dark mode can be enabled with one click.

Best Practices

  • For hot reloading, it's recommended to use Create Elm App. Elm Live is also a great alternative that provides live reloading.

  • In order to avoid CSS conflicts with built in UI Explorer Styles, consider using elm-css or elm-ui. Theses tools use technics that prevent styles collisions by scoping the css.

  • Try to adopt SDD (StoryBook Driven Development), creating UI this way can be very efficient.

  • Use Atomic Design paradigm. This will help you build a scalable Design System.

  • All ids (Story names and categories) should be unique (ex: DropDown Menu, Loading, Loaded etc... )

FAQ

For further informations, you can check the Frequently Asked Questions (FAQ) section.

More Resources
to explore the angular.

mail [email protected] to add your project or resources here ๐Ÿ”ฅ.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here ๐Ÿ”.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory