nixCodeX/elm-bootstrap/2.0.0

NOTE: the latest version is 3.1.1

Renamed to aDifferentJT/elm-bootstrap. That is where the repository lives now. It has not been published as a package under the new name.

Versions published as nixCodeX/elm-bootstrap still install under that name. 13 versions of 13 come from the new location (see their notes).

Rerouted (renamed, verified). The GitHub user or repository was renamed. The tag is still there, at the new name. The Lamdera package server serves a copy recovered from https://github.com/aDifferentJT/elm-bootstrap.

What we checked: The repo moved to github.com/aDifferentJT/elm-bootstrap. Rebuilt with git archive from commit f885d7bc86cd of https://github.com/aDifferentJT/elm-bootstrap (zip prefix nixCodeX-elm-bootstrap-f885d7b/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 2e6a38f822336f5bf811c76b8746d02e73463968.

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/nixCodeX/elm-bootstrap/zipball/2.0.0/

Bootstrap.Table

Create simple and customizable tables in a fairly type safe manner!

Table

simpleTable : ( THead msg, TBody msg ) -> Html msg

Allows you to create a simple default table

  • (thead, tbody) - A tuple of a thead item and a tbody item
{ options : List (TableOption msg)
, thead : THead msg
, tbody : TBody msg
}
-> Html msg

Create a customizable table

Table.table
    { options = [ Table.striped ] -- list of table options
    , thead = Table.thead ... etc
    , tbody = Table.tbody ... etc
    }

Table options

Option to give a table an inversed color scheme (dark backround, light text)

Option to give a table a striped look (zebra style)

Option to put borders around a table

Change row coloring to highlight row when hovered over

Option to give a more condensed table with less padding/margins

Make table responsive for horizontally scrolling tables accross all breakpoints.

Make table responsive for up until the -sm breakpoint.

Make table responsive for up until the -md breakpoint.

Make table responsive for up until the -lg breakpoint.

Make table responsive for up until the -xl breakpoint.

attr : Attribute msg -> TableOption msg

When you need to customize a table element with a standard Html.Attribute, use this function to create it as a TableOption

type TableOption msg

Opaque type representing possible styling options for a table

Table headers

simpleThead : List (Cell msg) -> THead msg

Create a default thead with one row of cells (typically th elements)

simpleThead
    [ Table.th [] [ text "Col1" ]
    , Table.th [] [ text "Col2" ]
    ]
thead : List (TableHeadOption msg) -> List (Row msg) -> THead msg

Create a customizable thead element

  • options List of options to style the thead element
  • rows List of rows (aka tr)
headAttr : Attribute msg -> TableHeadOption msg

When you need to customize a thead element with a standard Html.Attribute, use this function to create a TableHeadOption

type THead msg

Opaque type representing a thead element

Header options

Option to color header with default color scheme.

Option to inverse thead element. Dark background and light text color

Opaque type representing possible styling options for a thead element

Table body

tbody : List (Attribute msg) -> List (Row msg) -> TBody msg

Create a tbody element

  • attributes List of standard Elm html attributes
  • rows List of table row elements (tr)
keyedTBody : List (Attribute msg) -> List ( String, Row msg ) -> TBody msg

Create a tbody element where each row is keyed

  • attributes List of standard Elm html attributes
  • rows List of key table row elements (tr) tuples
type TBody msg

Opaque type representing a tbody element

Rows

tr : List (RowOption msg) -> List (Cell msg) -> Row msg

Create a table row

-- For use (typically) in a tbody
Table.tr
    [ Table.rowInfo ]
    [ Table.td [] [ text "Some cell" ]
    , Table.td [] [ text "Another cell" ]
    ]


-- alternatively when creating a thead
Table.tr
    [ Table.rowInfo ]
    [ Table.th [] [ text "Col1" ]
    , Table.th [] [ text "Col2" ]
    ]
keyedTr : List (RowOption msg) -> List ( String, Cell msg ) -> Row msg

Create a table row with keyed td or th child elements.

type Row msg

Opaque type representing a tr

Row options

Style a table row with the active color.

Style a table row with the primary color.

Style a table row with the secondary color.

Style a table row with the info color.

Style a table row with the success color.

Style a table row with the warning color.

Style a table row with the danger color.

Style a table row with the light color.

Style a table row with the dark color.

rowAttr : Attribute msg -> RowOption msg

When you need to customize a tr element with standard Html.Attribute attributes, use this function

type RowOption msg

Opaque type representing possible styling options for a tr element (both in thead and tbody)

Cells

td : List (CellOption msg) -> List (Html msg) -> Cell msg

Create a td element

Table.td [ Table.cellInfo ] [ text "Some info cell" ]
  • options List of options for customizing
  • children List of child elements
th : List (CellOption msg) -> List (Html msg) -> Cell msg

Create a th element

Table.th [ Table.cellInfo ] [ text "Some info header cell" ]
  • options List of options for customizing
  • children List of child elements
type Cell msg

Opaque type representing a cell (tr or td)

Cell options

Option to style an individual cell with the active color

Option to style an individual cell with the primary color

Option to style an individual cell with the secondary color

Option to style an individual cell with the info color

Option to style an individual cell with the success color

Option to style an individual cell with the warning color

Option to style an individual cell with the danger color

Option to style an individual cell with the light color

Option to style an individual cell with the dark color

cellAttr : Attribute msg -> CellOption msg

When you need to customize a td or th with standard Html.Attribute attributes, use this function

type CellOption msg

Opaque type representing possible styling options for a cell, ie td and th