howdy/ui/registry

The catalogue of everything gleam run -m howdy/ui add can copy into a project: components, blocks built from them, and theme presets.

An entry names its module; everything else is read from the module’s source. Its description is the first line of its documentation, and it depends on the entries whose modules it imports, so the catalogue never drifts from the code. gleam run -m howdy/ui registry publishes it as JSON, with an llms.txt index, for other tools and custom registries.

Types

pub type Entry {
  Entry(
    name: String,
    kind: Kind,
    category: String,
    module: String,
  )
}

Constructors

  • Entry(name: String, kind: Kind, category: String, module: String)
pub type Kind {
  Component
  Block
  ThemePreset
}

Constructors

  • Component

    A component module. It depends on howdy/ui/style, tokens, howdy/ui/words and, for a few, other components, which copying it copies too.

  • Block

    A screen or card composed of components. Copying one copies the components it uses and points its imports at the copies.

  • ThemePreset

    Light and dark themes, ready to pass to page.themes.

Values

pub fn dependencies(source: String) -> List(String)

The entries a module’s source imports, in the order it imports them.

pub fn description(source: String) -> String

The first paragraph of a module’s documentation.

pub fn entries() -> List(Entry)

Every entry, in the order list shows them.

pub fn find(name: String) -> Result(Entry, Nil)
pub fn kind_name(kind: Kind) -> String
pub fn packages(source: String) -> List(String)

The Gleam packages a module’s source imports directly, beyond the standard library and howdy_ui itself.

pub fn summary(description: String) -> String

The first sentence of a description, for a one-line listing.

✨ Search Document