Split Hero
Editorial split layout over Horizon Beam — oversized type left, meta and CTAs right.
shinUI · studio drop
Build the part nobody else has.
Original blocks and backgrounds, tuned in the gallery, then shipped as registry installs or an npm package.
Format
Registry + npm
Usage
Drop the file into your project, along with the shared files listed below, and import it.
import { SplitHero } from "@/registry/blocks/split-hero";
export function Example() {
return <SplitHero />;
}Install prerequisites
Every component here relies only on Tailwind and the cn helper from shadcn/ui.
npm i clsx tailwind-mergeAlso copy these files
Split Hero imports these files. Keep the same paths, or update the imports to match.
'use client'
import type { ComponentProps } from 'react'
import { cn } from '@/lib/utils'
const variants = {
primary:
'bg-ds-primary text-ds-primary-foreground shadow-[0_0_0_1px_rgb(255_255_255/0.12)_inset,0_8px_24px_-8px_var(--ds-primary)] hover:bg-ds-primary-hover',
secondary: 'border border-border bg-ds-surface text-foreground hover:bg-ds-surface-hover',
ghost: 'text-foreground hover:bg-ds-surface',
} as const
const sizes = {
sm: 'h-8 gap-1.5 rounded-sm px-3 text-xs',
md: 'h-10 gap-2 rounded-md px-4 text-sm',
lg: 'h-12 gap-2.5 rounded-lg px-6 text-base',
} as const
export interface ButtonProps extends ComponentProps<'button'> {
variant?: keyof typeof variants
size?: keyof typeof sizes
}
export function Button({ className, variant = 'primary', size = 'md', type = 'button', ...props }: ButtonProps) {
return (
<button
type={type}
className={cn(
'inline-flex shrink-0 cursor-pointer items-center justify-center font-medium whitespace-nowrap transition-all duration-150 select-none',
'focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background focus-visible:outline-none',
'active:scale-[0.97] disabled:pointer-events-none disabled:opacity-50',
variants[variant],
sizes[size],
className,
)}
{...props}
/>
)
}
"use client";
import type { ComponentProps, CSSProperties } from "react";
import { cn } from "@/lib/utils";
/** Keyframes ship with the component; React 19 hoists this <style> once. */
const HORIZON_CSS = `
@keyframes ds-horizon {
0%, 100% { transform: translateX(-6%) scaleX(1); opacity: 0.55; }
50% { transform: translateX(6%) scaleX(1.08); opacity: 1; }
}
.ds-horizon-beam { animation: ds-horizon 9s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .ds-horizon-beam { animation: none; } }
`;
export interface HorizonBeamProps extends ComponentProps<"div"> {
/** Beam color. */
color?: string;
/** Vertical position of the horizon line (0 to 100). */
altitude?: number;
/** Beam thickness feel. */
thickness?: "thin" | "medium" | "wide";
/** Seconds for one breath cycle. */
speed?: number;
}
const thicknessMap = {
thin: "h-px",
medium: "h-0.5",
wide: "h-1",
} as const;
/** A breathing light beam on a horizon: spare, graphic, Edge-safe. */
export function HorizonBeam({
className,
children,
color = "var(--ds-accent, oklch(0.66 0.13 205))",
altitude = 58,
thickness = "medium",
speed = 9,
...props
}: HorizonBeamProps) {
const y = Math.min(90, Math.max(10, altitude));
const glow: CSSProperties = {
background: `linear-gradient(90deg, transparent 0%, ${color} 35%, ${color} 65%, transparent 100%)`,
boxShadow: `0 0 48px 4px color-mix(in oklab, ${color} 55%, transparent), 0 0 120px 20px color-mix(in oklab, ${color} 22%, transparent)`,
animationDuration: `${speed}s`,
};
const sky: CSSProperties = {
background: `linear-gradient(180deg, var(--color-background) 0%, color-mix(in oklab, ${color} 12%, var(--color-background)) ${y}%, var(--color-background) 100%)`,
};
return (
<div className={cn("relative isolate overflow-hidden bg-background", className)} {...props}>
<style href="ds-horizon-beam" precedence="default">
{HORIZON_CSS}
</style>
<div aria-hidden className="pointer-events-none absolute inset-0 -z-10">
<div className="absolute inset-0" style={sky} />
<div
className={cn("ds-horizon-beam absolute left-[-10%] w-[120%]", thicknessMap[thickness])}
style={{ top: `${y}%`, ...glow }}
/>
<div
className="absolute inset-x-0 bottom-0 h-1/2 opacity-40"
style={{
background: `linear-gradient(180deg, transparent, color-mix(in oklab, ${color} 8%, transparent))`,
maskImage: "linear-gradient(90deg, transparent, black 20%, black 80%, transparent)",
}}
/>
</div>
{children}
</div>
);
}
More in Blocks
Bento Grid
A responsive bento layout that collapses to a single column on mobile, with per-card column and row spans and a hover glow that scales from the corner.
Timeline
A vertical timeline with a brand dot per milestone and a left rule — enough structure for changelogs, roadmaps and onboarding steps.
ASCII Footer
The brand set in monospace characters that shimmer in a slow wave and scramble under the cursor, or an ASCII sunset sea.