Skip to content

You are viewing documentation for Instruqt 2.0 Labs - our upcoming product releasing in September 2026. For current Tracks documentation, please visitdocs.instruqt.com.

Layout


Defined inlayouts.hcl

The layout resource defines the visual structure of the lab UI through columns and rows. Layouts organize how tabs (terminal, service, editor, etc.) and instructions are displayed to users.

As a lab author, you use layouts to create optimal learning interfaces:

  • Content Organization: Structure the lab interface to present instructions alongside relevant tools and terminals in a logical arrangement
  • Multi-Tool Scenarios: Create layouts that support complex scenarios requiring multiple terminals, editors, or service interfaces simultaneously
  • Screen Real Estate Management: Optimize the use of available screen space to maximize both instruction visibility and hands-on tool access

Layouts ensure that the lab interface supports rather than hinders the learning experience by presenting information and tools effectively.

resource "layout" "name" {
column {
instructions {}
}
column {
tab "terminal" {
target = resource.terminal.main
}
}
}
resource "layout" "name" {
column {
width = "percentage"
tab "name" {
target = resource.type.name
title = "Display Title"
active = true
visible = true
closeable = false
movable = false
}
instructions {
title = "Instructions"
active = false
}
row {
height = "percentage"
# nested content
}
}
}

Fields

FieldTypeRequiredDescription
columnblockTop-level columns in the layoutrepeatable

Column

layoutColumn

Top-level columns in the layout

FieldTypeRequiredDescription
widthstringColumn width (e.g., '50%', '300px')
tabblockTabs within this columnrepeatable
instructionsblockInstructions panel within this column
rowblockRows nested within this columnrepeatable

Tab

layoutColumnTab

Tabs within this column

FieldTypeRequiredDescription
sluglabelThe slug identifier for the tab
titlestringDisplay title for the tab
targetreferenceterminal, service, editor, note, virtual_browser, external_website, cloud_credentialsReference to the target resource
activeboolWhether the tab is active by default
visibleboolWhether the tab is visible
closeableboolWhether the tab can be closed
movableboolWhether the tab can be moved

Instructions

layoutColumnInstructions

Instructions panel within this column

FieldTypeRequiredDescription
titlestringTitle for the instructions panel
activeboolWhether the instructions panel is active
visibleboolWhether the instructions panel is visible
closeableboolWhether the instructions panel can be closed
movableboolWhether the instructions panel can be moved

Row

layoutColumnRow

Rows nested within this column

FieldTypeRequiredDescription
heightstringRow height (e.g., '50%', '400px')
tabblockTabs within this rowrepeatable
instructionsblockInstructions panel within this row
columnblockColumns nested within this row (3rd level)repeatable
Tab

layoutColumnRowTab

Tabs within this row

FieldTypeRequiredDescription
sluglabelThe slug identifier for the tab
titlestringDisplay title for the tab
targetreferenceterminal, service, editor, note, virtual_browser, external_website, cloud_credentialsReference to the target resource
activeboolWhether the tab is active by default
visibleboolWhether the tab is visible
closeableboolWhether the tab can be closed
movableboolWhether the tab can be moved
Instructions

layoutColumnRowInstructions

Instructions panel within this row

FieldTypeRequiredDescription
titlestringTitle for the instructions panel
activeboolWhether the instructions panel is active
visibleboolWhether the instructions panel is visible
closeableboolWhether the instructions panel can be closed
movableboolWhether the instructions panel can be moved
Column

layoutColumnRowColumn

Columns nested within this row (3rd level)

FieldTypeRequiredDescription
widthstringColumn width (e.g., '50%', '300px')
tabblockTabs within this nested columnrepeatable
instructionsblockInstructions panel within this nested column
Tab

layoutColumnRowColumnTab

Tabs within this nested column

FieldTypeRequiredDescription
sluglabelThe slug identifier for the tab
titlestringDisplay title for the tab
targetreferenceterminal, service, editor, note, virtual_browser, external_website, cloud_credentialsReference to the target resource
activeboolWhether the tab is active by default
visibleboolWhether the tab is visible
closeableboolWhether the tab can be closed
movableboolWhether the tab can be moved
Instructions

layoutColumnRowColumnInstructions

Instructions panel within this nested column

FieldTypeRequiredDescription
titlestringTitle for the instructions panel
activeboolWhether the instructions panel is active
visibleboolWhether the instructions panel is visible
closeableboolWhether the instructions panel can be closed
movableboolWhether the instructions panel can be moved

The layout resource uses a hierarchical structure:

  • Columns: Vertical divisions of the layout
  • Rows: Horizontal divisions within columns
  • Tabs: Content panels that reference other resources
  • Instructions: Special panel for lab instructions

layout → column

A column is a vertical panel within the layout. Columns do not have names or IDs - they are anonymous blocks.

Field Required Type Description
width string Width of the column as a percentage (e.g., “50”, “33”). Defaults to equal distribution.
tab block Tab blocks defining content panels
instructions block Instructions panel configuration
row block Nested row blocks for further subdivision

layoutcolumn → row

A row is a horizontal panel within a column. Like columns, rows are anonymous blocks without names or IDs.

Field Required Type Description
height string Height of the row as a percentage. Defaults to equal distribution.
tab block Tab blocks defining content panels
instructions block Instructions panel configuration
column block Nested column blocks for further subdivision

layout → tab

Tabs define the actual content panels within the layout. Each tab must have a name (used as a label) and references a resource.

Field Required Type Description
name label The identifier for the tab (becomes the label)
title string Display title for the tab. Defaults to capitalized name.
target reference to terminal, service, editor, external_website, note, cloud_credentials Reference to the resource to display
active bool Whether the tab is initially active. Defaults to false.
visible bool Whether the tab is visible. Defaults to true.
closeable bool Whether users can close the tab. Defaults to false.
movable bool Whether users can move the tab. Defaults to false.
Resource TypeDescriptionReference
terminalInteractive command-line interfaceTerminal
serviceWeb applications and servicesService
editorCode editing environmentEditor
external_websiteExternal website integrationExternal Website
noteReference materials and documentationNote
cloud_credentialsCloud provider credentials displayCloud Credentials

layout → instructions

The instructions block configures the special instructions panel.

Field Required Type Description
title string Title of the instructions tab. Defaults to “Instructions”.
active bool Whether the tab is initially active. Defaults to false.
visible bool Whether the tab is visible. Defaults to true.
closeable bool Whether users can close the tab. Defaults to false.
movable bool Whether users can move the tab. Defaults to false.
resource "layout" "two_column" {
column {
width = "50"
instructions {}
}
column {
width = "50"
tab "terminal" {
target = resource.terminal.main
}
}
}
resource "layout" "complex" {
column {
width = "40"
instructions {}
}
column {
width = "60"
row {
height = "70"
tab "terminal" {
target = resource.terminal.main
active = true
}
tab "editor" {
target = resource.editor.code
}
}
row {
height = "30"
tab "service" {
target = resource.service.web
}
}
}
}
resource "layout" "three_column" {
column {
width = "25"
instructions {}
}
column {
width = "50"
tab "terminal" {
target = resource.terminal.main
active = true
}
tab "terminal2" {
target = resource.terminal.secondary
}
}
column {
width = "25"
tab "notes" {
target = resource.note.hints
}
}
}
resource "layout" "nested" {
column {
width = "30"
row {
height = "50"
instructions {}
}
row {
height = "50"
tab "notes" {
target = resource.note.hints
}
}
}
column {
width = "70"
row {
height = "60"
column {
width = "60"
tab "terminal" {
target = resource.terminal.main
}
}
column {
width = "40"
tab "editor" {
target = resource.editor.config
}
}
}
row {
height = "40"
tab "service" {
target = resource.service.app
}
}
}
}

Breaking Change: The layout format has changed significantly from earlier versions:

  • Old format: Layout resources defined columns with IDs, tabs were configured separately in the lab resource referencing these column IDs
  • New format: Layout resources define columns with tabs inline, no separate tab configuration needed

If migrating from the old format:

layouts.hcl
## OLD (no longer valid)
resource "layout" "two_column" {
column "terminal" {}
column "instructions" {
width = "33"
}
}
# main.hcl
resource "lab" "example" {
layout "two_column" {
reference = resource.layout.two_column
tab "terminal" {
panel = "terminal" # References column ID
target = resource.terminal.shell
}
instructions {
panel = "instructions" # References column ID
}
}
}
## NEW (current format)
resource "layout" "two_column" {
column {
tab "terminal" {
target = resource.terminal.shell
}
}
column {
width = "33"
tab "instructions" {
type = "instructions"
}
}
}
resource "lab" "example" {
layout = resource.layout.two_column
}
  1. Start Simple: Begin with a two-column layout (instructions + terminal)
  2. Responsive Design: Consider how your layout will appear on different screen sizes
  3. Tab Organization: Group related tabs in the same column/row
  4. Active Tabs: Set one tab per column/row as active for better UX
  5. Avoid Deep Nesting: Limit nesting to 2-3 levels for maintainability