byDefaultHuman
Primitives

RoughRect

Hand-drawn rectangle primitive for borders and containers.

Primitive container

Installation

package manager
npx shadcn add https://bydefaulthuman.fun/r/rough-rect.json

Props

PropTypeDefaultDescription
animateOnHover
boolean
—
Redraws on hover.
children
ReactNode
—
Content rendered inside the component.
className
string
—
Additional Tailwind classes applied to the component.
fill
string
—
Overrides the fill color.
id
string
—
Controls the `id` behavior.
onClick
() => void
—
Controls the `onClick` behavior.
padding
number
—
Adds padding around the content.
rounded
boolean
—
Controls the `rounded` behavior.
stroke
string
—
Overrides the stroke color.
style
CSSProperties
—
Inline styles applied to the wrapper.
theme
CrumbleTheme
—
Overrides the global Crumble theme for this instance.

Accessibility

This primitive is primarily presentational. Keep the underlying content semantic and avoid relying on the sketch overlay alone to communicate meaning.

Examples

import { RoughRect } from "@/components/crumble/primitives/rough-rect";

<RoughRect padding={20}>Primitive container</RoughRect>;