# `LineaUI.Docs`
[🔗](https://github.com/devaction-labs/linea_ui/blob/v0.1.1/lib/linea_ui/docs.ex#L1)

The installed components as data: their modules, docs, attrs and slots.

It reads what the compiler recorded (`__components__/0` and the docs chunk), so it always
describes the code that is running. `LineaUI.Skill` and documentation sites build on it.

    LineaUI.Docs.components()
    #=> [%{key: :accordion, module: LineaUI.Components.Accordion, summary: "...",
    #      moduledoc: "...", functions: [%{name: :accordion, doc: "...", attrs: [...],
    #      global: %{...}, slots: [...]}, ...]}, ...]

# `component`

```elixir
@type component() :: %{
  key: atom(),
  module: module(),
  summary: String.t(),
  moduledoc: String.t(),
  functions: [function_doc()]
}
```

# `function_doc`

```elixir
@type function_doc() :: %{
  name: atom(),
  doc: String.t(),
  attrs: [map()],
  global: map() | nil,
  slots: [map()]
}
```

# `component`

```elixir
@spec component(atom()) :: component() | nil
```

One component by key, or `nil`.

# `components`

```elixir
@spec components() :: [component()]
```

Every component with at least one public function, sorted by key.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
