# Widgets This page covers the small views: a label, a button, the inputs that need more than the [table of fields](building-views.md#forms-and-their-fields), and the views that show a result. The larger views have sections of their own: [tables](tables.md#a-table-of-records), [charts](charts.md), [maps](maps.md), [dialogs](organizing-the-window.md#dialogs), and the views that organize the window, from [pages](organizing-the-window.md#pages) to the [sidebar](organizing-the-window.md#sidebar). The [widget catalog](../widgets.md) lists every view. ## Label A `LabelView` shows a line of read-only `text`, for example a caption or a result. Code sets the text. The user can't edit it. ```python from composeui.core.view import LabelView, child summary: LabelView = child(LabelView, text="No pipe yet") ``` Qt shows a `QLabel`, Textual a `Label`, and the web a line of text. For several lines with headings and links, use a [Markdown view](#markdown). ## Buttons A `ButtonView` is a button that the user clicks (`clicked`), for example under a form to submit it. `text` names it. Its `variant` (`ButtonVariant`) tells the actions apart: - **`PRIMARY`,** the default, is the main action of the page, for example to submit its form. - **`SECONDARY`** is an action beside the main one. - **`DANGER`** is an action that destroys something, for example to remove rows. In a [`HorizontalView`](building-views.md#lay-out-views), a button keeps the width of its text. Qt shows a `QPushButton`: a primary button is the default button, and a danger button has red text. Textual and the web color the button by its variant. ## Help on a form row The `help` of a labelled row says what to enter. A "?" button beside the label shows it. A click, a tap, or the keyboard opens it. Textual shows the help as a hint under the label. ## Text area A `TextAreaView` takes several lines of text, for example a comment. Its `text` holds the lines, separated by `"\n"`. In a form, use `LabelRowTextAreaView`. - Enter starts a new line. The field emits `editing_finished` when it loses the focus after a change. - Tab goes to the next field, and does not go into the text. - Qt shows a `QPlainTextEdit`, Textual a `TextArea`, and the web a `