UNPKG

html-squircle

Version:

Utilities for generating superellipse squircles in the form of SVG strings, to be used in clip-path and background inline styles.

14 lines 705 B
import { clipSquircleObj } from "../core/clipSquircle.js"; import type { RefObject } from "react"; import type { SquircleOptionsClipReact } from "../types.js"; /** * Pass a ref for the observed element and options for the squircle computation * function. * * Note this will NOT work properly if you apply the style to an element your * component manages which may leave the DOM without your component unmounting. * Apply it only to elements which will be rendered unconditionally with your * component. */ export declare const useClipSquircle: (ref: RefObject<Element | null>, options?: SquircleOptionsClipReact) => ReturnType<typeof clipSquircleObj>; //# sourceMappingURL=useClipSquircle.d.ts.map