> For the complete documentation index, see [llms.txt](https://brady-xyz.gitbook.io/maclib-ui-library/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://brady-xyz.gitbook.io/maclib-ui-library/information/documentation-formatting.md).

# Documentation Formatting

***

Each argument is listed with its name followed by its type in angle brackets (`<>`), indicating the kind of data it expects.

**Example:**

```lua
Title <string>
```

**Use case example:**

```lua
Title = "Kuzu Hub"
```

***

A `...` before a `<table>` type means the function can take multiple arguments in a variable-length table.

**Example:**

```lua
Tree <...table: FruitName, FruitColor> -- Accepts multiple Fruit definitions, each as a table with a Name and Color.
```

**Use case example:**

```lua
Tree = {
    {
        FruitName = "Apple"
        FruitColor = Color3.fromRGB(255,0,0)
    },
    {
        FruitName = "Orange"
        FruitColor = Color3.fromRGB(255,165,0)
    }
}
```

***

A colon (`:`) inside a type means those are the arguments that the type expects.

**Example:**

```lua
PrintWhat <string: "Hello, World!", "Goodbye, world."> -- Expects one of the two strings.
```

**Use case example:**

```lua
PrintWhat = "Hello, World!" -- Is expected (Accepted)
--
PrintWhat = "Goodbye, world." -- Is expected (Accepted)
--
PrintWhat = "Lorem Ipsum" -- Not expected (Rejected)
```

***

A `():` after a function type indicates the return type.

**Example:**

```lua
Callback <function(): string> -- The function returns a string when called.
```

**Use case example:**

```lua
Callback = function(Input)
    print(Input)
end)
```

***

A `(): void` after a function type indicates it does not return anything.

**Example:**

```lua
Callback <function(): void> -- The function returns nothing when called.
```

**Use case example:**

```lua
Callback = function()
    print("Hello, World!")
end)
```

***

`<type or type>` means the argument can accept either type.

**Example:**

```lua
Default <number or table> -- Accepts either a number or a table as the default value.
```

**Use case example:**

```lua
Default = 5 -- Accepted
--
Default = {"Hello", "World"} -- Accepted
--
Default = true -- Rejected (not a number or table)
```

***

A `:` followed by a type indicates a return value and its type.

**Example:**

```lua
:GetFruitSize(<string>: number) -- Returns the size of the specified fruit.
:GetState(: boolean) -- Returns whether the window is currently visible or not.
```

**Use case example:**

```lua
:GetFruitSize("Apple") -- Returns the size as a number of an apple
--
:GetState() -- Returns the state as a boolean
```

***
