UNPKG

squircler

Version:

� The MOST PERFECT React squircle component ever created. Zero ovals, infinite possibilities.

31 lines (29 loc) 1.13 kB
import { CSSProperties, ReactNode } from 'react'; export interface SquircleProps extends React.HTMLAttributes<HTMLElement> { /** Border radius percentage (0-50, where 50 = circle) */ borderRadius?: number; /** Tension/smoothness factor (0-1, affects how rounded the corners are) */ tension?: number; /** Width in pixels */ width?: number | string; /** Height in pixels */ height?: number | string; /** HTML element to render as */ as?: keyof JSX.IntrinsicElements; /** Whether to stretch to fill parent container */ stretch?: boolean; /** Squircle border width in pixels */ squircleBorder?: number; /** Squircle border color */ squircleBorderColor?: string; /** Content to render inside the squircle */ children?: ReactNode; /** Custom CSS styles */ style?: CSSProperties; /** CSS class name */ className?: string; } /** * Squircle component - renders content with true squircle shapes using SVG */ export declare const Squircle: import('react').ForwardRefExoticComponent<SquircleProps & import('react').RefAttributes<HTMLDivElement>>;