register_layout: Register an experimental custom container layout

View source: R/layout.R

register_layoutR Documentation

Register an experimental custom container layout

Description

A registered name can be used as layout in style(). Custom names start with custom_ to keep built-in names reserved.

Usage

register_layout(name, arrange, measure, replace = FALSE)

Arguments

name

A unique custom_ name.

arrange

⁠function(children, inner, parent_style)⁠ returning one region() per child.

measure

⁠function(children, parent_style)⁠ returning width() and height(width) functions.

replace

Replace an existing registration of name? Packages that register in .onLoad() can pass TRUE so that reloading them works. Built-in layouts can never be replaced (their names do not start with custom_).

Value

The registered name, invisibly.


termr documentation built on Oct. 21, 2026, 5:13 p.m.