A2UIAgent.Builder.Basic (A2UIAgent v0.1.1)

Copy Markdown View Source

A function for each component of the basic catalog, named after it in snake case: text/1, text_field/1, date_time_input/1 and so on. Each one is A2UIAgent.Builder.component/2 with the component's name.

iex> import A2UIAgent.Builder.Basic
iex> text(text: "Hello", variant: "caption")
%A2UIAgent.Builder.Component{component: "Text", props: [{"text", "Hello"}, {"variant", "caption"}]}

The basic catalogs of protocol v0.9 and v1.0 have the same components; their properties differ a little. Pass the catalog you write for to A2UIAgent.Builder.flatten/2 (:catalog) to fill in its defaults and check each component against it.

Summary

Functions

audio_player(props \\ [])

(since 0.1.0)

A AudioPlayer component; see A2UIAgent.Builder.component/2.

button(props \\ [])

(since 0.1.0)

A Button component; see A2UIAgent.Builder.component/2.

card(props \\ [])

(since 0.1.0)

A Card component; see A2UIAgent.Builder.component/2.

check_box(props \\ [])

(since 0.1.0)

A CheckBox component; see A2UIAgent.Builder.component/2.

choice_picker(props \\ [])

(since 0.1.0)

A ChoicePicker component; see A2UIAgent.Builder.component/2.

column(props \\ [])

(since 0.1.0)

A Column component; see A2UIAgent.Builder.component/2.

components()

(since 0.1.0)
@spec components() :: [String.t()]

The names of the basic catalog's components, in catalog order.

date_time_input(props \\ [])

(since 0.1.0)

A DateTimeInput component; see A2UIAgent.Builder.component/2.

divider(props \\ [])

(since 0.1.0)

A Divider component; see A2UIAgent.Builder.component/2.

icon(props \\ [])

(since 0.1.0)

A Icon component; see A2UIAgent.Builder.component/2.

image(props \\ [])

(since 0.1.0)

A Image component; see A2UIAgent.Builder.component/2.

list(props \\ [])

(since 0.1.0)

A List component; see A2UIAgent.Builder.component/2.

modal(props \\ [])

(since 0.1.0)

A Modal component; see A2UIAgent.Builder.component/2.

row(props \\ [])

(since 0.1.0)

A Row component; see A2UIAgent.Builder.component/2.

slider(props \\ [])

(since 0.1.0)

A Slider component; see A2UIAgent.Builder.component/2.

tabs(props \\ [])

(since 0.1.0)

A Tabs component; see A2UIAgent.Builder.component/2.

text(props \\ [])

(since 0.1.0)

A Text component; see A2UIAgent.Builder.component/2.

text_field(props \\ [])

(since 0.1.0)

A TextField component; see A2UIAgent.Builder.component/2.

video(props \\ [])

(since 0.1.0)

A Video component; see A2UIAgent.Builder.component/2.