Skip to content

Widgets

The Widgets component is a flexible container for content laid out as widgets. It’s a compound of Widgets.Root (the container) and Widgets.Item (each widget), with support for single- or two-column layouts, optional titles, and a “View more” link per widget.

Variations

Two-column layout

Set isTwoColumn on the root to flow widgets across two columns. It applies only when there is more than one item.

Each widget item can include a “View more” link. The link renders only when the item also has a title.

Widget table mode

isWidgetTable removes the default border and padding — useful when the widget holds a table or other content that brings its own styling.

Without title

Widget items can render without a title for simpler layouts.

Installation

import { Widgets } from "@harnessio/ui/components";
<Widgets.Root>
<Widgets.Item title="Widget Title">{/* Widget content */}</Widgets.Item>
</Widgets.Root>;