functions

RectangleOutline
Edited: Sunday 25 January 2026

RectangleOutline

Category: Molecules
File: molecules.go
Package: ui

Signature

1func RectangleOutline(width, height int, stroke color.NRGBA, strokeWidth float32) W

Description

RectangleOutline renders a rectangle outline with specified dimensions, color, and stroke width.
Creates a hollow rectangular border without filling the interior.

Example:

rect := RectangleOutline(100, 50, color.NRGBA{R: 255, A: 255}, 1.5)  // Red outlined box

Useful for creating focus indicators, selection boxes, or decorative borders.

Examples

RectangleOutline

1{
2	rect := RectangleOutline(100, 50, ORANGE_500, 1.5)
3	_ = rect
4}

Example Output


This documentation is auto-generated. To update, run make docs

Backlinks