konstantin-paulus 8a1313b777 Refactor clip path handling and enhance SVG support
- Updated the handling of clip paths in various components, replacing references to `isClipPath` with `isClipShape` for consistency.
- Enhanced the `ClipPathsSettings` component to correctly select and manage clip path shapes.
- Added support for `<mask>` and `<clipPath>` elements in the documentation, clarifying their usage and properties.
- Improved the handling of ambiguous SVG tags by including `<mask>` and `<clipPath>` in the relevant sets.
- Introduced a new `clip-path.tsx` file to manage clip path functionalities, ensuring better organization and maintainability of the codebase.
2026-10-11 11:47:17 +02:00

1.0 KiB
Raw Permalink Blame History

<rect>

A rectangle. Takes paint children, plus <stroke>, <shadow>, <effect>, <clipPath>, <mask>, <animation> and <keyframeTrack>; use cornerRadius for rounded corners.

<rect x={40} y={40} width={640} height={360} cornerRadius={24} fill="#FF0055" />

Props

All common props, plus:

Prop Type Default Meaning
fill string none Any CSS color; alpha is ignored (use opacity). Shorthand for a solid paint child, drawn beneath any paint children.

A rect with neither fill nor a paint child draws nothing; it is still a box: it carries children, its clip paths and masks still cut them, and it takes up its place in the timeline. Without width/height a rect is 100×100.

Clip paths and masks

A rect can be cut by a <clipPath> or <mask> child, and a rect under one is what that clip path or mask cuts by.