lenards/elm-ui-patternfly/1.4.0

NOTE: the latest version is 4.0.2

Rerouted (retagged, needs approval). The tag now points at a different commit than when this version was published. The Lamdera package server serves a copy recovered from https://github.com/lenards/elm-ui-patternfly.

What we checked: Tag 1.4.0 is still on github.com/lenards/elm-ui-patternfly; its commit 3e5350f9e0b9 is from 2026-03-24 18:11 UTC, after the version was published (2022-04-24 23:05 UTC); elm.json differs from package.elm-lang.org's; the exposed modules do not match docs.json; the zip's SHA-1 is not the published one and nothing else confirms its contents.

We could not verify this copy against what was published, so the Lamdera compiler asks before using it (y/n). Without a terminal, as in CI, it stops with an error unless approved:

  • lamdera make --auto-approve-package-rerouting approves rerouted versions for that run,
  • LAMDERA_AUTO_APPROVE_PACKAGE_REROUTING=1 does the same for every run in that environment,
  • LAMDERA_CACHE=off skips the Lamdera package server altogether: packages come from package.elm-lang.org and GitHub only, as with elm, and a rerouted version then fails to download.

Details · package.elm-lang.org's zip: https://github.com/lenards/elm-ui-patternfly/zipball/1.4.0/

elm-ui-patternfly

An elm-ui implementation of the PatternFly 6 design system.

66 components · Elm 0.19.1 · Builder pattern · No CSS required

Live Demo — Browse all 66 components interactively.


About

elm-ui-patternfly brings PatternFly 6's component library to Elm applications built with elm-ui. Every component follows the same builder pattern — construct a base value, pipe modifiers through it, and call toMarkup to get an Element msg. No HTML, no CSS, no class names.

elm install lenards/elm-ui-patternfly

Quick start

Every component follows the same pattern:

import PF6.Button as Button
import PF6.Badge as Badge

-- Construct → modify → render
Button.primary { label = "Save", onPress = Just Saved }
    |> Button.withLargeSize
    |> Button.withIcon myIcon
    |> Button.toMarkup

Badge.badge 7
    |> Badge.withOverflowAt 99
    |> Badge.toMarkup

All components produce Element msg values compatible with any elm-ui layout.


Design tokens

PF6.Tokens is the foundation of the component library — all colors, spacing, radii, and font sizes come from it. You can use tokens directly in your own layouts for visual consistency:

import PF6.Tokens as Tokens

Element.el
    [ Element.padding Tokens.spacerMd
    , Bg.color Tokens.colorBackgroundDefault
    , Font.color Tokens.colorText
    , Border.rounded Tokens.radiusMd
    ]
    content

Key token groups: color*, spacer*, fontSize*, radius*, fontWeight*.


Components

Primitives

ComponentModuleDescription
ButtonPF6.Button7 variants (primary, secondary, tertiary, danger, warning, link, plain), 3 sizes, icon support
BadgePF6.BadgeNumeric count badge with overflow cap and unread variant
LabelPF6.Label8 color variants, outline, compact, closable, icon support
AvatarPF6.AvatarUser avatar image, 3 sizes, optional border
IconPF6.IconSemantic icon wrapper with status colors and 4 sizes
TitlePF6.TitleHeading levels H1–H6 with PF6 sizing
DividerPF6.DividerHorizontal rule with inset variants

Feedback & Status

ComponentModuleDescription
AlertPF6.AlertInline alerts — default, success, danger, warning, info; optional close
BannerPF6.BannerFull-width site banners with optional link
SpinnerPF6.SpinnerAnimated loading indicator, 4 sizes
SkeletonPF6.SkeletonLoading placeholder — text lines, circle, and square variants
EmptyStatePF6.EmptyStateEmpty state with icon, title, body, and actions
ProgressPF6.ProgressProgress bar with status colors and size variants
HelperTextPF6.HelperTextForm field helper text — default, error, warning, success, indeterminate

Forms

ComponentModuleDescription
TextInputPF6.TextInputText field with label, placeholder, validation states, disabled
CheckboxPF6.CheckboxCheckbox with label and optional description
RadioPF6.RadioRadio button with label and optional description
SwitchPF6.SwitchToggle switch with on/off labels
NumberInputPF6.NumberInputNumeric input with increment/decrement, min/max/step, unit suffix
SearchInputPF6.SearchInputSearch field with clear, submit, and typeahead hints
SelectPF6.SelectSingle-select dropdown with option groups
FormPF6.FormForm layout with labeled groups, required markers, and helper text
ComponentModuleDescription
BreadcrumbPF6.BreadcrumbBreadcrumb trail with linked and current-page items
TabsPF6.TabsTab navigation — default, box, vertical, and filled variants
PaginationPF6.PaginationPage navigation with item count and compact variant

Layout

ComponentModuleDescription
CardPF6.CardContent card with title, footer, flat, compact, and selectable variants
PagePF6.PagePage shell with masthead, sidebar, and main content area
DrawerPF6.DrawerSliding panel — right, left, or bottom; inline or overlay mode

Overlays

ComponentModuleDescription
ModalPF6.ModalFull-viewport modal dialog with title, body, footer, and size variants
TooltipPF6.TooltipHover tooltip — top, bottom, left, right positioning
PopoverPF6.PopoverClick-triggered overlay with title, body, footer, and close button
DropdownPF6.DropdownAction dropdown with dividers, headers, and position control
AccordionPF6.AccordionExpandable content sections with bordered and large-display variants
ExpandableSectionPF6.ExpandableSectionSingle toggle-show/hide content block

Content

ComponentModuleDescription
CodeBlockPF6.CodeBlockRead-only code display with expandable variant
ClipboardCopyPF6.ClipboardCopyCopy-to-clipboard with inline and block variants
ListPF6.ListBulleted, ordered, plain, and inline list variants
DescriptionListPF6.DescriptionListTerm/value pairs — vertical and horizontal layouts
ActionListPF6.ActionListSpaced group of action buttons

Data

ComponentModuleDescription
TablePF6.TableData table with sortable columns, striped rows, compact, and bordered variants
DataListPF6.DataListFlexible list with checkable rows and expandable content
ToolbarPF6.ToolbarFilter/sort toolbar with item groups, separator, and item count

Additional

ComponentModuleDescription
NotificationDrawerPF6.NotificationDrawerSlide-out notification panel with variant icons and read/unread state
JumpLinksPF6.JumpLinksIn-page anchor navigation with subsections and optional label
NavigationPF6.NavigationVertical/horizontal application navigation

Example app — pf6-guide

The examples/pf6-guide/ directory contains a full interactive TEA application that demonstrates all 66 components with live state. A live version is deployed automatically to lenards.github.io/elm-ui-patternfly on every push to main.

cd examples/pf6-guide
npm install           # install dev tools (first time only)
npm run build         # compile Elm → main.js
npm run serve         # serve on http://localhost:8001

Or if you just want to compile and open directly without a server:

cd examples/pf6-guide
elm make src/Main.elm --output=main.js
open index.html

Note: elm reactor will show a blank page because it doesn't pre-compile main.js. Use npm run serve or open index.html after running elm make.

The guide is organized into 9 sections matching the component groups above. Every component is shown with multiple variants and real interactive state (forms you can type in, modals you can open, accordions you can expand, etc.).

To run the Playwright tests:

cd examples/pf6-guide
npm test

The test suite compiles the app automatically before running.


Contributing

Issues and pull requests are welcome. If you find a bug, have a component request, or want to suggest an improvement, please open an issue.


Resources