How to use Coolshapes components
mainCoolshapes provides two ways to render shapes: using a single Global component or using Category-specific components.
1. Global Component
Import the Coolshape component and specify the type (category) and index (specific shape within that category).
2. Category Components
Import specific components for a category (e.g., Star, Ellipse) and pass an index to select a specific shape within that category.
// Global component example
import { Coolshape } from "coolshapes-react";
const App = () => {
return <Coolshape type="star" index={1} size={48} noise={true} />;
};
// Category component example
import { Star } from "coolshapes-react";
const App = () => {
return <Star index={1} size={48} />;
};