# Overview

Choose a primitive, layout helper, or drawing API, then configure its view-specific and shared modifiers.

<a id="authoring"></a>

## Construct, configure, compose

Import `refract::prelude::*` to use constructors and `ViewExt`. Each component page documents its construction inputs, behavior, and relevant methods. Dimensions, paint, labels, and disabled state preserve the concrete builder type; structural modifiers such as `padding` and `frame` wrap the resulting view.

See [View Modifiers](/docs/view-modifiers) for the shared API. Read [Views](/docs/views) for reactive composition and mounted identity.

<a id="primitives"></a>

## Primitives

Basic boxes, content, and input: `view()` supplies the generic box, `text` and `image` display content, and `field` edits a bound string. Use `fragment` to group views without adding a host element. Add `.on_press()` to compose actions from views.

| View | Purpose |
| --- | --- |
| [view](/docs/view) | Create a basic box for styling, semantics, or interaction. |
| [text](/docs/text) | Display a string with typography, wrapping, and semantic labels. |
| [image](/docs/image) | Display an image from a URL, file path, or embedded asset. |
| [field](/docs/field) | Edit a single-line or multiline string through a binding. |
| [fragment](/docs/fragment) | Group a sequence of views without adding a host element. |

<a id="layout"></a>

## Layout

Boxes configured to arrange children, consume available space, or provide a scrolling viewport.

| View | Purpose |
| --- | --- |
| [stack](/docs/stack) | Arrange children with a configurable horizontal or vertical direction. |
| [h_stack](/docs/h-stack) | Arrange children horizontally with spacing and alignment. |
| [v_stack](/docs/v-stack) | Arrange children vertically with spacing and alignment. |
| [z_stack](/docs/z-stack) | Layer children in shared bounds. |
| [spacer](/docs/spacer) | Consume remaining space inside a row or column. |
| [scroll_view](/docs/scroll-view) | Place content in a viewport with initial positioning, following, and scroll observation. |

<a id="drawing"></a>

## Drawing

Use `shape` for filled or stroked geometry, `canvas` / `canvas_with` for vector drawing, `shader` / `shader_with` for application-owned WGSL, and `Path` to construct reusable geometry.

| View | Purpose |
| --- | --- |
| [canvas](/docs/canvas-reference) | Draw paths and effects in one portable layout and event target. |
| [canvas_with](/docs/canvas-with) | Prepare tracked inputs independently, then draw from their committed snapshot. |
| [shader](/docs/shader) | Display a bound WGSL program in one portable layout and event target. |
| [shader_with](/docs/shader-with) | Prepare tracked shader inputs independently, then render their committed snapshot. |
| [shape](/docs/shape) | Fill or stroke built-in geometry, an existing path, or your own Shape implementation. |
| [Circle](/docs/circle) | Draw the largest circle centered inside the supplied bounds. |
| [Ellipse](/docs/ellipse) | Draw an ellipse that fills the supplied bounds. |
| [Rectangle](/docs/rectangle) | Draw a closed rectangle that fills the supplied bounds. |
| [Path](/docs/path) | Construct shared vector paths in local logical pixels. |
