radii function
The corner radii of an element in px as CSS draws them: top left, top right, bottom right, bottom left.
import { radii } from '@dioramajs/diorama/kit'. A % counts against the shorter side of the width × height box, and no corner takes more than half of that side, so 999px draws a pill.
function radii(
element: Element,
width: number,
height: number,
): [number, number, number, number]Parameters
| Name | Type | Description |
|---|---|---|
element | Element | |
width | number | |
height | number |
Also exported from @dioramajs/effects/kit.
Defined in packages/effects/src/kit.ts.