Size Property
Sets the size of a component. Supports predefined scale values and custom CSS sizes.import { Badge } from "@locus-ui/components";
<Badge size="md" variant="solid"> Medium</Badge>Examples
Size Scale
Thesize prop accepts values xs, sm, md, lg, and xl.
sizes.tsx
import { Badge } from "@locus-ui/components";
const sizes = ["xs", "sm", "md", "lg", "xl"];
return sizes.map((size) => ( <Badge key={size} size={size} variant="solid"> {size.toUpperCase()} </Badge>));Custom Size
Thesize prop also accepts custom CSS values.
custom-size.tsx
import { Badge } from "@locus-ui/components";
<Badge size="2.5rem" variant="solid"> Custom Size</Badge>