Shape Hero
Bold geometric objects balance a playful studio introduction.
Make it yours.
Install the editable source and its dependencies into your React + Tailwind project.
Scroll horizontally for long lines
pnpm dlx shadcn@4.0.8 add http://localhost:3000/r/shape-hero.jsonUse it
Scroll horizontally for long lines
"use client";
import {ShapeHero} from '@/components/jez-ui/blocks/shape-hero';
export default function Example(){
return <><ShapeHero/></>;
}Props & types
Scroll horizontally for long lines
export type HeroProps = {
className?: string;
href?: string;
title?: React.ReactNode;
description?: React.ReactNode;
actionLabel?: React.ReactNode;
imageSrc?: string;
imageAlt?: string;
artwork?: { color?: string; speed?: number };
};
HeroPropsSource
View 3 source files
registry/blocks/shape-hero.tsx
Scroll horizontally for long lines
"use client";
import * as React from "react";
import { cn } from "../ui/utils";
import { HeroLink, type HeroProps } from "./hero-parts";
export function ShapeHero({
title,
actionLabel,
description,
className,
href = "/blocks",
}: HeroProps) {
return (
<section
className={cn(
"relative isolate overflow-hidden rounded-xl bg-[#f1eddc] text-[#27392c]",
className,
)}
>
<div className="grid md:grid-cols-2">
<div className="p-8 md:p-12">
<span className="font-display text-xl font-semibold">Playroom.</span>
<h1 className="mt-16 font-display text-5xl leading-none tracking-tight md:text-6xl">
{title ?? (
<>
Serious about
<br />
<span className="font-serif italic font-normal">playing.</span>
</>
)}
</h1>
<p className="my-7 max-w-xs text-sm leading-relaxed">
{description ?? (
<>
The best ideas start with a little curiosity. Tools and objects
for your next happy accident.
</>
)}
</p>
<HeroLink href={href}>{actionLabel ?? <>Make something</>}</HeroLink>
</div>
<div
aria-hidden="true"
className="grid min-h-80 grid-cols-2 gap-3 p-8 md:py-16"
>
<div className="aspect-square rounded-full bg-[#d76740]" />
<div className="aspect-square rounded-t-full bg-[#bec99c]" />
<div className="aspect-square rounded-br-full bg-[#e0b740]" />
<div className="grid aspect-square place-items-center rounded-full border-[28px] border-[#344b3b]">
<span className="size-8 rounded-full bg-[#d76740]" />
</div>
</div>
</div>
</section>
);
}
registry/ui/utils.ts
Scroll horizontally for long lines
import { clsx, type ClassValue } from "clsx";
import { twMerge } from "tailwind-merge";
export function cn(...values: ClassValue[]) {
return twMerge(clsx(values));
}
registry/blocks/hero-parts.tsx
Scroll horizontally for long lines
"use client";
import * as React from "react";
import { ArrowUpRight } from "lucide-react";
import { cn } from "../ui/utils";
export type HeroProps = {
className?: string;
href?: string;
title?: React.ReactNode;
description?: React.ReactNode;
actionLabel?: React.ReactNode;
imageSrc?: string;
imageAlt?: string;
artwork?: { color?: string; speed?: number };
};
export function HeroLink({
href = "/blocks",
children = "Explore the collection",
className,
}: {
href?: string;
children?: React.ReactNode;
className?: string;
}) {
return (
<a
href={href}
className={cn(
"inline-flex items-center gap-3 rounded-full border border-current/30 px-5 py-3 text-sm transition-colors hover:bg-current/10",
className,
)}
>
{children}
<ArrowUpRight size={16} />
</a>
);
}
Dependencies
clsx@2.1.1 · tailwind-merge@3.5.0 · lucide-react@0.577.0
Accessibility & behaviour
Provide meaningful labels and preserve keyboard focus styles. Check contrast when customising theme colours.
Read the accessibility and performance guide →