# `OpenUI.Library.DSL`
[🔗](https://github.com/ideia4it/openui/blob/v0.1.1/lib/openui/library/dsl.ex#L1)

The macros of `use OpenUI.Library`: `component/2`, `function/2`,
`action/2` and `group/3`. See `OpenUI.Library` for an example.

The library is built and checked when the module compiles: a catalog that
breaks the rules of prompt.md, section 3.1, does not compile.

# `action`
*macro* 

Defines a custom action, delivered to the host when it runs: `description:` and `params:`.

# `component`
*macro* 

Defines a component: `description:` and `props:`, a keyword list of `name: [type: ..., required: ..., default: ...]` in positional order.

# `function`
*macro* 

Defines a custom function: `description:`, `params:`, `returns:` and
`impl:`, a remote capture such as `&MyApp.Formulas.percent/1` that receives
one map keyed by the param names.

# `group`
*macro* 

Groups components under a title in the prompt, with optional `notes:`.

---

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