Shape
Data displayA shared catalogue of 36 SVG silhouettes, with 12 original contours that morph smoothly between shapes.
Try it
Add to your project
npx shadcn@latest add https://luv-jeri.github.io/cojeev-ui/r/shape.jsonThe command includes the component’s shared dependencies. Your project keeps editable source files.
Include the complete example
This example also composes button, typography. Install its parts together:
npx shadcn@latest add https://luv-jeri.github.io/cojeev-ui/r/button.json https://luv-jeri.github.io/cojeev-ui/r/shape.json https://luv-jeri.github.io/cojeev-ui/r/typography.jsonUsing shape
Use Shape with a name from shapeNames for a static mask. Size it through className or style and set its fill with the --c custom property.
Use ShapeMorph with a name from signatureShapeNames for an animated contour. Change name to morph from the visible shape; choose fill or outline and set color through ordinary SVG styles.
Use the shared silhouettes for card accents, empty states and dividers. Motion Off, reduced motion and offscreen rendering settle to a static shape.
API
Compose the exported parts below. The prop types are read from the React source during the registry build.
Native element or underlying primitive props are inherited where declared, including accessible labels, event handlers and refs.
ShapeProps
| Prop | Type | Required |
|---|---|---|
name | string | No |
as | React.ElementType | No |
ShapeMorphProps
| Prop | Type | Required |
|---|---|---|
name | SignatureShapeName | No |
variant | "fill" | "outline" | No |
labelOmit for a decorative shape; supply when the graphic carries meaning. | string | No |
Accessibility
Shapes are decorative by default. Give ShapeMorph a label only when the graphic conveys meaning; keep descriptive text beside decorative accents.
States and appearance
For conditional content, keep a MotionPresence boundary around keyed MotionSurface children. The shared entrance and exit states work with native primitives and respect your motion preference.
Try pointer and keyboard interaction, and switch the appearance control in the navigation to compare light and dark mode. Motion respects reduced motion preferences.