Panel

Term.panel.Panel — Type
Panel

Renderable with a panel surrounding some content: ╭──────────╮ │ my panel │ ╰──────────╯

source
Term.panel.Panel — Method
Panel(renderables; kwargs...)

Panel constructor for creating a panel out of multiple renderables at once.

source
Term.panel.Panel — Method
Panel(
    content::RenderablesUnion;
    title::Union{Nothing,String} = nothing,
    title_style::Union{String,Nothing} = nothing,
    title_justify::Symbol = :left,
    subtitle::Union{String,Nothing} = nothing,
    subtitle_style::Union{String,Nothing} = nothing,
    subtitle_justify::Symbol = :left,
    style::Union{String,Nothing} = "default",
    box::Symbol = :ROUNDED,
    width::Int = 88,
    height::Union{Nothing,Int} = nothing,
    fit::Symbol=:nofit,
    justify = :left,
)

Panel constructor to fit a panel to a piece of (renderable) content.

title can be used to specify a title to be addded to the top row and title_style and title_justify set its appearance and position. Same for subtitle but for the panel's bottom row. box accepts one of the named Term.box.Box object and sets which box should be used.

width and height are used to set the Panel's size. If fit=true is passed the width and height arguments are ignored and the panel's box is fitted to the content's size justify (:left, :center, :right) defines how the content should be justified withing the panel. padding specifies the ammount of padding between the box and the content.

source
Term.panel.TextBox — Type
TextBox

Creates a Panel and fits input text to it. The pannel is hidden so that the result is just a text box.

source
Term.panel.TextBox — Method
TextBox(
    text::Union{Vector, AbstractString};
    width::Union{Nothing, Int}=nothing,
    title::Union{Nothing, String}=nothing,
    title_style::Union{String, Nothing}="default",
    title_justify::Symbol=:left,
    subtitle::Union{String, Nothing}=nothing,
    subtitle_style::Union{String, Nothing}="default",
    subtitle_justify::Symbol=:left,
    justify::Symbol=:left,
    fit::Symbol=:fit,
    )

Creates an hidden Panel with text in it.

If a width is passed, the input text is reshaped to have that size, unless fit=:truncate in which case it's cut to size. If no width is passed and fit=true the TextBox's size matches the size of the input text. Other arguments behave like Panel.

See also Panel.

source