Hex · Full page
A graph-paper data product page: a header that tightens into a floating panel on scroll, a two-voice headline with inline chips, a pinned ask section with a growing chart, a context ring that turns with the scroll, integration cards, FAQ and a big outlined footer wordmark.
The workspace for data
that people actually read
BringDashboardsQuestionsandShared modelsinto one calm place.
Ask in words, get a chart you can trust
Every answer shows the query, the model it used and how sure it is, so the next person can pick it up.
“We stopped arguing about whose number was right.”
Which plans grew fastest this quarter, split by region?
› Worked for 9s · used model “plans_v3”
Business plans grew the most, mostly in the west. Here is the mix by region for each plan:
select plan, region, sum(seats) as seats from plans_v3 where quarter = 'this' group by 1, 2
Shared to #ops-weekly
Refreshes every Monday at 9:00 and flags any plan that drops.
Every answer makes the next one better
Definitions, notes and fixes from each question are kept, so the workspace learns how your team talks about its data.
Fits into the stack you already have
Runs on your warehouse
Queries go straight to where the data lives. Nothing is copied out.
Brings your definitions
Pull metrics and docs from the tools that already describe them.
Connects in a minute
Paste a connection string or sign in. Permissions carry over.
Versioned like code
Branch, review and roll back any notebook or app.
Schedules and alerts
Refresh on a timer and ping a channel when a number moves.
Open API
Trigger runs and read results from your own services.
Getting going takes minutes
Connect a source, ask a question, share what you find.
Questions
Exploring data, answering questions in plain words and turning the good answers into apps other people can use.
No. You can ask in words, and the query is always there to read or edit if you want it.
Nowhere new. Queries run in your own warehouse, with the permissions you already set.
Yes. The free plan covers small teams, and inviting people takes an email address.
Usage
Drop the file into your project, along with the shared files listed below, and import it.
import { HexLanding } from "@/registry/blocks/hex-landing";
export function Example() {
return <HexLanding />;
}Install prerequisites
Every component here relies only on Tailwind and the cn helper from shadcn/ui.
npm i clsx tailwind-mergeAlso copy these files
Hex · Full page imports these files. Keep the same paths, or update the imports to match.
'use client'
import { useRef, useState } from 'react'
import { Brackets, HexMark, useScrolled } from '@/registry/blocks/hex-kit'
import { cn } from '@/lib/utils'
export interface HexNavbarProps {
brand?: string
links?: string
announcement?: string
ctaLabel?: string
className?: string
}
/**
* Full-width bar with an announcement strip. Once the page scrolls, the strip
* folds away and the bar tightens into a floating panel with corner ticks.
*/
export function HexNavbar({
brand = 'shinUI',
links = 'Product, Solutions, Teams, Docs, Pricing',
announcement = 'Version 4 is here: shared notebooks, live apps and a new query engine',
ctaLabel = 'Start free',
className,
}: HexNavbarProps) {
const ref = useRef<HTMLDivElement>(null)
const scrolled = useScrolled(ref)
const [open, setOpen] = useState(false)
const items = links.split(',').map((s) => s.trim()).filter(Boolean)
const mid = Math.ceil(items.length / 2)
const link = (l: string) => (
<a key={l} href="#" className="rounded px-2 py-1 text-[13px] text-(--hx-dim) transition-colors hover:text-(--hx-ink)">
{l}
</a>
)
return (
<div ref={ref} className={cn('w-full', className)}>
<div
className={cn(
'grid overflow-hidden border-b border-(--hx-line) bg-(--hx-ink) text-center font-mono text-[10.5px] tracking-[0.08em] text-(--hx-bg) transition-[grid-template-rows,opacity] duration-300',
scrolled ? 'grid-rows-[0fr] opacity-0' : 'grid-rows-[1fr] opacity-100'
)}
>
<a href="#" className="min-h-0 truncate px-4 hover:underline">
<span className="inline-block py-1.5">{announcement} ↗</span>
</a>
</div>
<div className={cn('transition-[padding] duration-300', scrolled ? 'px-3 pt-3 md:px-6' : 'px-0 pt-0')}>
<header
className={cn(
'relative mx-auto flex h-14 items-center justify-between gap-4 border-(--hx-line) bg-(--hx-bg)/90 px-5 backdrop-blur transition-[max-width,border-radius,box-shadow] duration-300',
scrolled ? 'max-w-4xl rounded-md border shadow-[0_8px_30px_-16px_rgba(29,26,43,0.35)]' : 'max-w-none border-b'
)}
>
{scrolled && <Brackets className="-inset-1.5 opacity-50" />}
<nav className="hidden flex-1 items-center gap-1 md:flex">{items.slice(0, mid).map(link)}</nav>
<a href="#" className="flex items-center gap-2 text-[15px] font-semibold tracking-tight">
<HexMark className="size-6" />
{brand}
</a>
<div className="hidden flex-1 items-center justify-end gap-1 md:flex">
{items.slice(mid).map(link)}
<a href="#" className="relative ml-2 rounded-[3px] border border-(--hx-accent) bg-(--hx-accent-soft) px-3 py-1.5 text-[13px]">
{ctaLabel}
</a>
</div>
<button type="button" aria-expanded={open} aria-label="Menu" onClick={() => setOpen((o) => !o)} className="grid size-9 place-items-center rounded border border-(--hx-line) md:hidden">
<span className="block h-px w-4 bg-current shadow-[0_5px_0_currentColor,0_-5px_0_currentColor]" />
</button>
{open && (
<div className="absolute inset-x-2 top-full mt-2 flex flex-col rounded-md border border-(--hx-line) bg-(--hx-paper) p-2 md:hidden">
{items.map(link)}
</div>
)}
</header>
</div>
</div>
)
}
'use client'
import { Card, Chip, GridPaper, HexButton, Mono, Serif } from '@/registry/blocks/hex-kit'
import { cn } from '@/lib/utils'
export interface HexHeroProps {
title?: string
accent?: string
primaryLabel?: string
secondaryLabel?: string
animate?: boolean
className?: string
}
const LOGOS = ['Northwind', 'Lumen&Co', 'Parcel', 'Orbitly', 'Fernway', 'Quarry', 'Tidepool', 'Halcyon', 'Brightline', 'Mosaic', 'Kettle', 'Vantage']
const I = {
chart: <svg viewBox="0 0 12 12" className="size-[0.7em]"><path d="M2 10V6M6 10V2M10 10V7" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" /></svg>,
chat: <svg viewBox="0 0 12 12" className="size-[0.7em]"><path d="M2 3h8v5H5l-3 2z" fill="none" stroke="currentColor" strokeWidth="1.4" strokeLinejoin="round" /></svg>,
link: <svg viewBox="0 0 12 12" className="size-[0.7em]"><circle cx="3" cy="6" r="1.6" fill="currentColor" /><circle cx="9" cy="3" r="1.6" fill="currentColor" /><circle cx="9" cy="9" r="1.6" fill="currentColor" /><path d="M3 6l6-3M3 6l6 3" stroke="currentColor" strokeWidth="1" /></svg>,
}
function Sparkle({ animate }: { animate: boolean }) {
return (
<svg viewBox="0 0 40 40" aria-hidden className="absolute -top-6 -right-8 size-10 text-(--hx-accent)">
{[0, 45, 90, 135, 180, 225, 270, 315].map((a, i) => (
<line key={a} x1="20" y1="6" x2="20" y2="12" stroke="currentColor" strokeWidth="1.6" strokeLinecap="round" transform={`rotate(${a} 20 20)`}
style={animate ? { animation: `hx-twinkle 2.4s ${i * 0.15}s ease-in-out infinite` } : undefined} />
))}
</svg>
)
}
/** Big two-voice headline (sans plus italic serif), a sentence of inline chips, two buttons and a logo wall. */
export function HexHero({
title = 'The workspace for data',
accent = 'that people actually read',
primaryLabel = 'Start for free',
secondaryLabel = 'Book a walkthrough',
animate = true,
className,
}: HexHeroProps) {
return (
<section className={cn('relative isolate overflow-hidden px-6 pt-28 pb-16 md:pt-36', className)}>
<GridPaper />
<div className="relative mx-auto max-w-4xl text-center" style={animate ? { animation: 'hx-rise .8s ease-out both' } : undefined}>
<h1 className="text-[clamp(2.6rem,7vw,5.2rem)] leading-[0.98] font-semibold tracking-[-0.045em]">
<span className="relative inline-block">
{title}
<Sparkle animate={animate} />
</span>
<br />
<Serif className="text-[1.04em]">{accent}</Serif>
</h1>
<p className="mx-auto mt-8 max-w-2xl text-[clamp(1rem,1.8vw,1.3rem)] leading-[2] text-(--hx-dim)">
Bring
<Chip icon={I.chart}>Dashboards</Chip>
<Chip icon={I.chat} tint="var(--hx-accent)">Questions</Chip>
and
<Chip icon={I.link} tint="var(--hx-mint)">Shared models</Chip>
into one calm place.
</p>
<div className="mt-8 flex flex-wrap justify-center gap-3">
<HexButton>{primaryLabel}</HexButton>
<HexButton variant="ghost">{secondaryLabel}</HexButton>
</div>
</div>
<div className="relative mx-auto mt-16 max-w-5xl">
<div className="mb-5 flex items-center justify-center gap-3 text-(--hx-faint)">
<span className="h-px w-10 bg-current" />
<Mono>Used by curious teams</Mono>
<span className="h-px w-10 bg-current" />
</div>
<Card className="grid grid-cols-3 gap-px overflow-hidden bg-(--hx-line) md:grid-cols-6">
{LOGOS.map((l, i) => (
<span key={l} className="grid h-14 place-items-center bg-(--hx-paper) text-[15px] font-semibold tracking-tight text-(--hx-dim)">
<span className={cn(i % 3 === 1 && 'font-serif italic', i % 4 === 2 && 'font-mono text-[12px] uppercase')}>{l}</span>
</span>
))}
</Card>
</div>
</section>
)
}
'use client'
import { useRef } from 'react'
import { Card, HexButton, HexMark, Mono, Serif, useInView, useScrollVar } from '@/registry/blocks/hex-kit'
import { cn } from '@/lib/utils'
export interface HexAgentProps {
heading?: string
question?: string
ctaLabel?: string
animate?: boolean
className?: string
}
const ROWS: [string, number, number, number][] = [
['Starter', 48, 30, 22],
['Team', 56, 26, 18],
['Studio', 41, 35, 24],
['Business', 62, 22, 16],
['Enterprise', 52, 31, 17],
]
const FLOATERS = [
{ x: '6%', y: '18%', s: 120, k: '?' },
{ x: '88%', y: '10%', s: -90, k: '◇' },
{ x: '78%', y: '82%', s: 160, k: '∑' },
{ x: '14%', y: '88%', s: -140, k: '#' },
]
/**
* Text column stays pinned on wide screens while a notebook card answers a
* question; the bars grow in when the chart is first seen, and small glyphs
* drift at different speeds as the section crosses the screen.
*/
export function HexAgent({
heading = 'Ask in words, get a chart you can trust',
question = 'Which plans grew fastest this quarter, split by region?',
ctaLabel = 'See how answers work',
animate = true,
className,
}: HexAgentProps) {
const ref = useRef<HTMLElement>(null)
useScrollVar(ref, { name: '--hx-drift' })
const [chartRef, seen] = useInView<HTMLDivElement>(0.35)
const grow = seen || !animate
return (
<section ref={ref} className={cn('relative isolate overflow-clip px-6 py-24', className)}>
{FLOATERS.map((f) => (
<span
key={f.k}
aria-hidden
className="hx-move absolute grid size-10 place-items-center rounded-full border border-(--hx-line) bg-(--hx-paper) font-mono text-sm text-(--hx-faint)"
style={{ left: f.x, top: f.y, transform: `translateY(calc((var(--hx-drift, 0.5) - 0.5) * ${f.s}px))` }}
>
{f.k}
</span>
))}
<div className="relative mx-auto grid max-w-6xl gap-12 md:grid-cols-[minmax(0,5fr)_minmax(0,7fr)]">
<div className="self-start md:sticky md:top-24">
<Mono className="text-(--hx-accent)">Ask</Mono>
<h2 className="mt-3 text-[clamp(1.9rem,3.6vw,2.8rem)] leading-[1.05] font-semibold tracking-[-0.035em]">
{heading.split(' ').slice(0, -2).join(' ')} <Serif>{heading.split(' ').slice(-2).join(' ')}</Serif>
</h2>
<p className="mt-5 max-w-sm text-[15px] leading-relaxed text-(--hx-dim)">
Every answer shows the query, the model it used and how sure it is, so the next person can pick it up.
</p>
<HexButton className="mt-7">{ctaLabel}</HexButton>
<blockquote className="mt-10 max-w-sm border-l-2 border-(--hx-accent) pl-4 text-[14px] leading-relaxed text-(--hx-dim)">
“We stopped arguing about whose number was right.”
<footer className="mt-2 font-mono text-[11px] text-(--hx-faint)">Ops lead, a logistics team</footer>
</blockquote>
</div>
<div className="flex flex-col gap-6">
<Card className="overflow-hidden">
<div className="flex items-center gap-3 border-b border-(--hx-line) px-4 py-2.5 text-[12px]">
<HexMark className="size-4" />
<span className="truncate font-medium">Quarterly plan review</span>
<span className="ml-auto flex gap-1">
{['Ask', 'Notebook', 'App'].map((t, i) => (
<span key={t} className={cn('rounded px-2 py-0.5', i === 0 ? 'bg-(--hx-violet)/10 text-(--hx-violet)' : 'text-(--hx-faint)')}>{t}</span>
))}
</span>
</div>
<div className="space-y-4 p-5 text-[13.5px] leading-relaxed">
<p className="ml-auto max-w-[85%] rounded-md bg-(--hx-violet)/8 px-3 py-2 text-(--hx-violet)">{question}</p>
<p className="font-mono text-[11px] text-(--hx-faint)">› Worked for 9s · used model “plans_v3”</p>
<p className="text-(--hx-dim)">Business plans grew the most, mostly in the west. Here is the mix by region for each plan:</p>
<div ref={chartRef} className="rounded border border-(--hx-line) p-4">
<div className="mb-3 flex items-center gap-4 font-mono text-[10px] text-(--hx-faint)">
{['West', 'Central', 'East'].map((r, i) => (
<span key={r} className="flex items-center gap-1.5">
<span className="size-2 rounded-sm" style={{ background: `var(--hx-violet${i ? `-${i + 1}` : ''})` }} />
{r}
</span>
))}
</div>
<div className="space-y-2.5">
{ROWS.map(([name, a, b, c], i) => (
<div key={name} className="grid grid-cols-[72px_1fr] items-center gap-3 text-[11.5px] text-(--hx-dim)">
<span className="truncate">{name}</span>
<span className="flex h-4 overflow-hidden rounded-[2px]">
{[a, b, c].map((w, j) => (
<span
key={j}
className="h-full transition-[width] duration-700 ease-out"
style={{ width: grow ? `${w}%` : '0%', transitionDelay: `${i * 80 + j * 60}ms`, background: `var(--hx-violet${j ? `-${j + 1}` : ''})` }}
/>
))}
</span>
</div>
))}
</div>
</div>
</div>
</Card>
<Card className="overflow-hidden">
<div className="flex items-center justify-between border-b border-(--hx-line) px-4 py-2.5">
<Mono className="text-(--hx-faint)">Query</Mono>
<Mono className="text-(--hx-mint)">Checked</Mono>
</div>
<pre className="overflow-x-auto p-5 font-mono text-[12px] leading-relaxed text-(--hx-dim)">
<span className="text-(--hx-violet)">select</span> plan, region, <span className="text-(--hx-violet)">sum</span>(seats) <span className="text-(--hx-violet)">as</span> seats{'\n'}
<span className="text-(--hx-violet)">from</span> plans_v3{'\n'}
<span className="text-(--hx-violet)">where</span> quarter = <span className="text-(--hx-accent)">'this'</span>{'\n'}
<span className="text-(--hx-violet)">group by</span> 1, 2
</pre>
</Card>
<Card className="flex items-center gap-4 p-5">
<span className="grid size-10 shrink-0 place-items-center rounded-full bg-(--hx-accent-soft) font-mono text-sm text-(--hx-accent)">#</span>
<div className="min-w-0 text-[13.5px]">
<p className="font-medium">Shared to #ops-weekly</p>
<p className="truncate text-(--hx-dim)">Refreshes every Monday at 9:00 and flags any plan that drops.</p>
</div>
</Card>
</div>
</div>
</section>
)
}
'use client'
import { useRef } from 'react'
import { HexButton, Mono, useScrollVar } from '@/registry/blocks/hex-kit'
import { cn } from '@/lib/utils'
export interface HexOrbitProps {
heading?: string
center?: string
steps?: string
ctaLabel?: string
className?: string
}
const ICONS = [
<path key="a" d="M6 8h14v9H11l-5 4z" />,
<path key="b" d="M13 5 22 10 13 15 4 10zM4 14l9 5 9-5" />,
<path key="c" d="M8 13l3 3 6-7M13 4a9 9 0 1 0 0.01 0" />,
]
/**
* A ring of three stations that turns as the section scrolls by; the
* stations counter-rotate so their labels stay upright.
*/
export function HexOrbit({
heading = 'Every answer makes the next one better',
center = 'Shared memory',
steps = 'Ask and build, Refine the model, Catch the gaps',
ctaLabel = 'How the memory works',
className,
}: HexOrbitProps) {
const ref = useRef<HTMLElement>(null)
useScrollVar(ref, { name: '--hx-turn' })
const labels = steps.split(',').map((s) => s.trim()).slice(0, 3)
const rot = 'calc((var(--hx-turn, 0.5) - 0.5) * 220deg)'
return (
<section ref={ref} className={cn('relative px-6 py-24', className)}>
<div className="mx-auto grid max-w-6xl items-center gap-14 md:grid-cols-2">
<div className="relative mx-auto aspect-square w-full max-w-[420px]">
<svg viewBox="0 0 100 100" aria-hidden className="absolute inset-0 size-full text-(--hx-line)">
<circle cx="50" cy="50" r="47" fill="none" stroke="currentColor" strokeWidth="0.4" strokeDasharray="1 1.6" />
</svg>
<div
className="absolute inset-[16%] grid place-items-center rounded-full border border-(--hx-line) bg-(--hx-paper) text-center text-lg font-semibold tracking-tight shadow-[inset_0_0_40px_rgba(29,26,43,0.05)]"
style={{ backgroundImage: 'radial-gradient(var(--hx-line) 0.8px, transparent 0.8px)', backgroundSize: '9px 9px' }}
>
<span className="rounded bg-(--hx-paper) px-2">{center}</span>
</div>
<div className="hx-move absolute inset-0" style={{ transform: `rotate(${rot})` }}>
{labels.map((l, i) => {
const a = (i / labels.length) * Math.PI * 2 - Math.PI / 2
return (
<div
key={l}
className="absolute size-[28%] -translate-x-1/2 -translate-y-1/2"
style={{ left: `${50 + Math.cos(a) * 40}%`, top: `${50 + Math.sin(a) * 40}%` }}
>
<div className="hx-move grid size-full place-items-center rounded-full border border-(--hx-line) bg-(--hx-paper) shadow-[0_10px_24px_-14px_rgba(29,26,43,0.4)]" style={{ transform: `rotate(calc(-1 * ${rot}))` }}>
<svg viewBox="0 0 26 26" className="size-7 text-(--hx-ink)" fill="none" stroke="currentColor" strokeWidth="1.4" strokeLinejoin="round" strokeLinecap="round">
{ICONS[i]}
</svg>
<Mono className="absolute bottom-[16%] text-[8px] text-(--hx-dim)">{l}</Mono>
<span className="absolute top-[18%] right-[18%] size-2 rounded-full bg-(--hx-mint)" />
</div>
</div>
)
})}
</div>
</div>
<div>
<Mono className="text-(--hx-accent)">Context</Mono>
<h2 className="mt-3 max-w-md text-[clamp(1.9rem,3.6vw,2.8rem)] leading-[1.05] font-semibold tracking-[-0.035em]">{heading}</h2>
<p className="mt-5 max-w-md text-[15px] leading-relaxed text-(--hx-dim)">
Definitions, notes and fixes from each question are kept, so the workspace learns how your team talks about its data.
</p>
<HexButton className="mt-7">{ctaLabel}</HexButton>
</div>
</div>
</section>
)
}
import { Card, Mono, Serif } from '@/registry/blocks/hex-kit'
import { cn } from '@/lib/utils'
export interface HexIntegrationsProps {
heading?: string
accent?: string
className?: string
}
const ITEMS: [string, string, 'stack' | 'tags' | 'plug' | 'git' | 'flow' | 'api'][] = [
['Runs on your warehouse', 'Queries go straight to where the data lives. Nothing is copied out.', 'stack'],
['Brings your definitions', 'Pull metrics and docs from the tools that already describe them.', 'tags'],
['Connects in a minute', 'Paste a connection string or sign in. Permissions carry over.', 'plug'],
['Versioned like code', 'Branch, review and roll back any notebook or app.', 'git'],
['Schedules and alerts', 'Refresh on a timer and ping a channel when a number moves.', 'flow'],
['Open API', 'Trigger runs and read results from your own services.', 'api'],
]
function Glyph({ k }: { k: (typeof ITEMS)[number][2] }) {
const s = { fill: 'none', stroke: 'currentColor', strokeWidth: 1.3, strokeLinecap: 'round', strokeLinejoin: 'round' } as const
const g = {
stack: <><ellipse cx="40" cy="14" rx="16" ry="5" {...s} /><path d="M24 14v20c0 3 7 5 16 5s16-2 16-5V14M24 24c0 3 7 5 16 5s16-2 16-5" {...s} /></>,
tags: <><rect x="12" y="10" width="26" height="12" rx="6" {...s} /><rect x="42" y="10" width="26" height="12" rx="6" {...s} /><rect x="26" y="28" width="28" height="12" rx="6" {...s} /></>,
plug: <><path d="M14 25h18M48 25h18" {...s} /><rect x="32" y="17" width="16" height="16" rx="3" {...s} /><circle cx="14" cy="25" r="3" {...s} /><circle cx="66" cy="25" r="3" {...s} /></>,
git: <><circle cx="22" cy="12" r="3.5" {...s} /><circle cx="22" cy="38" r="3.5" {...s} /><circle cx="56" cy="20" r="3.5" {...s} /><path d="M22 15.5v19M56 23.5c0 9-34 4-34 11" {...s} /></>,
flow: <><rect x="8" y="18" width="18" height="14" rx="2" {...s} /><rect x="54" y="8" width="18" height="12" rx="2" {...s} /><rect x="54" y="30" width="18" height="12" rx="2" {...s} /><path d="M26 25h12M38 25V14h16M38 25v11h16" {...s} /></>,
api: <><path d="M20 14l-8 11 8 11M60 14l8 11-8 11M46 10 34 40" {...s} /></>,
}[k]
return <svg viewBox="0 0 80 50" aria-hidden className="h-14 w-24 text-(--hx-violet)">{g}</svg>
}
/** Six even cards, each with a small line drawing above a title and a line of copy. */
export function HexIntegrations({ heading = 'Fits into the stack', accent = 'you already have', className }: HexIntegrationsProps) {
return (
<section className={cn('px-6 py-24', className)}>
<div className="mx-auto max-w-6xl">
<div className="text-center">
<Mono className="text-(--hx-faint)">Integrations</Mono>
<h2 className="mt-3 text-[clamp(2rem,4.4vw,3.4rem)] leading-[1.02] font-semibold tracking-[-0.04em]">
{heading} <Serif>{accent}</Serif>
</h2>
</div>
<div className="mt-12 grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
{ITEMS.map(([t, d, k]) => (
<Card key={t} className="group p-5 transition-transform duration-300 hover:-translate-y-0.5">
<div className="grid h-28 place-items-center rounded border border-dashed border-(--hx-line) bg-(--hx-bg)">
<Glyph k={k} />
</div>
<h3 className="mt-4 text-[15px] font-semibold tracking-tight">{t}</h3>
<p className="mt-1.5 text-[13.5px] leading-relaxed text-(--hx-dim)">{d}</p>
</Card>
))}
</div>
</div>
</section>
)
}
'use client'
import { useState } from 'react'
import { HexButton, Serif } from '@/registry/blocks/hex-kit'
import { cn } from '@/lib/utils'
export interface HexFaqProps {
heading?: string
className?: string
}
const QA: [string, string][] = [
['What is this for?', 'Exploring data, answering questions in plain words and turning the good answers into apps other people can use.'],
['Do I need to write SQL?', 'No. You can ask in words, and the query is always there to read or edit if you want it.'],
['Where does my data go?', 'Nowhere new. Queries run in your own warehouse, with the permissions you already set.'],
['Can I try it with my team?', 'Yes. The free plan covers small teams, and inviting people takes an email address.'],
]
/** A short call to action followed by a single-open accordion. */
export function HexFaq({ heading = 'Questions', className }: HexFaqProps) {
const [open, setOpen] = useState<number | null>(0)
return (
<section className={cn('px-6 py-24', className)}>
<div className="mx-auto flex max-w-3xl flex-col items-center gap-4 rounded-md border border-(--hx-line) bg-(--hx-paper) px-6 py-10 text-center">
<h3 className="text-2xl font-semibold tracking-[-0.03em]">
Getting going <Serif>takes minutes</Serif>
</h3>
<p className="max-w-md text-[14px] text-(--hx-dim)">Connect a source, ask a question, share what you find.</p>
<HexButton>Start for free</HexButton>
</div>
<h2 className="mt-20 text-center text-[clamp(1.8rem,3.4vw,2.6rem)] font-semibold tracking-[-0.035em]">{heading}</h2>
<div className="mx-auto mt-8 max-w-2xl divide-y divide-(--hx-line) border-y border-(--hx-line)">
{QA.map(([q, a], i) => {
const on = open === i
return (
<div key={q}>
<button type="button" aria-expanded={on} onClick={() => setOpen(on ? null : i)} className="flex w-full items-center justify-between gap-4 py-4 text-left text-[15px] font-medium">
{q}
<span className={cn('grid size-6 shrink-0 place-items-center rounded-full border border-(--hx-line) text-(--hx-dim) transition-transform duration-300', on && 'rotate-45')}>+</span>
</button>
<div className={cn('grid transition-[grid-template-rows] duration-300', on ? 'grid-rows-[1fr]' : 'grid-rows-[0fr]')}>
<p className="min-h-0 overflow-hidden pr-10 text-[14px] leading-relaxed text-(--hx-dim)">
<span className="block pb-4">{a}</span>
</p>
</div>
</div>
)
})}
</div>
</section>
)
}
import { GridPaper, HexMark, Mono } from '@/registry/blocks/hex-kit'
import { cn } from '@/lib/utils'
export interface HexFooterProps {
brand?: string
className?: string
}
const COLS: [string, string[]][] = [
['Product', ['Notebooks', 'Ask', 'Apps', 'Models', 'Changelog']],
['Teams', ['Analysts', 'Product', 'Finance', 'Operations']],
['Learn', ['Docs', 'Guides', 'Templates', 'Community']],
['Company', ['About', 'Careers', 'Security', 'Contact']],
]
/** Brand cell, four link columns and a huge faded wordmark over graph paper. */
export function HexFooter({ brand = 'shinUI', className }: HexFooterProps) {
return (
<footer className={cn('relative isolate overflow-hidden border-t border-(--hx-line) px-6 pt-16', className)}>
<GridPaper />
<div className="relative mx-auto grid max-w-6xl gap-10 md:grid-cols-[1.3fr_repeat(4,1fr)]">
<div>
<a href="#" className="flex items-center gap-2 text-lg font-semibold tracking-tight">
<HexMark /> {brand}
</a>
<p className="mt-3 max-w-[220px] text-[13px] leading-relaxed text-(--hx-dim)">A calmer place to work with data, together.</p>
<span className="mt-5 inline-flex items-center gap-2 rounded-full border border-(--hx-line) bg-(--hx-paper) px-3 py-1 text-[11px] text-(--hx-dim)">
<span className="size-1.5 rounded-full bg-(--hx-mint)" /> All systems normal
</span>
</div>
{COLS.map(([h, ls]) => (
<div key={h}>
<Mono className="text-(--hx-faint)">{h}</Mono>
<ul className="mt-4 space-y-2.5">
{ls.map((l) => (
<li key={l}>
<a href="#" className="text-[13.5px] text-(--hx-dim) transition-colors hover:text-(--hx-ink)">{l}</a>
</li>
))}
</ul>
</div>
))}
</div>
<div aria-hidden className="relative mt-16 text-center text-[clamp(5rem,19vw,15rem)] leading-[0.8] font-semibold tracking-[-0.06em] text-transparent select-none" style={{ WebkitTextStroke: '1px var(--hx-line)' }}>
{brand}
</div>
<div className="relative mx-auto flex max-w-6xl flex-wrap justify-between gap-3 border-t border-(--hx-line) py-5 font-mono text-[11px] text-(--hx-faint)">
<span>© 2026 {brand}</span>
<span className="flex gap-5">
<a href="#">Privacy</a>
<a href="#">Terms</a>
<a href="#">Status</a>
</span>
</div>
</footer>
)
}
'use client'
import { useEffect, useRef, useState, type ComponentProps, type ReactNode, type RefObject } from 'react'
import { cn } from '@/lib/utils'
/** Hex palette. Every colour lives in a --hx-* var so a theme can override it. */
const VARS = {
'--hx-bg': '#f4f1ec',
'--hx-paper': '#fbfaf7',
'--hx-ink': '#1d1a2b',
'--hx-dim': '#5d5869',
'--hx-faint': '#9a95a3',
'--hx-line': '#e2ddd5',
'--hx-grid': 'rgba(29,26,43,0.045)',
'--hx-accent': '#d9727b',
'--hx-accent-soft': '#f7e3e3',
'--hx-violet': '#6e62c9',
'--hx-violet-2': '#9a90e0',
'--hx-violet-3': '#c9c3f0',
'--hx-mint': '#4fb38a',
} as React.CSSProperties
const KEYFRAMES = `
@keyframes hx-spin { to { transform: rotate(360deg) } }
@keyframes hx-twinkle { 0%,100% { opacity: .25 } 50% { opacity: 1 } }
@keyframes hx-rise { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }
@media (prefers-reduced-motion: reduce) {
.hx-anim, .hx-anim * { animation: none !important; transition: none !important }
.hx-move { transform: none !important }
}`
export function HexRoot({ className, style, children, ...rest }: ComponentProps<'div'>) {
return (
<div
className={cn('hx-anim bg-(--hx-bg) font-sans text-(--hx-ink) antialiased', className)}
style={{ ...VARS, ...style }}
{...rest}
>
<style>{KEYFRAMES}</style>
{children}
</div>
)
}
/** Faint square grid, like graph paper. */
export function GridPaper({ className, size = 22 }: { className?: string; size?: number }) {
return (
<div
aria-hidden
className={cn('pointer-events-none absolute inset-0', className)}
style={{
backgroundImage: 'linear-gradient(var(--hx-grid) 1px, transparent 1px), linear-gradient(90deg, var(--hx-grid) 1px, transparent 1px)',
backgroundSize: `${size}px ${size}px`,
}}
/>
)
}
export function Mono({ className, ...rest }: ComponentProps<'span'>) {
return <span className={cn('font-mono text-[11px] tracking-[0.14em] uppercase', className)} {...rest} />
}
/** Italic serif accent used inside headlines. */
export function Serif({ className, ...rest }: ComponentProps<'span'>) {
return <span className={cn('font-serif font-normal italic tracking-[-0.02em]', className)} {...rest} />
}
/** Original mark: three stacked offset bars inside a rounded hexagon. */
export function HexMark({ className }: { className?: string }) {
return (
<svg viewBox="0 0 32 32" aria-hidden className={cn('size-7', className)}>
<path d="M16 2.5 28 9.25v13.5L16 29.5 4 22.75V9.25z" fill="none" stroke="currentColor" strokeWidth="2.2" strokeLinejoin="round" />
<path d="M10 12.5h9M12.5 16h9M10 19.5h9" stroke="currentColor" strokeWidth="2.2" strokeLinecap="round" />
</svg>
)
}
/** Small corner ticks around a box. */
export function Brackets({ className }: { className?: string }) {
const c = 'absolute size-1.5 border-(--hx-accent)'
return (
<span aria-hidden className={cn('pointer-events-none absolute -inset-1', className)}>
<span className={cn(c, 'top-0 left-0 border-t border-l')} />
<span className={cn(c, 'top-0 right-0 border-t border-r')} />
<span className={cn(c, 'bottom-0 left-0 border-b border-l')} />
<span className={cn(c, 'right-0 bottom-0 border-r border-b')} />
</span>
)
}
export function HexButton({ variant = 'primary', className, children, ...rest }: ComponentProps<'button'> & { variant?: 'primary' | 'ghost' }) {
return (
<button
type="button"
className={cn(
'group relative inline-flex h-10 items-center rounded-[3px] border px-4 text-[13px] transition-colors focus-visible:outline-2 focus-visible:outline-(--hx-violet)',
variant === 'primary'
? 'border-(--hx-accent) bg-(--hx-accent-soft) text-(--hx-ink) hover:bg-[#f2d2d3]'
: 'border-(--hx-line) bg-(--hx-paper) text-(--hx-ink) hover:border-(--hx-faint)',
className
)}
{...rest}
>
{variant === 'primary' && <Brackets className="opacity-60 transition-opacity group-hover:opacity-100" />}
{children}
</button>
)
}
/** Inline rounded chip with a tinted icon well. */
export function Chip({ icon, tint = 'var(--hx-violet)', children }: { icon: ReactNode; tint?: string; children: ReactNode }) {
return (
<span className="mx-1 inline-flex translate-y-[-2px] items-center gap-1.5 rounded-full border border-(--hx-line) bg-(--hx-paper) py-0.5 pr-3 pl-1 align-middle text-[0.8em] shadow-[0_1px_0_rgba(0,0,0,0.04)]">
<span className="grid size-[1.4em] place-items-center rounded-full" style={{ background: `color-mix(in oklab, ${tint} 16%, transparent)`, color: tint }}>
{icon}
</span>
{children}
</span>
)
}
/** Paper card with a soft edge. */
export function Card({ className, ...rest }: ComponentProps<'div'>) {
return <div className={cn('rounded-md border border-(--hx-line) bg-(--hx-paper) shadow-[0_1px_2px_rgba(29,26,43,0.05),0_12px_30px_-18px_rgba(29,26,43,0.25)]', className)} {...rest} />
}
function scrollParent(el: HTMLElement) {
let sp: HTMLElement | null = el.parentElement
while (sp && !/(auto|scroll)/.test(getComputedStyle(sp).overflowY)) sp = sp.parentElement
return sp
}
/**
* Writes scroll progress (0–1) to a CSS var on the element.
* 'cross' runs from the element entering the bottom of the scroller to leaving the top;
* 'through' runs while a tall element scrolls past a pinned child.
* Works inside any scrolling ancestor, falling back to the window.
*/
export function useScrollVar<T extends HTMLElement>(ref: RefObject<T | null>, { name = '--hx-p', mode = 'cross' }: { name?: string; mode?: 'cross' | 'through' } = {}) {
useEffect(() => {
const el = ref.current
if (!el) return
const sp = scrollParent(el)
const target: HTMLElement | Window = sp ?? window
let raf = 0
const update = () => {
raf = 0
const top = sp ? sp.getBoundingClientRect().top : 0
const vh = sp ? sp.clientHeight : window.innerHeight
const r = el.getBoundingClientRect()
const rel = r.top - top
const p = mode === 'cross' ? (vh - rel) / (vh + r.height) : r.height > vh ? -rel / (r.height - vh) : 0
el.style.setProperty(name, Math.min(1, Math.max(0, p)).toFixed(4))
}
const queue = () => {
if (!raf) raf = requestAnimationFrame(update)
}
queue()
target.addEventListener('scroll', queue, { passive: true })
window.addEventListener('resize', queue)
return () => {
cancelAnimationFrame(raf)
target.removeEventListener('scroll', queue)
window.removeEventListener('resize', queue)
}
}, [ref, name, mode])
}
/** True once the scroller (or window) has moved past `threshold` px. */
export function useScrolled<T extends HTMLElement>(ref: RefObject<T | null>, threshold = 24) {
const [scrolled, setScrolled] = useState(false)
useEffect(() => {
const el = ref.current
if (!el) return
const sp = scrollParent(el)
const target: HTMLElement | Window = sp ?? window
let raf = 0
const update = () => {
raf = 0
setScrolled((sp ? sp.scrollTop : window.scrollY) > threshold)
}
const queue = () => {
if (!raf) raf = requestAnimationFrame(update)
}
queue()
target.addEventListener('scroll', queue, { passive: true })
return () => {
cancelAnimationFrame(raf)
target.removeEventListener('scroll', queue)
}
}, [ref, threshold])
return scrolled
}
/** True once the element has come into view (stays true). */
export function useInView<T extends HTMLElement>(threshold = 0.3) {
const ref = useRef<T>(null)
const [seen, setSeen] = useState(false)
useEffect(() => {
const el = ref.current
if (!el || seen) return
const io = new IntersectionObserver(([e]) => e.isIntersecting && setSeen(true), { threshold })
io.observe(el)
return () => io.disconnect()
}, [seen, threshold])
return [ref, seen] as const
}
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.