betagouv/elm-dsfr/2.0.0

NOTE: the latest version is 5.2.0

Rerouted (regenerated, verified). Same repository and tag, but GitHub now builds the zip with different bytes, so it no longer matches the SHA-1 package.elm-lang.org recorded. The Lamdera package server serves a copy recovered from https://github.com/betagouv/elm-dsfr.

What we checked: Rebuilt with git archive from commit c5fa2ca801b8 of https://github.com/betagouv/elm-dsfr (zip prefix betagouv-elm-dsfr-c5fa2ca/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 ea4bb71554869e10568bb080bc836dc59bc26727.

The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.

Details · package.elm-lang.org's zip: https://github.com/betagouv/elm-dsfr/zipball/2.0.0/

Introduction

Un package Elm pour le System de design du gouvernement français (DSFR). Ce projet est en cours développement. Contribuez et faites-nous part de vos retours via les GitHub Issues.

Installation

En premier lieu, chargez les feuilles de styles du DSFR. Veuillez utiliser la version 1.8 ou supérieure.

Puis installez les packages Elm suivants :

elm install tesk9/accessible-html
elm install betagouv/elm-dsfr

Exemples

Afficher un champ date :

import Accessibility exposing (Html, text)
import BetaGouv.DSFR.Input as Input

view : String -> Html Msg
view date =
    Input.new
        { value = date
        , onInput = UpdateDate
        , label = text "Date"
        , name = "nom"
        }
        |> Input.date
        |> Input.view

Afficher un textarea avec une classe personnalisée :

import Accessibility exposing (Html, text)
import BetaGouv.DSFR.Input as Input
import Html.Attributes exposing (class)

view : String -> Html Msg
view value =
    Input.new
        { value = value
        , onInput = UpdateComment
        , label = text "Commentaire"
        , name = "commentaire"
        }
        |> Input.textArea (Just 8)
        |> Input.withExtraAttrs [ class "w-full" ]
        |> Input.view

Documentation

Retrouvez la documentation complète sur package.elm-lang.org/packages/betagouv/elm-dsfr/latest/.