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:
+88
-2
@@ -1,4 +1,5 @@
|
||||
import { createSystem, defaultConfig, defineConfig } from '@chakra-ui/react';
|
||||
import linkButtonRecipe from './recipes/linkButton';
|
||||
|
||||
const config = defineConfig({
|
||||
cssVarsRoot: ':where(:root, :host)',
|
||||
@@ -19,6 +20,25 @@ const config = defineConfig({
|
||||
// '2xl': '1536px',
|
||||
// },
|
||||
tokens: {
|
||||
// Palet uit design/andreaslop-static (:root in style.css)
|
||||
colors: {
|
||||
paper: {
|
||||
DEFAULT: { value: '#faf7f2' }, // hoofdachtergrond, warm papier
|
||||
alt: { value: '#f1ebe2' }, // secundaire secties
|
||||
deep: { value: '#e8e0d5' }, // randen van blokken, hover-vlakken
|
||||
},
|
||||
ink: {
|
||||
DEFAULT: { value: '#232120' }, // koppen en hoofdtekst
|
||||
soft: { value: '#55504b' }, // lopende tekst
|
||||
muted: { value: '#8a827a' }, // bijschriften, meta
|
||||
},
|
||||
line: { value: '#e2dad0' }, // hairlines
|
||||
accent: {
|
||||
DEFAULT: { value: '#7f8b76' }, // heidegroen
|
||||
deep: { value: '#5f6a58' }, // accent hover
|
||||
},
|
||||
sand: { value: '#d9cdbc' }, // zachte vlakken en decoratie
|
||||
},
|
||||
fonts: {
|
||||
heading: {
|
||||
value: "'Marcellus', 'Iowan Old Style', Georgia, 'Times New Roman', serif",
|
||||
@@ -27,13 +47,39 @@ const config = defineConfig({
|
||||
value: "'Jost', 'Helvetica Neue', Helvetica, Arial, sans-serif",
|
||||
},
|
||||
},
|
||||
fontSizes: {
|
||||
eyebrow: { value: '0.72rem' },
|
||||
},
|
||||
letterSpacings: {
|
||||
caps: { value: '0.22em' }, // hoofdletterlabels: eyebrows, knoppen, nav
|
||||
},
|
||||
spacing: {
|
||||
gutter: { value: 'clamp(1.25rem, 4vw, 3rem)' }, // zijmarge van de pagina
|
||||
},
|
||||
easings: {
|
||||
smooth: { value: 'cubic-bezier(.22, .61, .36, 1)' },
|
||||
},
|
||||
durations: {
|
||||
interaction: { value: '0.45s' }, // hover, focus
|
||||
fade: { value: '1.2s' }, // overvloeien van foto's
|
||||
},
|
||||
gradients: {
|
||||
// Donker verloop over hero-foto's, zodat witte tekst leesbaar blijft
|
||||
scrim: {
|
||||
value:
|
||||
'linear-gradient(to bottom, ' +
|
||||
'color-mix(in srgb, {colors.ink} 45%, transparent) 0%, ' +
|
||||
'color-mix(in srgb, {colors.ink} 18%, transparent) 35%, ' +
|
||||
'color-mix(in srgb, {colors.ink} 45%, transparent) 100%)',
|
||||
},
|
||||
},
|
||||
},
|
||||
semanticTokens: {
|
||||
colors: {
|
||||
bg: {
|
||||
DEFAULT: {
|
||||
value: {
|
||||
_light: '{colors.orange.100}',
|
||||
_light: '{colors.paper}',
|
||||
_dark: '{colors.gray.800}',
|
||||
},
|
||||
},
|
||||
@@ -41,12 +87,52 @@ const config = defineConfig({
|
||||
fg: {
|
||||
DEFAULT: {
|
||||
value: {
|
||||
_light: '{colors.gray.900}',
|
||||
_light: '{colors.ink}',
|
||||
_dark: '{colors.gray.50}',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
sizes: {
|
||||
header: {
|
||||
// Hoogte van de navigatiebalk (h="header")
|
||||
DEFAULT: { value: { base: '66px', lg: '92px' } },
|
||||
// Na scrollen; op mobiel krimpt de balk niet
|
||||
sticky: { value: { base: '66px', lg: '68px' } },
|
||||
},
|
||||
},
|
||||
spacing: {
|
||||
// Zelfde waarde voor content die onder de balk begint (pt="header")
|
||||
header: { value: '{sizes.header}' },
|
||||
},
|
||||
},
|
||||
textStyles: {
|
||||
// Klein label in hoofdletters boven een kop
|
||||
eyebrow: {
|
||||
value: {
|
||||
fontSize: 'eyebrow',
|
||||
letterSpacing: 'caps',
|
||||
textTransform: 'uppercase',
|
||||
},
|
||||
},
|
||||
// Grote titel in de hero
|
||||
display: {
|
||||
value: {
|
||||
fontFamily: 'heading',
|
||||
fontSize: { base: '2.75rem', md: '3.75rem', xl: '5rem' },
|
||||
lineHeight: '1',
|
||||
},
|
||||
},
|
||||
},
|
||||
recipes: {
|
||||
// Koppen zijn in het design niet vet en iets gespatieerd
|
||||
heading: {
|
||||
base: {
|
||||
fontWeight: '400',
|
||||
letterSpacing: '0.01em',
|
||||
},
|
||||
},
|
||||
linkButton: linkButtonRecipe,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user