Skip to content
Sign inJoin waitlist

KorDent design system — Astro

Content-free building blocks of the KorDent 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-primary, text-muted, ease-spring-a, shadow-float, 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. The only strings in components are the form’s fallbacks (“Submit”, “Thank you”, “Something went wrong”).
  • 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, gap, inner; SectionTitle titleWidth; RichText width, headingSpace, listSpace; Form submitClass).
  • 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 it starts in 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.
  • Two-state looks (accordion rows, tabs, filters, the outcome index, the contents) carry both class lists, data-on and data-off, and start with the classes of their first state; scripts/toggle.ts (setToggled) swaps them.
  • Hovers run in CSS with the spring curves of theme.css (group-hover, duration-400 ease-spring-a), so nothing stays stuck in a hover state; Motion (motion package, from the scripts) runs the appear effects, the menu link’s letters, the accordions’ height and the phone menu.
  • One component per file. Constants a component shares live in a sibling .ts (actions/button.ts, layout/section.ts, forms/field.ts, forms/form-state.ts, icons/paths.ts, icons/shapes.ts); the shapes of the data the components take are in types.ts. Props className / innerClassName / submitClassName of the Next.js version are class / inner / submitClass here.
  • Framer first. A deliberate refinement is written in the component’s leading comment and in the spec’s Deviations.
File Holds
theme.css Colours, breakpoints, the font variable (Inter, a local variable font: astro.config.mjs → fonts), --ease-appear, --ease-form, --ease-spring-a/-b (springs as linear() curves), --shadow-float, --animate-turn, the page background — the same file as the Next.js version; src/styles/global.css imports it after Tailwind
tokens/text.ts The 15 text styles, per breakpoint
tokens/motion.ts Spring A, Spring B, Spring Menu, the appear tween and distances, the form tween
utils/cn.ts, utils/href.ts, utils/image.ts, utils/play.ts cn; isExternalHref, externalLinkProps; content images (/images/<file> → src/assets/images); the in-view video

Framer’s colour styles are unnamed in the published site (--token-<uuid>); the names are ours.

Token Hex Used for
primary #00ADA2 the accent: primary buttons, active tabs, icons, chips (/80 chip text, /10 chips, /5 hovers and panels)
ink #222222 headings and strong text
black #000000 the secondary button, simple buttons on hover (/5 hairlines on white)
muted #6F7278 body text, labels, meta
white #FFFFFF cards, the header (/5 the footer’s social buttons)
stone #F5F3F2 hairlines, fields, info panels, the Outcomes and CTA bands
page #F8FAFC the page
lime #E9F885 the yellow button, icon covers
night #020618 the footer
mist #CAD5E2 footer text (/30 its hairline)
red-deep #AD0009 the emergency number’s hover (Contact)
amber #FFB900 review stars
blue, green, red #155DFC, #009966, #E7000B the facts’ tints (/10); red the emergency card’s hover line
error #FF2244 the submit button’s error label (/15 its fill)
placeholder #999999 placeholders, the select chevron

Radii: 2 (review tags), 6 (chips, icon boxes, header links), 8 (buttons, cards, fields), 12 (outcome and dentist cards, hero photo, banners, video), round.

Inter, one variable font pinned to optical size 14 — Framer serves the text cut at every size.

Token Phone / tablet / desktop Used for
text.h1 36 / 44 / 56, lh 1.1, 600 page titles, the Home hero
text.h2 28 / 32 / 36, lh 1.2, 600 section titles
text.h3 26 / 28 / 32 rich-text headings
text.h4 24 / 26 / 28 rich-text headings
text.h5 20 / 22 / 24 the safety banner
text.h6 18 / 19 / 20 card titles, quotes
text.bodyLarge 16, lh 1.3 leads, descriptions
text.body / text.bodyBold 14, lh 1.3, 400 / 700 card text, lists / names, labels
text.menu 15, lh 1.2, 500 header links
text.button 14, lh 1.2, 500 buttons, tabs, footer links
text.caption / text.captionBold 12, lh 1.3, −0.02em chips, meta / prices, legal links
text.tiny / text.tinyBold 10, lh 1.3 disclaimer / review tags

All at −0.03em except the 12px (−0.02em) and 10px (0) styles.

Section: gutters 15 / 20 / 30 (sectionGutters), padding 60 / 80 / 100 (sectionPadding), a column at most 1300 wide, 60 between the title block and the content (gap). The header (68 / 78 / 78) lies over the page and scrolls away with it; src/layouts/Layout.astro pads <main> by its height.

Name Token Values Used by
Spring A spring, ease-spring-a bounce 0, 0.4 s buttons (label flip, icon covers), the post title, the service card hover, the phone menu, Collapse default
Spring B springSoft, ease-spring-b bounce 0.2, 0.4 s tabs, Accordion, Hamburger, SocialButton, RatingField
Spring Menu springMenu bounce 0, 0.2 s, 0.075 s per letter MenuLink
Appear appear, ease-appear tween 1 s, ease 0.59 0.25 0.12 1.17 Appear, TextAppear
Scroll / load appear appearDistance 18, appearAmount 0.5, loadDistance 7 Appear
Form formTween, ease-form tween 0.2 s, ease 0.44 0 0.56 1 SubmitButton

With reduced motion the scripts show every state at once (no appear, no letter roll).

Group Component What it is Props that matter
actions Button Framer Button/Primary, 8 variants: primary, secondary, lime, green, text, footer, iconPrimary, iconSecondary; the label flips on hover, the icon box slides its colour covers variant, default slot (label), icon, href or type, label (accessible name; required for the icon-only variants)
actions MenuLink Framer Button/Menu: header link; Active = Primary on Primary 10; hover = Primary 5 and the letters rise in Primary (scripts/menu-link.ts) href, label, current
actions SocialButton Framer Button/Social Media: 36px round, White 5; hover Primary name (facebook, instagram, x), href, label
brand Logo the site’s SVG (125 × 28), a link when href is given; hover 80% href, label, class (size)
icons Icon Phosphor (regular; star fill) in the text colour name, class (size), label, hidden
icons ShapeIcon the template’s line icons, one per service and per “Why Choose Us” feature, and the review star name, class, label
media FillImage, SizedImage content images through astro:assets (the sizes of next/image) src (/images/<file>), alt, sizes, priority; width, height
motion Appear appear effect on scroll (18px, half in view) or on load (7px) with the appear tween (scripts/appear.ts) on (scroll, load), delay, as, amount
motion TextAppear the hero’s text effect: words from 10px lower, blurred 7px, all together; or one block (mode="block") as, runs ({ text, class }), mode, delay
motion Collapse the height of an opening row (0 ↔ auto; scripts/collapse.ts) open, id, transition
navigation Hamburger Framer Button/Hamburger: 28px Primary box, three lines → X on Ink open, label, controls, demo (style guide)
navigation ContentsNav Framer “Card” table of contents (service page): numbered links; the entry whose block is under the top of the window turns Primary with an arrow (scripts/contents-nav.ts) items ({ number, label, id }), label
layout Section page section: gutters, padding, 1300 column padding, gap, inner (whole class strings), class, id, label
layout SectionTitle Framer Title Section: chip, Heading 2, lead eyebrow, eyebrowIcon, title, lead, layout (center, split, start), titleWidth, as
layout Chip Framer Misc/Eyebrow: default (icon + Caption, Primary 10), green, grey default slot, icon, tone
cards ServiceCard Framer Card/Service: icon, price, title, summary, details, facts panel, Learn More + Book; hover lifts (red line when urgent) data: ServiceCardData, titleAs (h2 on the Services page, under its h1)
cards PostCard Framer Card/Post: 3:2 photo, meta, title, excerpt; hover turns the title Primary data: PostCardData, titleAs, sizes
cards TestimonialCard Framer Card/Testimonial: patient, badge, stars, treatment tag, quote data: TestimonialCardData, quoteAs
cards OutcomeCard Framer Card/Outcome: category, title, text, quality list, timeline, treatment chips, four photos data: OutcomeData, titleAs
cards DentistName, DentistDetails, DentistHours, DentistPhoto, DotList the parts of Framer Card/Dentist (name row, details with lists, office hours panel, 225:281 portrait, dot list; scripts/doctors.ts switches them) data: DentistData; active, photoClass; nameAs, showName
data CheckItem Framer Misc/Icon Text: Primary check circle + Body Muted as (p, li), default slot
patterns Accordion Framer Part/Reasons: one row open at a time, spring B (scripts/accordion.ts) id (prefix for aria-controls), items ({ title, text }), defaultOpen, titleAs, numbered
patterns CardAccordion Framer About accordion: numbered white cards that fill the given height; the open one grows and uncovers its text (scripts/card-accordion.ts) id, items, defaultOpen, titleAs, class (give it a height)
patterns FilterTabs, SearchField Framer Tab buttons; the search input with a magnifying glass (scripts/service-filter.ts filters the service list) tabs, value, label; value, placeholder, label
patterns RichText (RichTextBlock, Inline) Framer rich text (posts, legal pages): Body Large in Ink, 20 between blocks, 40 above headings (each level in its own text style), bold runs, links, bulleted/numbered lists, tables blocks, width (800), headingSpace (per level, whole classes), listSpace, topLevel (the tag of the highest heading: 2 on posts, whose Framer headings are H3; the look stays)
forms Form the form element: demo mode, a static endpoint or the server route (scripts/form.ts), progress on the submit button, honeypot (src/lib/forms/README.md) name (booking, contact, review, newsletter), subject, endpoint, hidden, submitLabel, successLabel, errorLabel, redirectTo, demo (style guide), submitClass
forms FormField, FieldControl label (Body Bold, Muted) over a Stone field (radius 8, 42 tall; text area 150) name, label, type (incl. date, time), placeholder, required, options, defaultValue, radius, areaHeight, class
forms RatingField Framer Radio Group: five 24px stars as radio buttons (scripts/rating.ts) name, label, defaultValue, starLabel (“{n} stars”)
forms ChoiceCard Framer “Service Check” / “Dentist Check”: a radio as a white card with an optional 40px photo; the booking form’s dentists follow the chosen treatment (scripts/booking.ts) name, data: ChoiceCardData, checked, required, hidden
forms SubmitButton Framer form button: Primary, hover Primary 80, pressed Lime; spinner; Thank you; error status, label, successLabel, errorLabel, class
utils CurrentYear the visitor’s year (scripts/current-year.ts) —

Page sections live in src/components/sections/; the header and footer in src/components/site/; the page shell (head identity, header, <main>, footer) in src/layouts/Layout.astro. New component: put it in the right group, add it to /style-guide and to this table, and give its state an init*() function in scripts/.