Late Kitchen Visit Us
Restaurant contact section with opening hours, an address, a walk-in note and menu and directions links beside a pink neon OPEN sign on dark linen. Stacks on smaller screens.
import { Eyebrow } from "@/components/eyebrow/eyebrow"
import { NeonSign } from "@/components/glow/neon-sign"
import {
Section,
SectionContent,
} from "@/components/section/section"
import { Subheading } from "@/components/subheading/subheading"
import { Text } from "@/components/text/text"
import { Linen } from "@/components/texture/linen"
import { buttonVariants } from "@/components/ui/button"
// The copy: change text here, not in the markup.
const COPY = {
name: "The late kitchen",
title: "Good food until one.",
description: "Dinner, drinks and a place to stay a little longer.",
hoursLabel: "Opening hours",
addressLabel: "Find us",
address: ["142 Orchard Street", "Lower East Side, New York"],
note: "Walk-ins welcome. For groups of six or more, please reserve ahead.",
menuLabel: "View menu",
menuHref: "#",
directionsLabel: "Get directions",
directionsHref: "#",
sign: "OPEN",
} as const
const HOURS = [
{ days: "Tuesday–Thursday", hours: "6 pm–1 am" },
{ days: "Friday–Saturday", hours: "5 pm–1 am" },
{ days: "Sunday–Monday", hours: "Closed" },
] as const
/** Restaurant hours and location beside a pink neon sign on dark linen. */
export default function LateKitchenVisitUs() {
return (
<Section size="sm">
<SectionContent className="max-w-6xl items-stretch gap-8 lg:grid lg:grid-cols-2 lg:gap-16">
<div
aria-hidden="true"
data-slot="restaurant-sign"
className="dark relative isolate flex min-h-80 items-center justify-center overflow-hidden rounded-xl bg-[oklch(0.16_0.012_340)] p-6 text-[oklch(0.91_0.025_340)] sm:min-h-96 lg:min-h-[32rem]"
>
<Linen intensity="rich" />
<div className="relative flex w-full max-w-80 flex-col items-center rounded-[50%] border-2 border-[oklch(0.66_0.12_355/0.6)] px-4 py-12 shadow-[0_0_30px_oklch(0.65_0.16_355/0.12)]">
<NeonSign
size="md"
color="oklch(0.80 0.14 355)"
glowColor="oklch(0.57 0.20 335)"
className="text-4xl tracking-[0.16em]"
>
{COPY.sign}
</NeonSign>
<Eyebrow
variant="mono"
className="mt-5 text-center tracking-[0.2em] text-current"
>
{COPY.name}
</Eyebrow>
</div>
</div>
<div className="flex min-w-0 flex-col justify-center gap-8 py-2 lg:py-8">
<header className="grid gap-6">
<div className="grid gap-2">
<Eyebrow variant="mono" className="text-muted-foreground">
{COPY.name}
</Eyebrow>
<Subheading>{COPY.title}</Subheading>
</div>
<Text variant="muted" className="max-w-sm">
{COPY.description}
</Text>
</header>
<div className="grid gap-6 border-y border-border py-6 sm:grid-cols-2">
<div className="grid content-start gap-3">
<Eyebrow>{COPY.hoursLabel}</Eyebrow>
<dl className="grid gap-2 text-sm/6">
{HOURS.map(({ days, hours }) => (
<div
key={days}
className="flex flex-wrap justify-between gap-x-4"
>
<dt className="text-muted-foreground">{days}</dt>
<dd className="tabular-nums">{hours}</dd>
</div>
))}
</dl>
</div>
<div className="grid content-start gap-3">
<Eyebrow>{COPY.addressLabel}</Eyebrow>
<address className="text-sm/6 text-muted-foreground not-italic">
{COPY.address.map((line) => (
<span key={line} className="block">
{line}
</span>
))}
</address>
</div>
</div>
<div className="grid gap-6">
<Text variant="muted" className="max-w-sm text-sm/6">
{COPY.note}
</Text>
<div className="flex flex-wrap gap-3">
<a href={COPY.menuHref} className={buttonVariants()}>
{COPY.menuLabel}
</a>
<a
href={COPY.directionsHref}
className={buttonVariants({ variant: "outline" })}
>
{COPY.directionsLabel}
</a>
</div>
</div>
</div>
</SectionContent>
</Section>
)
}
import { mergeProps } from "@base-ui/react/merge-props"
import { useRender } from "@base-ui/react/use-render"
import { cva, type VariantProps } from "class-variance-authority"
import { cn } from "cn"
const eyebrowVariants = cva("text-eyebrow", {
variants: {
/**
* `default` is a 14px/20px label. `icon` adds a row with a 16px icon
* and a 12px gap; put the icon first and give it `aria-hidden`.
* `mono` and `caps` are 12px/20px uppercase labels with 0.12em
* tracking, in the mono and inherited faces respectively.
*/
variant: {
default: "text-sm/5 font-medium text-eyebrow",
icon: "flex items-center gap-3 text-sm/5 font-medium [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
mono: "font-mono text-xs/5 font-medium tracking-[0.12em] uppercase",
caps: "text-xs/5 font-medium tracking-[0.12em] uppercase",
},
},
defaultVariants: { variant: "default" },
})
/**
* A short label above a heading, rendered as a `<p>` at weight 500.
* The default is 14px/20px in the kit's eyebrow color. The surrounding
* layout controls the space to the heading. Use `className` to customize
* the typography or color, and `render` to change the element.
*/
function Eyebrow({
className,
variant = "default",
render,
...props
}: useRender.ComponentProps<"p"> & VariantProps<typeof eyebrowVariants>) {
return useRender({
defaultTagName: "p",
render,
state: { slot: "eyebrow", variant },
props: mergeProps<"p">(
{ className: cn(eyebrowVariants({ variant }), className) },
props
),
})
}
export { Eyebrow, eyebrowVariants }
import { cn } from "cn"
type Intensity = "fine" | "default" | "rich"
// One scale for every texture; `default` is the unscaled value.
const INTENSITY_MULT: Record<Intensity, number> = {
fine: 0.6,
default: 1,
rich: 1.45,
}
const alpha = (base: number, mult: number) => (base * mult).toFixed(4)
// Two-direction weave — 1px threads at 0°+90°. 5px and 6px are the thread
// PERIODS, not gaps, and they are coprime, so the weave repeats every 30px.
/** Full-bleed art layer — drop inside a `relative` parent; sits behind content. */
function Linen({
intensity = "default",
className,
...props
}: React.ComponentProps<"div"> & {
/**
* Thread alpha multiplier. Ink is white; set --linen-color on a light ground.
*/
intensity?: Intensity
}) {
const m = INTENSITY_MULT[intensity]
return (
<div
className={cn("pointer-events-none absolute inset-0", className)}
aria-hidden="true"
data-slot="linen"
{...props}
>
<div
className="absolute inset-0"
style={{
backgroundImage: `repeating-linear-gradient(90deg in srgb, transparent 0px, transparent 2px, oklch(from var(--linen-color, oklch(1 0 0)) l c h / ${alpha(0.05, m)}) 2px, oklch(from var(--linen-color, oklch(1 0 0)) l c h / ${alpha(0.02, m)}) 3px, transparent 3px, transparent 6px), repeating-linear-gradient(0deg in srgb, transparent 0px, transparent 2px, oklch(from var(--linen-color, oklch(1 0 0)) l c h / ${alpha(0.06, m)}) 2px, oklch(from var(--linen-color, oklch(1 0 0)) l c h / ${alpha(0.02, m)}) 3px, transparent 3px, transparent 5px)`,
}}
/>
</div>
)
}
export { Linen }
"use client"
import * as React from "react"
import { cva, type VariantProps } from "class-variance-authority"
import { cn } from "cn"
// NeonSign is the tube (color, glow, size, dimmer, whole-sign flicker);
// NeonLetter flickers one letter on its own rhythm or burns it out. Every
// flicker is opt-in: a sign and its letters burn steady until asked.
// Dimming is opacity, so over a busy image keep intensity near 1.
const NEON_CSS = `
@keyframes neon-flicker {
0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% { opacity: 1 }
20%, 24%, 55% { opacity: 0.4 }
}
@keyframes neon-flicker-single {
0%, 19%, 21%, 100% { opacity: 1 }
20% { opacity: 0.4 }
}
[data-neon-flicker] {
animation: neon-flicker var(--neon-duration) ease-in-out var(--neon-delay, 0s) infinite;
}
[data-neon-flicker="single"] { animation-name: neon-flicker-single }
@media (prefers-reduced-motion: reduce) {
[data-neon-flicker] { animation: none }
}
`
// WCAG 2.3.1, at most three flashes a second: three dips per cycle, a letter at
// 0.7x the cycle (1.5s clamp, so 1.05s), 2.9s when the whole sign flickers too.
const MIN_CYCLE = 1.5
const MIN_CYCLE_STACKED = 2.9
// Integer hash → 0–1. Integer math is bit-identical in every JS engine,
// so server and client always agree. (Math.sin isn't guaranteed to be.)
function seeded(n: number) {
let h = Math.imul(n + 1, 0x9e3779b1)
h ^= h >>> 15
h = Math.imul(h, 0x85ebca6b)
h ^= h >>> 13
return (h >>> 0) / 4294967296
}
// The CSS above owns the animation; an element only supplies its timing.
function flickerTiming(duration: number, delay = 0) {
return {
"--neon-duration": `${duration.toFixed(2)}s`,
"--neon-delay": `${delay.toFixed(2)}s`,
} as React.CSSProperties
}
// Tracking is the tube spacing; the negative end margin cancels its trailing
// gap so the sign centers. xl is the headline of a hero.
const neonSignVariants = cva(
"relative -me-[0.2em] inline-block font-semibold tracking-[0.2em] whitespace-pre",
{
variants: {
/**
* The type size. `sm` is `text-lg`, `md` (the default) `text-3xl`, `lg`
* `text-4xl`, then `text-7xl` from the `sm` breakpoint, and `xl` scales
* with the window width from 3.5rem to 8.5rem, for a hero headline.
*/
size: {
sm: "text-lg",
md: "text-3xl",
lg: "text-4xl sm:text-7xl",
xl: "text-[clamp(3.5rem,11vw,8.5rem)]",
},
},
defaultVariants: { size: "md" },
}
)
type NeonContextValue = { cycle: number; flicker: boolean; intensity: number }
const NeonContext = React.createContext<NeonContextValue>({
cycle: 4,
flicker: false,
intensity: 1,
})
type NeonSignProps = React.ComponentProps<"span"> &
VariantProps<typeof neonSignVariants> & {
/** The tube color; any CSS color. */
color?: string
/** The color of the widest, outermost glow. Defaults to `color`. */
glowColor?: string
/**
* Flickers the whole sign. Each lit `NeonLetter` inside then adds its
* own single flicker on top.
*/
flicker?: boolean
/**
* Seconds per flicker cycle; each `NeonLetter` runs up to 30% faster or
* slower. To limit flashing it is held to at least 1.5s, or 2.9s while
* the whole sign flickers. Defaults to 4.
*/
flickerSpeed?: number
/**
* Brightness from 0 to 1. It shrinks the glow and lowers the whole sign's
* opacity, so over a busy image keep it near 1. Defaults to 1.
*/
intensity?: number
}
/**
* Text drawn as a lit neon tube, with a colored glow around each letter. Put
* plain text inside, and wrap any letter in `NeonLetter` to make it flicker
* on its own or show it burnt out.
*
* Nothing flickers unless asked: set `flicker` on the sign or on a single
* `NeonLetter`. Flickering stops when reduced motion is on. The text keeps
* its spaces and does not wrap.
*/
function NeonSign({
children,
color = "oklch(0.72 0.18 9)",
glowColor = color,
flicker = false,
flickerSpeed = 4,
intensity = 1,
size = "md",
className,
style,
...props
}: NeonSignProps) {
const cycle = Math.max(flickerSpeed, flicker ? MIN_CYCLE_STACKED : MIN_CYCLE)
// Outside 0–1 the glow radii go negative and the shadow is dropped.
const level = Math.min(1, Math.max(0, intensity))
const glow = [
`0 0 ${10 * level}px ${color}`,
`0 0 ${20 * level}px ${color}`,
`0 0 ${40 * level}px ${color}`,
`0 0 ${80 * level}px ${glowColor}`,
].join(", ")
return (
// The dimmer. whitespace-pre keeps spaces and stops mid-word wraps.
<span
data-slot="neon-sign"
data-size={size}
className={cn(neonSignVariants({ size }), className)}
style={{ opacity: level, ...style }}
{...props}
>
{/* React 19 hoists this to <head> and dedupes it by href. */}
<style href="neon-sign" precedence="default">
{NEON_CSS}
</style>
{/* The tubes: color and glow set once here and inherited by every letter. */}
<span
data-slot="neon-sign-tubes"
data-neon-flicker={flicker || undefined}
className="inline-block"
style={{
color,
textShadow: glow,
...(flicker ? flickerTiming(cycle) : {}),
}}
>
<NeonContext value={{ cycle, flicker, intensity: level }}>
{children}
</NeonContext>
</span>
</span>
)
}
/**
* One letter of a `NeonSign`. A flickering letter runs on its own timing, so
* letters don't flicker in step. The `burnt` variant shows the letter as
* faint, unlit dark glass.
*
* A letter flickers when its sign does, or on its own when you set `flicker`
* on the letter.
*/
function NeonLetter({
variant = "flicker",
flicker = false,
className,
style,
...props
}: React.ComponentProps<"span"> & {
/**
* `flicker` is a lit letter that can flicker; `burnt` is an unlit letter
* that never glows. Defaults to "flicker".
*/
variant?: "flicker" | "burnt"
/** Flickers this letter while the rest of the sign stays steady. */
flicker?: boolean
}) {
const sign = React.useContext(NeonContext)
const { cycle, intensity } = sign
const seed = hashId(React.useId())
if (variant === "burnt") {
return (
<span
data-slot="neon-letter"
data-variant="burnt"
className={cn("text-[oklch(0.4_0.01_0)] text-shadow-none", className)}
// Dark glass isn't lit, so cancel the dimmer rather than dim it twice.
style={{ opacity: Math.min(1, 0.15 / intensity), ...style }}
{...props}
/>
)
}
const duration = cycle * (0.7 + seeded(seed) * 0.6)
const delay = -seeded(seed + 1) * duration
return (
<span
data-slot="neon-letter"
data-variant="flicker"
data-neon-flicker={sign.flicker ? "single" : flicker ? "" : undefined}
className={className}
style={{ ...flickerTiming(duration, delay), ...style }}
{...props}
/>
)
}
// useId is stable between server and client; the hash turns it into a seed.
function hashId(id: string) {
let h = 0
for (let i = 0; i < id.length; i++)
h = Math.imul(h ^ id.charCodeAt(i), 0x01000193)
return h >>> 0
}
export { NeonSign, NeonLetter }
import type { ComponentProps } from "react"
import { mergeProps } from "@base-ui/react/merge-props"
import { useRender } from "@base-ui/react/use-render"
import { cva, type VariantProps } from "class-variance-authority"
import { cn } from "cn"
const sectionVariants = cva(
"relative isolate w-full bg-background wrap-anywhere text-foreground",
{
variants: {
/**
* The padding above and below, after Vercel's product pages: `sm`
* 64px, 96px from `lg`; `md` (the default) 72px, 120px from `lg`, so
* two sections sit 240px apart; `lg` 80px, 144px from `lg`. The gap
* between the children is set separately: 40px for `sm` and `md`
* (64px from `sm` for `md`), 64px for `lg`.
*/
size: {
sm: "py-16 lg:py-24",
md: "py-18 lg:py-30",
lg: "py-20 lg:py-36",
},
},
defaultVariants: { size: "md" },
}
)
const columnVariants = cva(
"mx-auto flex w-full max-w-[90.5rem] min-w-0 flex-col px-6",
{
variants: {
size: {
sm: "gap-10",
md: "gap-10 sm:gap-16",
lg: "gap-16",
},
},
defaultVariants: { size: "md" },
}
)
/**
* A page band: a full-width `<section>` on the page background, holding a
* centered column with 1400px of content and 24px sides at every width.
* Put a SectionBackground first for art behind it, then a
* SectionHeader and the band's content.
*/
function Section({
className,
size = "md",
children,
...props
}: ComponentProps<"section"> & VariantProps<typeof sectionVariants>) {
return (
<section
data-slot="section"
data-size={size}
className={cn(sectionVariants({ size }), className)}
{...props}
>
<div data-slot="section-column" className={columnVariants({ size })}>
{children}
</div>
</section>
)
}
/**
* Art behind the whole band, such as a scene or glow; hidden from assistive
* tech.
*/
function SectionBackground({ className, ...props }: ComponentProps<"div">) {
return (
<div
data-slot="section-background"
aria-hidden="true"
className={cn("pointer-events-none absolute inset-0 -z-10", className)}
{...props}
/>
)
}
const contentVariants = cva("mx-auto flex w-full min-w-0 flex-col", {
variants: {
/**
* The gap between children: `sm` 24px, `md` (the default) 32px, `lg`
* 64px.
*/
size: {
sm: "gap-6",
md: "gap-8",
lg: "gap-16",
},
/**
* The widest it gets: `sm` 42rem, `md` up to 48rem, `lg` up to 56rem,
* `xl` up to 64rem, `full` (the default) the section's own 1400px. The
* narrower widths start at 42rem and widen at `md` and `lg`.
*/
width: {
sm: "max-w-2xl",
md: "max-w-2xl md:max-w-3xl",
lg: "max-w-2xl md:max-w-3xl lg:max-w-4xl",
xl: "max-w-2xl md:max-w-3xl lg:max-w-5xl",
full: "max-w-[87.5rem]",
},
},
defaultVariants: { size: "md", width: "full" },
})
/**
* A centered column for the band's content, its children stacked with a
* gap. Pass `render` to use another element.
*/
function SectionContent({
className,
size = "md",
width = "full",
render,
...props
}: useRender.ComponentProps<"div"> & VariantProps<typeof contentVariants>) {
return useRender({
defaultTagName: "div",
render,
state: { slot: "section-content", width },
props: mergeProps<"div">(
{
className: cn(contentVariants({ size, width }), className),
},
props
),
})
}
const columnsVariants = cva(
"grid w-full max-w-2xl grid-cols-1 items-start gap-x-(--gutter) gap-y-(--row-gap) lg:max-w-none",
{
variants: {
/**
* From `lg`: `equal` (the default) two even columns; `intro` a narrower
* first column, 2:3.
*/
variant: {
equal: "lg:grid-cols-2",
intro: "lg:grid-cols-[2fr_3fr]",
},
},
defaultVariants: { variant: "equal" },
}
)
/**
* Two columns from `lg`, stacked and capped at 42rem below it, apart by the
* shared gutter and row gap.
*/
function SectionColumns({
className,
variant = "equal",
...props
}: ComponentProps<"div"> & VariantProps<typeof columnsVariants>) {
return (
<div
data-slot="section-columns"
data-variant={variant}
className={cn(columnsVariants({ variant }), className)}
{...props}
/>
)
}
const headerVariants = cva("group/section-header grid w-full min-w-0 gap-6", {
variants: {
/** The header's widest: `md` (the default) 42rem, `lg` 56rem. */
size: {
md: "max-w-2xl",
lg: "max-w-4xl",
},
/** `start` (the default) or `center`, which centers the text too. */
align: {
start: "justify-items-start",
center: "mx-auto justify-items-center text-center",
},
/**
* `stack` (the default) puts everything in one column; `split` puts
* SectionActions on the right from `sm`, level with the bottom of the
* titles, at full width. `columns` gives two children equal-width sides
* from `lg`, level at the bottom, stacked below it. Its row gap is 32px
* (40px from `md`); a standalone SectionActions on the right sits at
* the far edge. Either side can hold text, actions, or a group of both.
*/
variant: {
stack: "",
split:
"max-w-none sm:grid-cols-[1fr_auto] sm:items-end sm:*:data-[slot=section-actions]:col-start-2 sm:*:data-[slot=section-actions]:row-start-1",
columns:
"max-w-none gap-y-8 md:gap-y-10 lg:grid-cols-2 lg:items-end lg:[&>[data-slot=section-actions]:last-child]:justify-self-end",
},
},
defaultVariants: { align: "start", size: "md", variant: "stack" },
})
type SectionHeaderProps = ComponentProps<"div"> &
(
| (Omit<VariantProps<typeof headerVariants>, "variant"> & {
/** `stack` (the default) puts everything in one column. */
variant?: "stack"
})
| {
/**
* `split` puts SectionActions on the right from `sm`, level with the
* bottom of the titles, at full width; it takes no `size` or `align`.
*/
variant: "split"
size?: never
align?: never
}
| {
/**
* `columns` gives two children equal-width sides from `lg`, with a
* 24px column gap, level at the bottom, stacked below it with a
* 32px row gap (40px from `md`). A standalone SectionActions on the
* right sits at the far edge. Group a side's heading, text or
* actions in a SectionTitleGroup with `gap="lg"` for 24px within
* that side. Use `className` to customize the columns or alignment.
* It takes no `size` or `align`.
*/
variant: "columns"
size?: never
align?: never
}
)
/**
* The band's heading area, with 24px between children in `stack` and
* `split`. `columns` treats each of its two children as one side, with
* 24px between columns and 32px between rows (40px from `md`); group a
* side's heading, text and actions inside a SectionTitleGroup with
* `gap="lg"` for 24px between them.
*/
function SectionHeader({
className,
align = "start",
size = "md",
variant = "stack",
...props
}: SectionHeaderProps) {
return (
<div
data-slot="section-header"
data-align={align}
data-size={size}
data-variant={variant}
className={cn(headerVariants({ align, size, variant }), className)}
{...props}
/>
)
}
const sectionActionsVariants = cva(
"flex max-w-full flex-wrap items-center gap-4",
{
variants: {
/** `start` (the default) or `center`. */
align: {
start: "",
center: "justify-center",
},
},
defaultVariants: { align: "start" },
}
)
/** The band's buttons or links, in a row that wraps, 16px apart. */
function SectionActions({
className,
align = "start",
...props
}: ComponentProps<"div"> & VariantProps<typeof sectionActionsVariants>) {
return (
<div
data-slot="section-actions"
data-align={align}
className={cn(sectionActionsVariants({ align }), className)}
{...props}
/>
)
}
const titleGroupVariants = cva("grid w-full min-w-0", {
variants: {
/**
* `column` (the default) stacks its children; `row` sets them in two
* columns from `lg`, level at the bottom.
*/
direction: {
column: "",
row: "lg:grid-cols-2 lg:items-end lg:gap-x-(--gutter)",
},
/**
* The gap between children: `sm` (the default) 16px for a compact title
* group, `md` 20px, or `lg` 24px for a group containing body or actions.
*/
gap: {
sm: "gap-4",
md: "gap-5",
lg: "gap-6",
},
},
defaultVariants: { direction: "column", gap: "sm" },
})
/**
* A compact title group with a 16px default gap. An optional Eyebrow and
* heading can sit here, with Text following the group in SectionHeader's
* default 24px gap. Choose `gap="lg"` when body or actions belong inside
* the group and should sit 24px apart.
*/
function SectionTitleGroup({
className,
direction = "column",
gap = "sm",
...props
}: ComponentProps<"div"> & VariantProps<typeof titleGroupVariants>) {
return (
<div
data-slot="section-title-group"
data-direction={direction}
data-gap={gap}
className={cn(titleGroupVariants({ direction, gap }), className)}
{...props}
/>
)
}
export {
Section,
SectionBackground,
SectionContent,
SectionColumns,
SectionHeader,
SectionTitleGroup,
SectionActions,
}
import { mergeProps } from "@base-ui/react/merge-props"
import { useRender } from "@base-ui/react/use-render"
import { cva, type VariantProps } from "class-variance-authority"
import { cn } from "cn"
// No width of its own: the SectionHeader column (or whatever holds it) is
// the measure. text-pretty keeps a wrapped title from ending on one word.
// font-display follows font-sans unless the block switches it, for example
// with [--font-display:var(--font-serif)].
const subheadingVariants = cva(
"font-display font-[450] tracking-[-0.05em] text-pretty sm:tracking-[-0.06em]",
{
variants: {
/**
* `default` inherits the surrounding display face. `serif` uses
* the kit's serif role, without changing the surrounding font.
*/
variant: {
default: "",
serif: "[--font-display:var(--font-serif)]",
},
/**
* `md` (the default): 32px/40px, capped at 40px/44px from `sm`.
* `lg`: 32px/40px, 40px/48px from `sm`, 48px/56px from `lg`.
* `xl`: 32px/40px, 48px/56px from `sm`, 56px/56px from `lg`.
*/
size: {
md: "text-[2rem]/10 sm:text-[2.5rem]/11",
lg: "text-[2rem]/10 sm:text-[2.5rem]/12 lg:text-5xl/14",
xl: "text-[2rem]/10 sm:text-5xl/14 lg:text-[3.5rem]/14",
},
},
defaultVariants: { variant: "default", size: "md" },
}
)
/**
* The section heading in the display font, which follows `font-sans`
* unless a block switches that role. Rendered as an `<h2>` at weight 450.
* The default `size="md"` steps
* from 32px/40px to 40px/44px at `sm` and stays there. Choose `size="lg"`
* for 32px/40px, 40px/48px at `sm` and 48px/56px at `lg`, or `size="xl"`
* for 32px/40px, 48px/56px at `sm` and 56px/56px at `lg`.
* `variant="serif"` uses the kit's serif role; the default keeps the
* surrounding display face. Both variants support all three sizes.
* Pass `render` to use another heading level. A page's headline is `Heading`.
*/
function Subheading({
className,
variant = "default",
size = "md",
render,
...props
}: useRender.ComponentProps<"h2"> & VariantProps<typeof subheadingVariants>) {
return useRender({
defaultTagName: "h2",
render,
state: { slot: "subheading", variant, size },
props: mergeProps<"h2">(
{
className: cn(subheadingVariants({ variant, size }), className),
},
props
),
})
}
export { Subheading, subheadingVariants }
import { mergeProps } from "@base-ui/react/merge-props"
import { useRender } from "@base-ui/react/use-render"
import { cva, type VariantProps } from "class-variance-authority"
import { cn } from "cn"
// Paragraphs in introductions and body content. The layout owns the text
// measure: give it a `max-w-*` class when needed. Inherits the surrounding
// ink, so it reads over art; muted steps it down on a flat ground.
const textVariants = cva("w-full min-w-0 text-pretty", {
variants: {
/**
* The text color. `default` (the default) keeps the inherited color.
* `muted` uses `muted-foreground`.
*/
variant: {
default: "",
muted: "text-muted-foreground",
},
/**
* The text size: `md` (the default) 16px/28px for body copy; `lg`
* 18px/28px for an introduction; `xl` 18px/28px, then 20px/32px from
* `sm` for a hero introduction.
*/
size: {
md: "text-base/7",
lg: "text-lg/7",
xl: "text-lg/7 sm:text-xl/8",
},
},
defaultVariants: { variant: "default", size: "md" },
})
/**
* A paragraph in an introduction or body content, a `p` by default. For
* several paragraphs, pass `render={<div />}` and put your own `p` elements
* inside.
*
* `size` sets the text: `md` (the default) 16px/28px, `lg` 18px/28px, or
* `xl` 18px/28px and 20px/32px from `sm` for a hero. The layout controls
* the text's width and spacing. `variant="muted"`
* uses the muted text color; the default inherits the ink around it.
*/
function Text({
className,
variant = "default",
size = "md",
render,
...props
}: useRender.ComponentProps<"p"> & VariantProps<typeof textVariants>) {
return useRender({
defaultTagName: "p",
render,
state: { slot: "text", variant, size },
props: mergeProps<"p">(
{ className: cn(textVariants({ variant, size }), className) },
props
),
})
}
export { Text, textVariants }
Installation
pnpm dlx shadcn@latest add @01orbital/neon-sign-open-ovalnpx shadcn@latest add @01orbital/neon-sign-open-ovalyarn dlx shadcn@latest add @01orbital/neon-sign-open-ovalbunx --bun shadcn@latest add @01orbital/neon-sign-open-ovalMake it yours
- Its words are in
COPYat the top ofcomponents/blocks/contact/neon-sign-open-oval/index.tsx: change them there, not in the markup. HOURS, also at the top of the file, holds its lists and settings.- Its look comes from Linen and Neon Sign; each page lists the props that change it.
Built from
Built from these parts. The CLI adds each one that is missing and won't replace a file you already have unless you choose to:
The shadcn parts here are their Base UI versions, and this piece uses Base UI's API. A Radix version you already have won't work with it.
Last updated on