Skip to content
Sign inJoin waitlist

Kendi design system — Astro

Content-free building blocks of the Kendi template, mirrored from the Framer components and from the design system of the Next.js version: the same component names, props and Tailwind classes, so both versions render the same DOM. Components never import src/content — sections pass data in through props. Import a component by its path (import Button from "../design-system/components/actions/Button.astro"); there is no barrel. See them all together at /style-guide (src/pages/style-guide.astro): public, noindex, not in the sitemap and not linked from the site.

  • Tokens, not raw values. text.h2, bg-paper, text-grey, ease-spring, shadow-menu, spring — never a hex or a font size typed into a component; a value used twice becomes a token. Phone is the default; md is 810 and lg 1200.
  • No content imports, no copy. A component takes its data through props; sections map content with src/lib/to-ui.ts.
  • cn only joins class names. It does not merge Tailwind classes; where a default has to change it is a prop that takes a whole class string (Section padding and inner; WithSidebar gap; Slideshow perView and dots; Form submitClass; LoadOnScroll class and itemClass).
  • Positioning belongs to the caller (class for margins, grid placement, absolute positions).
  • State is a script, not a framework island. A component with state writes its markup in the state React renders first and calls an init*() function from its own <script>; the function lives in scripts/ (the header’s in src/components/site/), takes no arguments and finds its elements by data-* attributes. The HTML edition is generated from this version and calls every init*() once. Helpers that take arguments (setHamburger, setMenuTrigger, setCollapse, playMenuColumns) are exported for the header.
  • Two-state looks (the hamburger’s lines, the menu trigger’s roll, the slideshow dots) carry both class lists, data-on and data-off; scripts/toggle.ts (setToggled) swaps them. The two submit buttons take their class list and content for each state from components/forms/submit-state.ts, shared by the markup and scripts/form.ts.
  • Hovers run in CSS with the spring curves of theme.css (group-hover, duration-400 ease-spring), as in Next.js; Motion (motion package, from the scripts) runs the slideshows, the Categories menu’s fade and columns and the phone menu’s height.
  • Parts React mounts only in one state (the Categories panel, the phone menu’s categories) are in the markup, hidden.
  • One component per file. Constants a component shares live in a sibling .ts (layout/section.ts, cards/surface.ts, forms/form-state.ts, forms/submit-state.ts, icons/paths.ts, patterns/inline.ts); the shapes of the data the components take are in types.ts. Props className / submitClassName / itemClassName of the Next.js version are class / submitClass / itemClass here; text children are a label prop (TextLink, RollText).
  • Framer first. A deliberate refinement is written in the component’s leading comment and in the spec’s Deviations.
File Holds
theme.css Colours (black, grey, white, paper, line, charcoal, error, focus, spinner), breakpoints, shadow-menu, the easings ease-spring / -bounce / -slow / -long (Framer’s springs as linear() curves) and ease-framer, the Inter fallback — the same file as the Next.js version; src/styles/global.css imports it after Tailwind. The font is a local variable Inter (astro.config.mjs → fonts)
tokens/text.ts The 12 text styles, per breakpoint (Inter pinned to optical size 14)
tokens/motion.ts Motion options: spring, springBounce, slideSpring, slideInterval (8 s), menuColumns, formTween
Group Component Props Use
actions Button, MoreLink, ArrowFlip href label tone? · href label Framer’s Primary (black / white) and Secondary buttons with the rolling arrow
actions RollText, TextLink, CategoryPill label gap? second? active? · href label size? · href label tone? The flip text, the growing underline link, the category pill
brand Logo href src label size? The wordmark link (85 × 25, 102 × 30)
navigation MenuLink, MenuTrigger, Hamburger, CategoriesMenu, Breadcrumb Header parts; CategoriesMenu look="panel" | "inline"
layout Section, WithSidebar, BlockTitle inner? padding? label? · gap + slot sidebar Page bands, the column beside the sticky sidebar
data MetaRow, MetaDot, MetaDate, MetaAuthorLink, SocialIcons The meta line of cards and the social row
cards PostCardSmall, PostCardStack, PostCardRow, PostCardOverlay, SpotlightItem, CategoryTile, CategoryMenuItem, InstagramTile, AdCard, TeamCard post titleAs? sizes? … Framer’s cards
media FillImage, SizedImage, PhotoStack, Slideshow, SlideArrow Slideshow: count perView gap arrows? dots? draggable? labels + function slot Images, the newsletter’s photo stack, the two slideshows (8 s autoplay, arrows, dots, drag, reduced motion)
forms SubscribeForm, Form, FormField, SubmitButton labels consent? endpoint? id? · name labels endpoint? submitClass? The newsletter box and the Contact form (src/lib/forms/README.md)
patterns InlineText, RichText value linkClass? boldClass? · blocks headings? Content inline markup and rich text
patterns LoadOnScroll, LoadSpinner count pageSize label class? itemClass? + function slot · label class? Framer’s infinite pagination (/blog: 6 per page; every item in the HTML)
utils CurrentYear The copyright year, updated by a script