Skip to content
Composables

Composables

Behaviour without a shape. Where a component would decide how something looks, these decide only how it works — so two components can share one contract, and an app can build its own surface on the same guarantees.

The five

useGdTheme

The light/dark selector. Three states, not two — "system" follows the OS and is the default.

Open useGdTheme
useGdNotify

The notification queue. Raise a toast from anywhere; the tone decides whether it is transient or sticky.

Open useGdNotify
useGdAnchored

Hang a panel off a trigger in the top layer, so no ancestor's overflow can clip it and it flips when it must.

Open useGdAnchored
useGdSortable

Reorder a list by pointer and by keyboard, with the same result from both.

Open useGdSortable
useGdTabList

The WAI-ARIA tabs keyboard: arrows move, Home/End jump, Tab leaves the group.

Open useGdTabList

Why a composable and not a component

Each of these exists because the behaviour outlived the box it was first drawn in. useGdTabList is the clearest case: two skins — a tab strip and a stack of option cards — differ entirely in how they look and not at all in how they behave, and the behaviour is the subtle part. Two copies would agree on the day they were written and not much longer.

useGdNotify splits for a different reason: state that must outlive the surface that produced it. A panel holding its own error ref loses the error the moment the panel closes, which is precisely when a background failure matters most.

Navigate

Esc