lenards/elm-ui-patternfly/2.0.0

NOTE: the latest version is 4.0.2

PF6.Truncate

PF6 Truncate component

Text truncation with a tooltip showing the full text on hover.

See: https://www.patternfly.org/components/truncate

Definition

type Truncate msg

Opaque Truncate type

Truncation mode

Constructor

truncate : String -> Truncate msg

Construct a Truncate with text content

truncate "This is a very long text string that should be truncated"
    |> withMaxChars 20
    |> toMarkup

Modifiers

withMaxChars : Int -> Truncate msg -> Truncate msg

Set the maximum number of visible characters

Truncate from the middle (keeps start and end visible)

Truncate from the end (default)

Rendering

toMarkup : Truncate msg -> Element msg

Render the Truncate as an Element msg