Grid · Full page
A full page stacked from the grid blocks (nav, hero, strip, features, steps, footer) in three presets.
01New / grid blocks
Build pages that line up on purpose
Hairline frames, crosshair joints and monospace details. Original blocks you can copy, tweak and ship in an afternoon.
$ npx shadcn add shinui/grid-hero
[ok] resolved grid-frame
[ok] wrote components/shinui/grid-hero.tsx
[ok] tokens linked (light + dark)
$
02Toolkit
Everything snaps to the grid
A small set of rules behind every shinUI piece, so things you mix and match still look like they belong together.
- modules
- 06
- themes
- 02
- runtime deps
- 00
Tokens first
Every color, radius and font is a CSS variable, so one edit restyles the whole set.
Live playground
Tweak props and watch the preview change before you copy a single line.
One-line installs
Pull any piece into your app with a single registry command.
Light and dark
Both themes are designed side by side, not bolted on afterwards.
Motion that rests
Animations pause on their own for people who prefer reduced motion.
Zero lock-in
Plain React and Tailwind files that you own and can rewrite.
03How it works
From gallery to production in three moves
Pick a block
Browse the gallery and tune props in the live playground.
$ open /blocks/grid-heroInstall it
One registry command copies the file and its tokens into your app.
$ npx shadcn add shinui/grid-heroMake it yours
It is plain React and Tailwind, so rename, restyle or rewrite freely.
$ git commit -m "my hero"Ready when your next page is.
Get startedFree, original design tools and blocks for people who ship.
Usage
Drop the file into your project, along with the shared files listed below, and import it.
import { GridLanding } from "@/registry/blocks/grid-landing";
export function Example() {
return <GridLanding />;
}Install prerequisites
Every component here relies only on Tailwind and the cn helper from shadcn/ui.
npm i clsx tailwind-mergeAlso copy these files
Grid · Full page imports these files. Keep the same paths, or update the imports to match.
'use client'
import type { ReactNode } from 'react'
import { GridCell, GridCells, GridLabel, GridRule, GridSection, type GridAccent, type GridMarkerKind } from '@/registry/blocks/grid-frame'
import { cn } from '@/lib/utils'
type IconName = 'tokens' | 'sliders' | 'terminal' | 'contrast' | 'pulse' | 'unlock'
export interface GridFeature {
title: string
description: string
/** Short monospace tag in the cell corner, e.g. "cli". */
tag?: string
icon?: IconName
}
export interface GridFeaturesProps {
/** Section number shown before the eyebrow, e.g. "02". */
index?: string
eyebrow?: string
title?: string
description?: string
ctaLabel?: string
features?: GridFeature[]
/** bento: a 2x2 lead cell with a live token panel. columns: an even grid. list: numbered full-width rows. */
variant?: 'bento' | 'columns' | 'list'
/** Columns on large screens for bento/columns (drops to 2, then 1). */
columns?: number
/** Fill one cell with the accent color (Cloudflare-style). */
filledCell?: boolean
/** Shape drawn where lines meet. */
marker?: GridMarkerKind
/** Dashed rails and lines between cells. */
dashed?: boolean
/** A slow scanning line sweeping down the grid. */
scan?: boolean
/** Which token color drives icons, hovers and the scan line. */
accent?: GridAccent
/** Cell padding. */
density?: 'comfortable' | 'compact'
/** Faint pattern in the gutters outside the rails. */
pattern?: 'dots' | 'lines' | 'grid' | 'none'
edges?: 'both' | 'top' | 'bottom' | 'none'
className?: string
}
const DEFAULT_FEATURES: GridFeature[] = [
{
title: 'Tokens first',
description: 'Every color, radius and font is a CSS variable, so one edit restyles the whole set.',
tag: 'core',
icon: 'tokens',
},
{
title: 'Live playground',
description: 'Tweak props and watch the preview change before you copy a single line.',
tag: 'dx',
icon: 'sliders',
},
{
title: 'One-line installs',
description: 'Pull any piece into your app with a single registry command.',
tag: 'cli',
icon: 'terminal',
},
{
title: 'Light and dark',
description: 'Both themes are designed side by side, not bolted on afterwards.',
tag: 'theme',
icon: 'contrast',
},
{
title: 'Motion that rests',
description: 'Animations pause on their own for people who prefer reduced motion.',
tag: 'a11y',
icon: 'pulse',
},
{
title: 'Zero lock-in',
description: 'Plain React and Tailwind files that you own and can rewrite.',
tag: 'oss',
icon: 'unlock',
},
]
const COLS: Record<number, string> = {
2: 'lg:grid-cols-2',
3: 'lg:grid-cols-3',
4: 'lg:grid-cols-4',
}
const ICONS: Record<IconName, ReactNode> = {
tokens: (
<>
<circle cx="7" cy="7" r="3" />
<circle cx="17" cy="7" r="3" />
<circle cx="7" cy="17" r="3" />
<rect x="14" y="14" width="6" height="6" rx="1" />
</>
),
sliders: <path d="M4 7h10m4 0h2M4 17h4m4 0h8M14 4v6M8 14v6" />,
terminal: (
<>
<rect x="3" y="4" width="18" height="16" rx="2" />
<path d="m7 10 3 2-3 2m5 1h5" />
</>
),
contrast: (
<>
<circle cx="12" cy="12" r="8" />
<path d="M12 4a8 8 0 0 1 0 16z" fill="currentColor" />
</>
),
pulse: <path d="M3 12h4l2-5 4 10 2-5h6" />,
unlock: (
<>
<rect x="4" y="11" width="16" height="10" rx="2" />
<path d="M8 11V8a4 4 0 0 1 7.5-2" />
</>
),
}
function Icon({ name }: { name: IconName }) {
return (
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={1.5} strokeLinecap="round" strokeLinejoin="round" className="size-5">
{ICONS[name]}
</svg>
)
}
/** The 2x2 bento visual: live token swatches read from the current theme. */
function TokenPanel() {
const swatches = ['primary', 'accent', 'highlight', 'foreground', 'muted']
return (
<div
className="relative mt-6 flex-1 overflow-hidden border border-(--gf-line) bg-background"
style={{
backgroundImage: 'radial-gradient(var(--gf-line) 1px, transparent 1px)',
backgroundSize: '12px 12px',
}}
>
<div className="flex items-center justify-between border-b border-(--gf-line) bg-background px-3 py-2 font-mono text-[10px] tracking-wider text-ds-muted uppercase">
<span>tokens.css</span>
<span className="flex items-center gap-1.5">
<span className={'gf-anim size-1.5 bg-(--gf-accent)'} style={{ animation: 'gf-blink 1.6s steps(2) infinite' }} />
live
</span>
</div>
<div className="grid gap-px p-3 font-mono text-[11px]">
{swatches.map((name, i) => (
<div key={name} className="flex items-center gap-3 bg-background/80 py-1">
<span className="size-4 shrink-0 border border-(--gf-line)" style={{ background: `var(--color-${name})` }} />
<span className="text-foreground">--ds-{name}</span>
<span className="h-px flex-1 border-t border-dotted border-(--gf-cross)" />
<span
className={'gf-anim h-1.5 origin-left bg-(--gf-accent)/70'}
style={{ width: `${28 + ((i * 37) % 44)}px`, animation: `gf-bar 3.2s ${i * 0.25}s ease-in-out infinite` }}
/>
</div>
))}
</div>
</div>
)
}
/**
* A boxy feature section on the Grid Frame kit: hairline cells, markers at
* the joints, monospace labels, hover-lit cells and an optional scan line.
*/
export function GridFeatures({
index = '02',
eyebrow = 'Toolkit',
title = 'Everything snaps to the grid',
description = 'A small set of rules behind every shinUI piece, so things you mix and match still look like they belong together.',
ctaLabel = 'Browse the library',
features = DEFAULT_FEATURES,
variant = 'bento',
columns = 3,
filledCell = false,
marker = 'plus',
dashed = false,
scan = true,
accent = 'primary',
density = 'comfortable',
pattern = 'dots',
edges = 'both',
className,
}: GridFeaturesProps) {
const cols = COLS[Math.min(4, Math.max(2, Math.round(columns)))]
const bento = variant === 'bento'
const pad = density === 'compact' ? 'p-4 sm:p-5' : 'p-6 sm:p-8'
return (
<GridSection edges={edges} marker={marker} dashed={dashed} accent={accent} pattern={pattern} className={className}>
<header className="grid gap-8 px-6 pt-16 pb-12 sm:px-10 md:grid-cols-[1fr_auto] md:items-end">
<div>
<GridLabel index={index}>{eyebrow}</GridLabel>
<h2 className="mt-5 max-w-xl font-display text-3xl font-semibold tracking-tight text-balance sm:text-5xl">{title}</h2>
<p className="mt-4 max-w-lg text-base text-pretty text-ds-muted">{description}</p>
</div>
<dl className="grid min-w-56 gap-1.5 font-mono text-[11px] tracking-wider text-ds-muted uppercase">
{[
['modules', String(features.length).padStart(2, '0')],
['themes', '02'],
['runtime deps', '00'],
].map(([k, v]) => (
<div key={k} className="flex items-baseline gap-2">
<dt>{k}</dt>
<span className="flex-1 border-b border-dotted border-(--gf-cross)" />
<dd className="text-foreground tabular-nums">{v}</dd>
</div>
))}
</dl>
</header>
<GridRule />
<div className="relative">
{variant === 'list' ? (
<GridCells>
{features.map((f, i) => (
<GridCell
key={f.title}
interactive
filled={filledCell && i === 1}
className={cn('grid items-center gap-x-8 gap-y-2 sm:grid-cols-[4rem_14rem_1fr_auto]', density === 'compact' ? 'px-5 py-4' : 'px-6 py-6 sm:px-10')}
>
<span className="font-mono text-2xl tabular-nums opacity-40">{String(i + 1).padStart(2, '0')}</span>
<h3 className="flex items-center gap-3 font-display text-lg font-medium tracking-tight">
<span className={cn(filledCell && i === 1 ? '' : 'text-(--gf-accent)')}>
<Icon name={f.icon ?? 'tokens'} />
</span>
{f.title}
</h3>
<p className={cn('text-sm text-pretty', filledCell && i === 1 ? 'opacity-85' : 'text-ds-muted')}>{f.description}</p>
{f.tag && (
<span className="hidden border border-current/20 px-1.5 py-0.5 font-mono text-[10px] tracking-wider uppercase opacity-70 sm:block">{f.tag}</span>
)}
</GridCell>
))}
</GridCells>
) : (
<GridCells className={cn('sm:grid-cols-2', cols)}>
{features.map((f, i) => {
const hero = bento && i === 0
const filled = filledCell && i === (bento ? 2 : 1)
return (
<GridCell
key={f.title}
interactive
filled={filled}
className={cn('group', pad, hero && 'sm:col-span-2', hero && columns >= 3 && 'lg:row-span-2')}
>
<div className={cn('flex items-center justify-between font-mono text-[10px] tracking-wider uppercase', filled ? 'opacity-80' : 'text-ds-muted')}>
<span className="tabular-nums">{String(i + 1).padStart(2, '0')}</span>
{f.tag && (
<span
className={cn(
'border px-1.5 py-0.5 transition-colors',
filled ? 'border-current/30' : 'border-(--gf-line) group-hover:border-(--gf-accent) group-hover:text-(--gf-accent)',
)}
>
{f.tag}
</span>
)}
</div>
<div
className={cn(
'mt-6 grid size-11 place-items-center border transition-colors',
filled ? 'border-current/30' : 'border-(--gf-line) bg-background text-(--gf-accent) group-hover:border-(--gf-accent)',
)}
style={filled ? undefined : { backgroundImage: 'repeating-linear-gradient(-45deg, var(--gf-line) 0 1px, transparent 1px 5px)' }}
>
<span className={cn('grid size-8 place-items-center', !filled && 'bg-background')}>
<Icon name={f.icon ?? 'tokens'} />
</span>
</div>
<h3 className={cn('mt-6 font-display font-medium tracking-tight', hero ? 'text-2xl' : 'text-lg')}>{f.title}</h3>
<p className={cn('mt-2 text-sm text-pretty', filled ? 'opacity-85' : 'text-ds-muted', hero && 'max-w-md sm:text-base')}>{f.description}</p>
{hero && <TokenPanel />}
<span
aria-hidden
className={cn(
'absolute right-5 bottom-5 font-mono text-sm opacity-0 transition-all duration-300 group-hover:translate-x-0.5 group-hover:opacity-100',
!filled && 'text-(--gf-accent)',
)}
>
->
</span>
</GridCell>
)
})}
</GridCells>
)}
{scan && (
<div aria-hidden className="pointer-events-none absolute inset-0 z-10 overflow-hidden">
<div
className="gf-anim absolute inset-x-0 h-24 border-b border-(--gf-accent)/50"
style={{
background: 'linear-gradient(to bottom, transparent, color-mix(in oklab, var(--gf-accent) 9%, transparent))',
animation: 'gf-scan 7s linear infinite',
}}
/>
</div>
)}
</div>
<GridRule />
<footer className="flex flex-wrap items-center justify-between gap-4 px-6 py-6 font-mono text-[11px] tracking-wider text-ds-muted uppercase sm:px-10">
<span>Built on tokens / light + dark</span>
<a href="#" className="group inline-flex items-center gap-2 text-foreground transition-colors hover:text-(--gf-accent)">
{ctaLabel}
<span className="transition-transform group-hover:translate-x-0.5">-></span>
</a>
</footer>
</GridSection>
)
}
'use client'
import { createContext, useContext, type ComponentProps, type CSSProperties, type ReactNode } from 'react'
import { cn } from '@/lib/utils'
/**
* Grid Frame: the shared kit behind the shinUI "grid" blocks.
*
* Every grid block is a <GridSection>: a centered container framed by two
* vertical rails, with hairline rules that run edge to edge across the page
* and markers (plus signs or small squares) wherever lines meet. Lines are
* opaque mixes of the theme colors, so borders that overlap never double up.
*
* <GridSection edges="both">
* <GridCells className="sm:grid-cols-3">
* <GridCell>...</GridCell>
* </GridCells>
* </GridSection>
*/
export type GridAccent = 'primary' | 'accent' | 'highlight'
export type GridMarkerKind = 'plus' | 'square' | 'none'
interface GridSettings {
marker: GridMarkerKind
dashed: boolean
}
const GridContext = createContext<GridSettings>({ marker: 'plus', dashed: false })
const RAIL = 'color-mix(in oklab, var(--color-foreground) 11%, var(--color-background))'
function vars(accent: GridAccent) {
return {
'--gf-accent': `var(--color-${accent})`,
'--gf-line': RAIL,
'--gf-cross': 'color-mix(in oklab, var(--color-foreground) 38%, var(--color-background))',
'--gf-tint': `color-mix(in oklab, var(--color-${accent}) 6%, var(--color-background))`,
} as CSSProperties
}
const PATTERNS: Record<'dots' | 'lines' | 'grid', CSSProperties> = {
dots: { backgroundImage: 'radial-gradient(var(--gf-cross) 1px, transparent 1px)', backgroundSize: '16px 16px', opacity: 0.35 },
lines: { backgroundImage: 'repeating-linear-gradient(-45deg, var(--gf-line) 0 1px, transparent 1px 8px)' },
grid: {
backgroundImage: 'linear-gradient(var(--gf-line) 1px, transparent 1px), linear-gradient(90deg, var(--gf-line) 1px, transparent 1px)',
backgroundSize: '32px 32px',
},
}
const KEYFRAMES = `
@keyframes gf-scan{from{top:-6rem}to{top:100%}}
@keyframes gf-bar{0%,100%{transform:scaleX(.35)}50%{transform:scaleX(1)}}
@keyframes gf-grow{0%,100%{transform:scaleY(.4)}50%{transform:scaleY(1)}}
@keyframes gf-blink{to{opacity:.15}}
@media (prefers-reduced-motion:reduce){.gf-anim{animation:none!important}}
`
export interface GridSectionProps extends Omit<ComponentProps<'section'>, 'children'> {
children?: ReactNode
/** Which full-bleed rules to draw. Stack sections with "bottom" so lines never double. */
edges?: 'both' | 'top' | 'bottom' | 'none'
/** Shape drawn where lines meet. */
marker?: GridMarkerKind
/** Dashed rails and inner cell lines (Cloudflare-style). */
dashed?: boolean
/** Token color for hovers, markers and fills. */
accent?: GridAccent
/** Faint pattern in the gutters outside the rails. */
pattern?: 'dots' | 'lines' | 'grid' | 'none'
/** Classes for the inner railed container. */
innerClassName?: string
}
/** A centered container with vertical rails and full-bleed hairline rules. */
export function GridSection({
children,
edges = 'both',
marker = 'plus',
dashed = false,
accent = 'primary',
pattern = 'none',
className,
innerClassName,
style,
...props
}: GridSectionProps) {
return (
<GridContext.Provider value={{ marker, dashed }}>
<section
className={cn('relative overflow-x-clip text-foreground', className)}
style={{ ...vars(accent), ...style }}
{...props}
>
<style>{KEYFRAMES}</style>
{pattern !== 'none' && <div aria-hidden className="pointer-events-none absolute inset-0" style={PATTERNS[pattern]} />}
<div
className={cn(
'relative mx-auto flex w-full max-w-6xl flex-col border-x border-(--gf-line) bg-background',
dashed && 'border-dashed',
innerClassName,
)}
>
{(edges === 'both' || edges === 'top') && <GridRule />}
{children}
{(edges === 'both' || edges === 'bottom') && <GridRule />}
</div>
</section>
</GridContext.Provider>
)
}
/** A marker centered on a point; x and y are CSS lengths inside the parent. */
export function GridMarker({ x, y, kind }: { x: string; y: string; kind?: GridMarkerKind }) {
const settings = useContext(GridContext)
const shape = kind ?? settings.marker
if (shape === 'none') return null
return (
<span
aria-hidden
className="pointer-events-none absolute z-20 size-[11px]"
style={{ left: x, top: y, transform: 'translate(-50%, -50%)' }}
>
{shape === 'plus' ? (
<>
<span className="absolute top-0 left-[5px] h-full w-px bg-(--gf-cross)" />
<span className="absolute top-[5px] left-0 h-px w-full bg-(--gf-cross)" />
</>
) : (
<span className="absolute inset-[2px] border border-(--gf-cross) bg-background" />
)}
</span>
)
}
/** A full-bleed horizontal hairline with markers where it crosses the rails. */
export function GridRule({ className }: { className?: string }) {
return (
<div aria-hidden className={cn('relative h-px shrink-0 bg-(--gf-line)', className)}>
<span className="absolute top-0 right-full h-px w-screen bg-(--gf-line)" />
<span className="absolute top-0 left-full h-px w-screen bg-(--gf-line)" />
<GridMarker x="-0.5px" y="0.5px" />
<GridMarker x="calc(100% + 0.5px)" y="0.5px" />
</div>
)
}
/**
* A grid of bordered cells. Put it right after a GridRule (or a section edge)
* and give it grid-cols-* classes. Empty slots show a hatched fill.
*/
export function GridCells({ className, style, ...props }: ComponentProps<'div'>) {
return (
<div
className={cn('relative -mr-px -mb-px grid grid-cols-1', className)}
style={{ backgroundImage: 'repeating-linear-gradient(-45deg, var(--gf-line) 0 1px, transparent 1px 6px)', ...style }}
{...props}
/>
)
}
export interface GridCellProps extends ComponentProps<'div'> {
/** Tint the cell, show corner brackets and an accent top line on hover. */
interactive?: boolean
/** Fill the cell with the accent color. */
filled?: boolean
}
/** One bordered cell inside GridCells. Draws markers on its corners. */
export function GridCell({ interactive = false, filled = false, className, children, ...props }: GridCellProps) {
const { dashed } = useContext(GridContext)
return (
<div
className={cn(
'group/cell relative flex flex-col border-r border-b border-(--gf-line) bg-background',
dashed && 'border-dashed',
interactive && 'transition-colors duration-300 hover:bg-(--gf-tint)',
filled && 'bg-(--gf-accent) text-ds-primary-foreground hover:bg-(--gf-accent)',
className,
)}
{...props}
>
<GridMarker x="-0.5px" y="-0.5px" />
<GridMarker x="calc(100% - 0.5px)" y="calc(100% - 0.5px)" />
{interactive && (
<>
<span aria-hidden className="pointer-events-none absolute inset-2 opacity-0 transition-opacity duration-300 group-hover/cell:opacity-100">
<span className="absolute top-0 left-0 size-2.5 border-t border-l border-(--gf-accent)" />
<span className="absolute top-0 right-0 size-2.5 border-t border-r border-(--gf-accent)" />
<span className="absolute bottom-0 left-0 size-2.5 border-b border-l border-(--gf-accent)" />
<span className="absolute right-0 bottom-0 size-2.5 border-r border-b border-(--gf-accent)" />
</span>
<span
aria-hidden
className="pointer-events-none absolute inset-x-0 -top-px h-px origin-left scale-x-0 bg-(--gf-accent) transition-transform duration-500 group-hover/cell:scale-x-100"
/>
</>
)}
{children}
</div>
)
}
/** Monospace eyebrow: accent square, index number, short rule, label. */
export function GridLabel({ index, children, className }: { index?: string; children?: ReactNode; className?: string }) {
return (
<p className={cn('flex items-center gap-2 font-mono text-[11px] tracking-[0.2em] text-ds-muted uppercase', className)}>
<span className="size-1.5 bg-(--gf-accent)" />
{index && <span className="text-foreground">{index}</span>}
{index && <span className="h-px w-6 bg-(--gf-cross)" />}
{children}
</p>
)
}
export interface GridButtonProps extends ComponentProps<'a'> {
variant?: 'primary' | 'outline' | 'ghost'
}
/** A square-cornered link button that fits the grid look. */
export function GridButton({ variant = 'primary', className, children, ...props }: GridButtonProps) {
return (
<a
className={cn(
'group/btn inline-flex h-10 items-center gap-2 px-4 font-mono text-xs tracking-wider uppercase transition-colors',
variant === 'primary' && 'bg-(--gf-accent) text-ds-primary-foreground hover:opacity-90',
variant === 'outline' && 'border border-(--gf-cross) bg-background hover:border-(--gf-accent) hover:text-(--gf-accent)',
variant === 'ghost' && 'text-ds-muted hover:text-foreground',
className,
)}
{...props}
>
{children}
<span aria-hidden className="transition-transform group-hover/btn:translate-x-0.5">
->
</span>
</a>
)
}
/** The original shinUI grid mark: a 2x2 of squares, one in the accent color. */
export function GridLogo({ className }: { className?: string }) {
return (
<svg viewBox="0 0 20 20" aria-hidden className={cn('size-5', className)}>
<rect x="1" y="1" width="8" height="8" fill="currentColor" />
<rect x="11" y="1" width="8" height="8" fill="none" stroke="currentColor" strokeWidth="1.5" />
<rect x="1" y="11" width="8" height="8" fill="none" stroke="currentColor" strokeWidth="1.5" />
<rect x="11" y="11" width="8" height="8" fill="var(--gf-accent)" />
</svg>
)
}
'use client'
import { GridCell, GridCells, GridLogo, GridRule, GridSection, type GridAccent, type GridMarkerKind } from '@/registry/blocks/grid-frame'
import { cn } from '@/lib/utils'
export interface GridFooterProps {
/** columns: brand cell + link columns. compact: one ruled row. wordmark: columns over a giant hatched brand name. */
variant?: 'columns' | 'compact' | 'wordmark'
brand?: string
tagline?: string
/** Show a call-to-action band above the footer. */
showCta?: boolean
ctaTitle?: string
ctaLabel?: string
status?: string
accent?: GridAccent
marker?: GridMarkerKind
dashed?: boolean
edges?: 'both' | 'top' | 'bottom' | 'none'
className?: string
}
const COLUMNS: [string, string[]][] = [
['Library', ['Blocks', 'Backgrounds', 'Components', 'Changelog']],
['Tools', ['Favicon Studio', 'Token builder', 'Registry', 'Playground']],
['Learn', ['Docs', 'Guides', 'Design notes', 'FAQ']],
['Studio', ['About', 'Contact', 'License', 'Privacy']],
]
const YEAR = new Date().getFullYear()
/** A grid footer with three layouts and an optional CTA band. */
export function GridFooter({
variant = 'columns',
brand = 'shinUI',
tagline = 'Free, original design tools and blocks for people who ship.',
showCta = true,
ctaTitle = 'Ready when your next page is.',
ctaLabel = 'Get started',
status = 'All systems normal',
accent = 'primary',
marker = 'plus',
dashed = false,
edges = 'both',
className,
}: GridFooterProps) {
const line = cn('border-(--gf-line)', dashed && 'border-dashed')
const cta = showCta && (
<>
<div className="relative overflow-hidden bg-(--gf-accent) px-6 py-16 text-ds-primary-foreground sm:px-10">
<div
aria-hidden
className="pointer-events-none absolute inset-0 opacity-20"
style={{ backgroundImage: 'radial-gradient(currentColor 1px, transparent 1px)', backgroundSize: '12px 12px' }}
/>
<div className="relative flex flex-wrap items-end justify-between gap-6">
<h2 className="max-w-lg font-display text-3xl font-semibold tracking-tight text-balance sm:text-4xl">{ctaTitle}</h2>
<a href="#" className="inline-flex h-11 items-center gap-2 bg-background px-5 font-mono text-xs tracking-wider text-foreground uppercase transition-opacity hover:opacity-90">
{ctaLabel} <span aria-hidden>-></span>
</a>
</div>
</div>
<GridRule />
</>
)
const bottom = (
<div className="flex flex-wrap items-center justify-between gap-4 px-6 py-5 font-mono text-[11px] tracking-wider text-ds-muted uppercase sm:px-10">
<span>
(c) {YEAR} {brand}
</span>
<span className="flex items-center gap-2">
<span className="gf-anim size-1.5 rounded-full bg-emerald-500" style={{ animation: 'gf-blink 1.4s ease-in-out infinite alternate' }} />
{status}
</span>
<span className="flex gap-5">
{['GitHub', 'X', 'RSS'].map((s) => (
<a key={s} href="#" className="transition-colors hover:text-foreground">
{s}
</a>
))}
</span>
</div>
)
const columns = (
<GridCells className="sm:grid-cols-2 lg:grid-cols-[1.6fr_1fr_1fr_1fr_1fr]">
<GridCell className="gap-4 p-6 sm:col-span-2 sm:p-8 lg:col-span-1">
<a href="#" className="flex items-center gap-2.5 font-display text-lg font-semibold tracking-tight">
<GridLogo />
{brand}
</a>
<p className="max-w-xs text-sm text-pretty text-ds-muted">{tagline}</p>
</GridCell>
{COLUMNS.map(([title, links]) => (
<GridCell key={title} className="p-6 sm:p-8">
<h3 className="font-mono text-[10px] tracking-wider text-ds-muted uppercase">{title}</h3>
<ul className="mt-4 space-y-2.5 text-sm">
{links.map((l) => (
<li key={l}>
<a href="#" className="group inline-flex items-center gap-1.5 transition-colors hover:text-(--gf-accent)">
<span className="w-0 overflow-hidden font-mono text-xs transition-all group-hover:w-3">></span>
{l}
</a>
</li>
))}
</ul>
</GridCell>
))}
</GridCells>
)
return (
<GridSection edges={edges} marker={marker} dashed={dashed} accent={accent} className={className}>
{cta}
{variant === 'compact' ? (
<div className="flex flex-col gap-6 px-6 py-8 sm:px-10 md:flex-row md:items-center md:justify-between">
<a href="#" className="flex items-center gap-2.5 font-display text-base font-semibold tracking-tight">
<GridLogo />
{brand}
</a>
<nav className="flex flex-wrap gap-x-6 gap-y-2 text-sm text-ds-muted">
{COLUMNS.flatMap(([, links]) => links.slice(0, 1)).concat(['Docs', 'License']).map((l) => (
<a key={l} href="#" className="transition-colors hover:text-foreground">
{l}
</a>
))}
</nav>
</div>
) : (
columns
)}
{variant === 'wordmark' && (
<>
<GridRule />
<div className={cn('relative overflow-hidden px-4 pt-6 select-none sm:px-6', line)} aria-hidden>
<p
className="text-center font-display text-[22vw] leading-[0.8] font-bold tracking-tighter text-transparent lg:text-[15rem]"
style={{
backgroundImage: 'repeating-linear-gradient(-45deg, var(--gf-cross) 0 1px, transparent 1px 6px)',
WebkitBackgroundClip: 'text',
backgroundClip: 'text',
WebkitTextStroke: '1px var(--gf-cross)',
}}
>
{brand}
</p>
</div>
</>
)}
<GridRule />
{bottom}
</GridSection>
)
}
'use client'
import type { CSSProperties } from 'react'
import { GridButton, GridCell, GridCells, GridLabel, GridRule, GridSection, type GridAccent, type GridMarkerKind } from '@/registry/blocks/grid-frame'
import { cn } from '@/lib/utils'
export interface GridHeroProps {
/** centered: big centered headline. split: copy left, terminal cell right. stats: headline over a stats row. */
variant?: 'centered' | 'split' | 'stats'
eyebrow?: string
title?: string
/** Second part of the headline, set in the accent color. */
accentText?: string
description?: string
primaryCta?: string
secondaryCta?: string
showSecondary?: boolean
/** Command shown in the terminal cell (split variant). */
command?: string
/** Texture inside the hero frame. */
pattern?: 'dots' | 'grid' | 'none'
accent?: GridAccent
marker?: GridMarkerKind
dashed?: boolean
edges?: 'both' | 'top' | 'bottom' | 'none'
className?: string
}
const STATS = [
['24', 'blocks', 'and counting'],
['02', 'themes', 'light + dark'],
['00', 'runtime deps', 'beyond React'],
['1 cmd', 'to install', 'via the registry'],
]
function texture(pattern: GridHeroProps['pattern'], fade: string): CSSProperties | undefined {
if (pattern === 'none') return undefined
const mask = { maskImage: fade, WebkitMaskImage: fade }
return pattern === 'dots'
? { backgroundImage: 'radial-gradient(var(--gf-cross) 1px, transparent 1px)', backgroundSize: '14px 14px', opacity: 0.45, ...mask }
: {
backgroundImage: 'linear-gradient(var(--gf-line) 1px, transparent 1px), linear-gradient(90deg, var(--gf-line) 1px, transparent 1px)',
backgroundSize: '40px 40px',
...mask,
}
}
function Terminal({ command }: { command: string }) {
const rows: [string, string][] = [
['ok', 'resolved grid-frame'],
['ok', 'wrote components/shinui/grid-hero.tsx'],
['ok', 'tokens linked (light + dark)'],
]
return (
<div className="flex h-full flex-col border border-(--gf-line) bg-background font-mono text-[12px]">
<div className="flex items-center gap-1.5 border-b border-(--gf-line) px-3 py-2">
{[0, 1, 2].map((i) => (
<span key={i} className="size-2 border border-(--gf-cross)" />
))}
<span className="ml-auto text-[10px] tracking-wider text-ds-muted uppercase">terminal</span>
</div>
<div className="flex-1 space-y-1.5 p-4 leading-relaxed">
<p>
<span className="text-(--gf-accent)">$</span> {command}
</p>
{rows.map(([s, t]) => (
<p key={t} className="text-ds-muted">
<span className="text-(--gf-accent)">[{s}]</span> {t}
</p>
))}
<p className="pt-1">
<span className="text-(--gf-accent)">$</span>{' '}
<span className="gf-anim inline-block h-3.5 w-2 translate-y-0.5 bg-foreground" style={{ animation: 'gf-blink 1s steps(2) infinite' }} />
</p>
</div>
</div>
)
}
/** A hero framed by the grid, in three layouts. */
export function GridHero({
variant = 'centered',
eyebrow = 'New / grid blocks',
title = 'Build pages that',
accentText = 'line up on purpose',
description = 'Hairline frames, crosshair joints and monospace details. Original blocks you can copy, tweak and ship in an afternoon.',
primaryCta = 'Start building',
secondaryCta = 'Read the docs',
showSecondary = true,
command = 'npx shadcn add shinui/grid-hero',
pattern = 'dots',
accent = 'primary',
marker = 'plus',
dashed = false,
edges = 'both',
className,
}: GridHeroProps) {
const centered = variant === 'centered'
const heading = (
<h1
className={cn(
'font-display font-semibold tracking-tight text-balance',
centered ? 'mx-auto max-w-3xl text-4xl sm:text-6xl lg:text-7xl' : 'max-w-2xl text-4xl sm:text-5xl lg:text-6xl',
)}
>
{title} {accentText && <span className="text-(--gf-accent)">{accentText}</span>}
</h1>
)
const copy = (
<p className={cn('mt-6 max-w-xl text-base text-pretty text-ds-muted sm:text-lg', centered && 'mx-auto')}>{description}</p>
)
const ctas = (
<div className={cn('mt-9 flex flex-wrap items-center gap-3', centered && 'justify-center')}>
<GridButton href="#">{primaryCta}</GridButton>
{showSecondary && (
<GridButton href="#" variant="outline">
{secondaryCta}
</GridButton>
)}
</div>
)
return (
<GridSection edges={edges} marker={marker} dashed={dashed} accent={accent} className={className}>
{centered && (
<div className="relative overflow-hidden px-6 py-24 text-center sm:py-32">
<div aria-hidden className="pointer-events-none absolute inset-0" style={texture(pattern, 'radial-gradient(ellipse at center, #000 10%, transparent 70%)')} />
<div className="relative">
<div className="mb-8 inline-flex items-center gap-3 border border-(--gf-line) bg-background py-1 pr-3 pl-1 font-mono text-[11px] tracking-wider text-ds-muted uppercase">
<span className="bg-(--gf-accent) px-1.5 py-0.5 text-ds-primary-foreground">new</span>
{eyebrow}
</div>
{heading}
{copy}
{ctas}
</div>
</div>
)}
{variant === 'split' && (
<GridCells className="lg:grid-cols-[1.15fr_1fr]">
<GridCell className="relative overflow-hidden px-6 py-16 sm:px-10 sm:py-24">
<div aria-hidden className="pointer-events-none absolute inset-0" style={texture(pattern, 'linear-gradient(to bottom right, #000, transparent 70%)')} />
<div className="relative">
<GridLabel index="01" className="mb-6">
{eyebrow}
</GridLabel>
{heading}
{copy}
{ctas}
</div>
</GridCell>
<GridCell className="p-6 sm:p-10">
<Terminal command={command} />
</GridCell>
</GridCells>
)}
{variant === 'stats' && (
<>
<div className="relative overflow-hidden px-6 pt-20 pb-16 sm:px-10 sm:pt-28">
<div aria-hidden className="pointer-events-none absolute inset-0" style={texture(pattern, 'linear-gradient(to bottom, #000, transparent 85%)')} />
<div className="relative grid gap-10 lg:grid-cols-[1.4fr_1fr] lg:items-end">
<div>
<GridLabel index="00" className="mb-6">
{eyebrow}
</GridLabel>
{heading}
</div>
<div>
<p className="max-w-md text-base text-pretty text-ds-muted">{description}</p>
<div className="mt-8 flex flex-wrap items-center gap-3">
<GridButton href="#">{primaryCta}</GridButton>
{showSecondary && (
<GridButton href="#" variant="ghost">
{secondaryCta}
</GridButton>
)}
</div>
</div>
</div>
</div>
<GridRule />
<GridCells className="grid-cols-2 lg:grid-cols-4">
{STATS.map(([value, label, note]) => (
<GridCell key={label} interactive className="px-6 py-7 sm:px-8">
<span className="font-mono text-[10px] tracking-wider text-ds-muted uppercase">{label}</span>
<span className="mt-3 font-display text-3xl font-semibold tracking-tight tabular-nums sm:text-4xl">{value}</span>
<span className="mt-1 text-xs text-ds-muted">{note}</span>
</GridCell>
))}
</GridCells>
</>
)}
</GridSection>
)
}
'use client'
import { useState } from 'react'
import { GridButton, GridLogo, GridMarker, GridSection, type GridAccent, type GridMarkerKind } from '@/registry/blocks/grid-frame'
import { cn } from '@/lib/utils'
export interface GridNavbarProps {
/** boxed: every item in its own cell. hairline: one quiet ruled bar. floating: a framed pill inside the rails. */
variant?: 'boxed' | 'hairline' | 'floating'
brand?: string
/** Comma separated link labels. */
links?: string
ctaLabel?: string
showSignIn?: boolean
/** Small mono status chip next to the brand. */
badge?: string
accent?: GridAccent
marker?: GridMarkerKind
dashed?: boolean
edges?: 'both' | 'top' | 'bottom' | 'none'
className?: string
}
function MenuIcon({ open }: { open: boolean }) {
return (
<svg viewBox="0 0 20 20" className="size-4" fill="none" stroke="currentColor" strokeWidth={1.5} aria-hidden>
{open ? <path d="M5 5l10 10M15 5L5 15" /> : <path d="M3 6h14M3 10h14M3 14h14" />}
</svg>
)
}
/** Divider cell edge with markers where it meets the rules above and below. */
function Edge() {
return (
<>
<GridMarker x="calc(100% - 0.5px)" y="-0.5px" />
<GridMarker x="calc(100% - 0.5px)" y="calc(100% + 0.5px)" />
</>
)
}
/**
* Grid-style top navigation in three variants, with a mobile menu that
* unfolds as stacked bordered rows.
*/
export function GridNavbar({
variant = 'boxed',
brand = 'shinUI',
links = 'Blocks, Backgrounds, Components, Docs',
ctaLabel = 'Get started',
showSignIn = true,
badge = 'v0.4',
accent = 'primary',
marker = 'plus',
dashed = false,
edges = 'both',
className,
}: GridNavbarProps) {
const [open, setOpen] = useState(false)
const items = links
.split(',')
.map((l) => l.trim())
.filter(Boolean)
const line = cn('border-(--gf-line)', dashed && 'border-dashed')
const brandEl = (
<a href="#" className="flex items-center gap-2.5 font-display text-[15px] font-semibold tracking-tight">
<GridLogo />
{brand}
{badge && (
<span className="border border-(--gf-line) px-1.5 py-0.5 font-mono text-[10px] font-normal tracking-wider text-ds-muted uppercase">
{badge}
</span>
)}
</a>
)
const toggle = (
<button
type="button"
aria-label={open ? 'Close menu' : 'Open menu'}
aria-expanded={open}
onClick={() => setOpen((o) => !o)}
className="grid size-10 place-items-center text-ds-muted transition-colors hover:text-foreground md:hidden"
>
<MenuIcon open={open} />
</button>
)
const mobile = open && (
<div className={cn('border-t md:hidden', line)}>
{items.map((item) => (
<a key={item} href="#" className={cn('flex items-center justify-between border-b px-6 py-3.5 font-mono text-xs tracking-wider uppercase', line)}>
{item}
<span className="text-ds-muted">-></span>
</a>
))}
<div className="flex gap-2 p-4">
{showSignIn && (
<GridButton variant="outline" href="#" className="flex-1 justify-center">
Sign in
</GridButton>
)}
<GridButton href="#" className="flex-1 justify-center">
{ctaLabel}
</GridButton>
</div>
</div>
)
return (
<GridSection edges={edges} marker={marker} dashed={dashed} accent={accent} className={className}>
{variant === 'boxed' && (
<nav className="flex h-14 items-stretch">
<div className={cn('relative flex items-center border-r px-5', line)}>
{brandEl}
<Edge />
</div>
{items.map((item) => (
<a
key={item}
href="#"
className={cn(
'relative hidden items-center border-r px-5 font-mono text-[11px] tracking-wider text-ds-muted uppercase transition-colors hover:bg-(--gf-tint) hover:text-foreground md:flex',
line,
)}
>
{item}
<Edge />
</a>
))}
<div className="flex-1" />
{showSignIn && (
<a
href="#"
className={cn(
'relative hidden items-center border-l px-5 font-mono text-[11px] tracking-wider uppercase transition-colors hover:bg-(--gf-tint) md:flex',
line,
)}
>
Sign in
<GridMarker x="-0.5px" y="-0.5px" />
<GridMarker x="-0.5px" y="calc(100% + 0.5px)" />
</a>
)}
<a
href="#"
className={cn(
'relative hidden items-center gap-2 bg-(--gf-accent) px-5 font-mono text-[11px] tracking-wider text-ds-primary-foreground uppercase transition-opacity hover:opacity-90 md:flex',
!showSignIn && 'border-l',
line,
)}
>
{ctaLabel} <span aria-hidden>-></span>
</a>
<div className={cn('flex items-center border-l md:hidden', line)}>{toggle}</div>
</nav>
)}
{variant === 'hairline' && (
<nav className="flex h-14 items-center gap-8 px-5 sm:px-6">
{brandEl}
<div className="hidden items-center gap-6 md:flex">
{items.map((item, i) => (
<a key={item} href="#" className="group flex items-baseline gap-1.5 text-sm text-ds-muted transition-colors hover:text-foreground">
<span className="font-mono text-[10px] text-(--gf-cross) transition-colors group-hover:text-(--gf-accent)">
{String(i + 1).padStart(2, '0')}
</span>
{item}
</a>
))}
</div>
<div className="ml-auto hidden items-center gap-4 md:flex">
{showSignIn && (
<a href="#" className="text-sm text-ds-muted transition-colors hover:text-foreground">
Sign in
</a>
)}
<GridButton variant="outline" href="#" className="h-8 px-3">
{ctaLabel}
</GridButton>
</div>
<div className="ml-auto md:hidden">{toggle}</div>
</nav>
)}
{variant === 'floating' && (
<div className="px-3 py-3 sm:px-4">
<nav className="relative flex h-12 items-center gap-6 rounded-full border border-(--gf-line) bg-background/80 pr-1.5 pl-4 shadow-[0_1px_0_var(--gf-line),0_8px_24px_-12px_color-mix(in_oklab,var(--color-foreground)_25%,transparent)] backdrop-blur">
{brandEl}
<div className="mx-auto hidden items-center gap-1 md:flex">
{items.map((item) => (
<a key={item} href="#" className="rounded-full px-3 py-1.5 text-sm text-ds-muted transition-colors hover:bg-(--gf-tint) hover:text-foreground">
{item}
</a>
))}
</div>
<div className="ml-auto hidden items-center gap-1.5 md:ml-0 md:flex">
{showSignIn && (
<a href="#" className="rounded-full px-3 py-1.5 text-sm text-ds-muted transition-colors hover:text-foreground">
Sign in
</a>
)}
<a
href="#"
className="rounded-full bg-(--gf-accent) px-4 py-2 font-mono text-[11px] tracking-wider text-ds-primary-foreground uppercase transition-opacity hover:opacity-90"
>
{ctaLabel}
</a>
</div>
<div className="ml-auto md:hidden">{toggle}</div>
</nav>
</div>
)}
{mobile}
</GridSection>
)
}
'use client'
import { GridCell, GridCells, GridLabel, GridRule, GridSection, type GridAccent, type GridMarkerKind } from '@/registry/blocks/grid-frame'
import { cn } from '@/lib/utils'
export interface GridStepsProps {
/** cards: three bordered step cells with code. rail: a vertical timeline. pricing: three plan cells. */
variant?: 'cards' | 'rail' | 'pricing'
index?: string
eyebrow?: string
title?: string
accent?: GridAccent
marker?: GridMarkerKind
dashed?: boolean
edges?: 'both' | 'top' | 'bottom' | 'none'
className?: string
}
const STEPS = [
{ title: 'Pick a block', body: 'Browse the gallery and tune props in the live playground.', code: 'open /blocks/grid-hero' },
{ title: 'Install it', body: 'One registry command copies the file and its tokens into your app.', code: 'npx shadcn add shinui/grid-hero' },
{ title: 'Make it yours', body: 'It is plain React and Tailwind, so rename, restyle or rewrite freely.', code: 'git commit -m "my hero"' },
]
const PLANS = [
{ name: 'Starter', price: '$0', note: 'forever', perks: ['All blocks', 'Light + dark', 'Registry installs'], cta: 'Start free' },
{ name: 'Studio', price: '$12', note: 'per month', perks: ['Everything in Starter', 'Figma kit', 'Early drops', 'Priority requests'], cta: 'Go Studio', featured: true },
{ name: 'Team', price: '$39', note: 'per month', perks: ['Everything in Studio', '5 seats', 'Private registry'], cta: 'Talk to us' },
]
/** Steps, a timeline or pricing tiers, all in bordered grid cells. */
export function GridSteps({
variant = 'cards',
index = '03',
eyebrow = 'How it works',
title = 'From gallery to production in three moves',
accent = 'primary',
marker = 'plus',
dashed = false,
edges = 'both',
className,
}: GridStepsProps) {
const pricing = variant === 'pricing'
return (
<GridSection edges={edges} marker={marker} dashed={dashed} accent={accent} className={className}>
<header className="px-6 pt-16 pb-12 text-center sm:px-10">
<GridLabel index={index} className="justify-center">
{pricing ? 'Pricing' : eyebrow}
</GridLabel>
<h2 className="mx-auto mt-5 max-w-2xl font-display text-3xl font-semibold tracking-tight text-balance sm:text-5xl">
{pricing ? 'Free to start, simple to grow' : title}
</h2>
</header>
<GridRule />
{variant === 'cards' && (
<GridCells className="md:grid-cols-3">
{STEPS.map((s, i) => (
<GridCell key={s.title} interactive className="p-6 sm:p-8">
<div className="flex items-center gap-3">
<span className="grid size-8 place-items-center border border-(--gf-accent) font-mono text-xs text-(--gf-accent)">{i + 1}</span>
<span className="h-px flex-1 border-t border-dashed border-(--gf-cross)" />
<span className="font-mono text-[10px] tracking-wider text-ds-muted uppercase">step</span>
</div>
<h3 className="mt-8 font-display text-xl font-medium tracking-tight">{s.title}</h3>
<p className="mt-2 text-sm text-pretty text-ds-muted">{s.body}</p>
<code className="mt-8 block border border-(--gf-line) bg-(--gf-tint) px-3 py-2 font-mono text-[12px]">
<span className="text-(--gf-accent)">$</span> {s.code}
</code>
</GridCell>
))}
</GridCells>
)}
{variant === 'rail' && (
<GridCells>
{STEPS.map((s, i) => (
<GridCell key={s.title} interactive className="grid gap-4 px-6 py-8 sm:grid-cols-[6rem_1fr_1fr] sm:px-10">
<div className="relative flex sm:justify-center">
<span className="relative z-10 grid size-10 place-items-center bg-(--gf-accent) font-mono text-sm text-ds-primary-foreground">
{String(i + 1).padStart(2, '0')}
</span>
{i < STEPS.length - 1 && (
<span aria-hidden className="absolute top-10 -bottom-8 left-5 hidden border-l border-dashed border-(--gf-accent)/60 sm:left-1/2 sm:block" />
)}
</div>
<div>
<h3 className="font-display text-xl font-medium tracking-tight">{s.title}</h3>
<p className="mt-2 text-sm text-pretty text-ds-muted">{s.body}</p>
</div>
<code className="self-start border border-(--gf-line) px-3 py-2 font-mono text-[12px]">
<span className="text-(--gf-accent)">$</span> {s.code}
</code>
</GridCell>
))}
</GridCells>
)}
{pricing && (
<GridCells className="md:grid-cols-3">
{PLANS.map((p) => (
<GridCell key={p.name} interactive={!p.featured} filled={p.featured} className="p-6 sm:p-8">
<div className="flex items-center justify-between font-mono text-[11px] tracking-wider uppercase">
<span>{p.name}</span>
{p.featured && <span className="border border-current/40 px-1.5 py-0.5 text-[10px]">popular</span>}
</div>
<p className="mt-8 flex items-baseline gap-2">
<span className="font-display text-5xl font-semibold tracking-tight">{p.price}</span>
<span className={cn('font-mono text-xs', p.featured ? 'opacity-80' : 'text-ds-muted')}>{p.note}</span>
</p>
<ul className="mt-8 flex-1 space-y-2.5 text-sm">
{p.perks.map((perk) => (
<li key={perk} className="flex items-center gap-2.5">
<span className={cn('font-mono text-xs', !p.featured && 'text-(--gf-accent)')}>+</span>
{perk}
</li>
))}
</ul>
<a
href="#"
className={cn(
'mt-10 flex h-10 items-center justify-center font-mono text-xs tracking-wider uppercase transition-colors',
p.featured ? 'bg-background text-foreground hover:opacity-90' : 'border border-(--gf-cross) hover:border-(--gf-accent) hover:text-(--gf-accent)',
)}
>
{p.cta}
</a>
</GridCell>
))}
</GridCells>
)}
</GridSection>
)
}
'use client'
import { GridCell, GridCells, GridSection, type GridAccent, type GridMarkerKind } from '@/registry/blocks/grid-frame'
import { cn } from '@/lib/utils'
export interface GridStripProps {
/** stats: four boxed numbers with live bars. marquee: a scrolling row of stack names in cells. */
variant?: 'stats' | 'marquee'
/** Label cell on the left. */
label?: string
/** Comma separated names for the marquee. */
items?: string
/** Seconds per marquee loop. */
speed?: number
accent?: GridAccent
marker?: GridMarkerKind
dashed?: boolean
edges?: 'both' | 'top' | 'bottom' | 'none'
className?: string
}
const STATS: [string, string, number[]][] = [
['Blocks shipped', '24', [3, 5, 4, 6, 7, 6, 8, 9]],
['Avg. bundle', '2.1kb', [8, 7, 7, 5, 6, 4, 4, 3]],
['Lighthouse a11y', '100', [9, 9, 8, 9, 9, 9, 9, 9]],
['Setup time', '< 1 min', [6, 4, 5, 3, 3, 2, 2, 1]],
]
/** A thin band between sections: a stats row or a marquee of cells. */
export function GridStrip({
variant = 'stats',
label = 'Plays well with',
items = 'React 19, Tailwind v4, Vite, TypeScript, shadcn, Next.js, Astro, Remix',
speed = 30,
accent = 'primary',
marker = 'plus',
dashed = false,
edges = 'both',
className,
}: GridStripProps) {
const names = items
.split(',')
.map((s) => s.trim())
.filter(Boolean)
return (
<GridSection edges={edges} marker={marker} dashed={dashed} accent={accent} className={className}>
{variant === 'stats' ? (
<GridCells className="grid-cols-2 lg:grid-cols-4">
{STATS.map(([name, value, bars], i) => (
<GridCell key={name} interactive className="gap-4 px-6 py-6 sm:px-8">
<div className="flex items-center justify-between font-mono text-[10px] tracking-wider text-ds-muted uppercase">
<span>{name}</span>
<span className="tabular-nums">{String(i + 1).padStart(2, '0')}</span>
</div>
<div className="flex items-end justify-between gap-4">
<span className="font-display text-3xl font-semibold tracking-tight tabular-nums">{value}</span>
<span aria-hidden className="flex h-8 items-end gap-0.5">
{bars.map((h, j) => (
<span
key={j}
className="gf-anim w-1 origin-bottom bg-(--gf-accent)/70"
style={{ height: `${h * 11}%`, animation: `gf-grow 2.6s ${j * 0.12}s ease-in-out infinite` }}
/>
))}
</span>
</div>
</GridCell>
))}
</GridCells>
) : (
<div className="flex items-stretch">
<div className={cn('relative hidden shrink-0 items-center border-r border-(--gf-line) px-6 font-mono text-[11px] tracking-wider text-ds-muted uppercase sm:flex', dashed && 'border-dashed')}>
{label}
</div>
<div className="relative flex-1 overflow-hidden [mask-image:linear-gradient(to_right,transparent,#000_8%,#000_92%,transparent)]">
<div className="gf-anim flex w-max" style={{ animation: `gf-marquee ${speed}s linear infinite` }}>
<style>{'@keyframes gf-marquee{to{transform:translateX(-50%)}}'}</style>
{[...names, ...names].map((name, i) => (
<span
key={i}
aria-hidden={i >= names.length}
className={cn('flex h-16 items-center gap-3 border-r border-(--gf-line) px-8 font-display text-lg font-medium tracking-tight text-ds-muted', dashed && 'border-dashed')}
>
<span className="size-1.5 bg-(--gf-accent)" />
{name}
</span>
))}
</div>
</div>
</div>
)}
</GridSection>
)
}
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.