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

# Console

> A monospaced block for live log output or code.

<a href="https://www.sentivel.com/?ref=sirius-docs" target="_blank" rel="noopener noreferrer" className="sv-banner">
  <span className="sv-banner-mark" aria-hidden="true">
    <svg viewBox="0 0 194.08 236.31" fill="currentColor">
      <path fillRule="evenodd" clipRule="evenodd" d="M181.21,89.15L137.69,99.7l21.82-14.53c15.69-10.45,26.19-27.08,28.88-45.73L194.08,0l0,0c-18.79,13.86-40.77,22.76-63.91,25.86L72.27,33.6c-23.32,3.12-44.43,16.31-56.32,36.62C6.1,87.06,2.64,107.65,7.91,128.02l1.04,4.01l48.67,5.2l0,0C30.7,143.2,10.28,165.2,6.34,192.49L0,236.31l0,0c28.49-17.35,60.53-28.03,93.73-31.26l25.54-2.48c29.96-2.91,56.12-22.72,65.53-51.32c4.42-13.44,5.16-28.26,1.36-42.96L181.21,89.15z M115.85,143l-23.2,6.02c-8.99,2.31-18.13-3.06-20.47-12.05l-5.99-23.2c-2.34-8.99,3.06-18.16,12.03-20.47l23.22-6.02c8.97-2.31,18.13,3.08,20.47,12.05l5.99,23.22C130.24,131.52,124.84,140.69,115.85,143z" />
    </svg>
  </span>

  <span className="sv-banner-copy">
    <span className="sv-banner-title">
      Sentivel
      <span className="sv-banner-badge">Endorsed by Rayfield</span>
    </span>

    <span className="sv-banner-sub">Status pages and uptime monitoring for whatever you ship. Free to start.</span>
  </span>

  <span className="sv-banner-cta">
    Take a look
    <span className="sv-banner-arrow" aria-hidden="true">→</span>
  </span>
</a>

<Note>
  Preview only. This is on the [preview channel](/rayfield-gen2/preview) and is not in the stable release. It can change or be dropped before it lands there.
</Note>

A console shows monospaced text. It holds the height you give it and scrolls inside itself, so a console that fills up never pushes the rest of the page down.

```lua theme={null}
tab:CreateConsole({
    name = "Example",
    text = [[print("Hello world")]],
})
```

Set `follow` to make it a console: new lines pin it to the bottom, and once the buffer is full the oldest line rolls off the top.

```lua theme={null}
local console = tab:CreateConsole({
    name = "Console",
    height = 130,
    follow = true,
    maxLines = 200,
})

console:Append("player joined")
```

## Properties

<ResponseField name="name" type="string">
  A label above the block. Optional; without one the block is just the panel.
</ResponseField>

<ResponseField name="description" type="string">
  Hint text under the block. Optional.
</ResponseField>

<ResponseField name="text" type="string" default="&#x22;&#x22;">
  The initial body. `code` also works.
</ResponseField>

<ResponseField name="height" type="number" default="120">
  How tall the panel stands, in pixels. Floors at 48.
</ResponseField>

<ResponseField name="follow" type="boolean" default="false">
  Jump to the newest line on `Append`, the way a console does.
</ResponseField>

<ResponseField name="maxLines" type="number" default="200">
  How many lines to keep. Past this the oldest roll off the top.
</ResponseField>

## Handle

<ResponseField name="Set(text)">
  Replace the whole body.
</ResponseField>

<ResponseField name="Append(line)">
  Add a line to the end. Multi-line strings are split, so the line cap still counts properly.
</ResponseField>

<ResponseField name="Clear()">
  Empty it.
</ResponseField>

<ResponseField name="Get()" type="string">
  The lines currently held, oldest first, joined by newlines.
</ResponseField>

<ResponseField name="Copy()" type="boolean">
  Put the body on the clipboard. Returns `false` where the executor provides no `setclipboard`.
</ResponseField>

<ResponseField name="SetHeight(height)">
  Change how tall the panel stands.
</ResponseField>
