Adds design tokens, text styles, and LinkButton recipe to the Chakra theme

Brings the palette and values from the static design's :root into the theme:
paper/ink/accent/line/sand colors, eyebrow font size, caps letter spacing,
gutter spacing, smooth easing, interaction/fade durations, a scrim gradient,
and header sizes (66px, 92px from lg; 68px when sticky). Switches bg/fg from
the placeholder colors to paper/ink, adds eyebrow and display text styles,
sets headings to weight 400, and adds a linkButton recipe (outline, accent,
light) with a LinkButton component wrapping the router Link. NavLink now uses
the eyebrow text style and motion tokens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-13 23:12:35 +02:00
co-authored by Claude Opus 5.5
parent ebcb1f7729
commit 8a8e2bd922
4 changed files with 162 additions and 6 deletions
+17
View File
@@ -0,0 +1,17 @@
import { chakra, useRecipe, type RecipeVariantProps } from '@chakra-ui/react';
import { Link } from '@tanstack/react-router';
import type linkButtonRecipe from '../recipes/linkButton';
const ChakraLink = chakra(Link);
type LinkButtonProps = React.ComponentProps<typeof ChakraLink> &
RecipeVariantProps<typeof linkButtonRecipe>;
// Router-link in de knopstijl uit het design. Styling komt uit de
// `linkButton`-recipe in het thema.
export default function LinkButton(props: LinkButtonProps) {
const recipe = useRecipe({ key: 'linkButton' });
const [variantProps, rest] = recipe.splitVariantProps(props);
return <ChakraLink css={recipe(variantProps)} {...rest} />;
}
+4 -4
View File
@@ -8,10 +8,8 @@ type NavLinkProps = React.ComponentProps<typeof ChakraLink>;
export default function NavLink({ children, ...props }: NavLinkProps) {
return (
<ChakraLink
textTransform="uppercase"
textStyle="eyebrow"
fontWeight="300"
fontSize="0.72rem"
letterSpacing="0.22em"
position="relative"
display="inline-block"
py="2"
@@ -27,7 +25,9 @@ export default function NavLink({ children, ...props }: NavLinkProps) {
bg: 'currentColor',
transform: 'scaleX(0)',
transformOrigin: 'right',
transition: 'transform 0.45s cubic-bezier(.22,.61,.36,1)',
transitionProperty: 'transform',
transitionDuration: 'interaction',
transitionTimingFunction: 'smooth',
},
'&:hover::after, &:focus-visible::after, &[aria-current="page"]::after':
{