> ## Documentation Index
> Fetch the complete documentation index at: https://luas.getconstant.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# Library

## Getting the Library

```lua lines theme={"dark"}
Menu.Library
```

## Notify

Returns a Notification class, containing it's renders.

```lua lines theme={"dark"}
Library:Notify(table?: Parameters)
```

<ParamField path="Parameters" type="table">
  A table containing the duration and text of the notification. E.g. `{ Time = 3, Text = "Hello, world!" }`
</ParamField>

## Card

Returns a Card class, containing it's renders, visibility and fade cache.

```luau lines theme={"dark"}
Library:Card(table?: Parameters)
```

<ParamField path="Parameters" type="table">
  A table containing render info for the Card.\
  \
  `instance?: Parent`\
  `UDim2?: Position`\
  `UDim2?: Size`\
  `boolean?: Draggable`\
  `boolean?: Invisible`\
  `string?: Text`\
  `boolean?: Fade`
</ParamField>

## Find

Returns the first Window within the Library from the given name and the Index it is cached at internally within the Windows cache.

```lua lines theme={"dark"}
local Window = Library:Find(Name)
```

<ParamField path="Name" type="string" required>
  The name of the Window.
</ParamField>

## Fade

Fades an Object for 0.25 seconds, fires the Object's fade callbacks and closes all of the Object's open content. Object must contain "Outline", this is required for fading to function and serves as the highest frame in the hierarchy.

```lua lines theme={"dark"}
Library:Fade(table: Object, boolean: Visible)
```

<CodeGroup>
  ```lua Fading a Window theme={"dark"}
  local Library = Menu.Library
  local Window = Library:Find("Theme")

  Library:Fade(Window, false) -- // Fades the Theme Window to become invisible
  ```

  ```lua Fading a Custom Object theme={"dark"}
  local Library = Menu.Library

  local Object = {
      IsVisible = false,
      IsFading = false,

      Cache = {}
  }

  local Outline = Menu.Draw("Frame", { Parent = Menu.Overlays[1], BackgroundColor3 = Color3.fromRGB(255, 0, 0), Size = UDim2.new(0, 500, 0, 450), AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.new(0.5, 0, 0.5, 0), BorderSizePixel = 0, Visible = false })

  Menu.Draw("Frame", { Parent = Outline, BackgroundColor3 = Color3.fromRGB(255, 255, 255), Size = UDim2.new(1, -2, 1, -2), Position = UDim2.new(0, 1, 0, 1), BorderSizePixel = 0 })

  Object["Outline"] = Outline

  Library:Fade(Object, false)
  Outline.Visible = false

  task.delay(0.25, function()
      Library:Fade(Object, true)
  end)

  -- // The above example uses a hacky way to fade the Object to become visible on create.
  -- // It fades it to false to store the current renders in the cache, forces the outline to be invisible (so you don't see it fading to false) and then fades it to true.
  ```
</CodeGroup>

<ParamField path="Object" type="table" required>
  The Object to fade.
</ParamField>

<ParamField path="Visible" type="boolean" required>
  The new Visibility to fade into.
</ParamField>
