Compose Digi design system (Astro)
Reusable, content-free building blocks of the Compose Digi template — the .astro twins of the Next.js design system, with
the same names, props (className → class) and classes, so both editions render the same DOM. Components never import
src/content; sections pass data in through props (mapped in src/lib/to-ui.ts). Import each component from its file
(components/<group>/<Name>.astro); shapes from types.ts, tokens from tokens/, helpers from utils/.
Every token and component is shown in its states at /style-guide (noindex, not in the sitemap).
Interactivity: hover states are data-hover on the host and data-motion on each changing part (scripts/hover.ts,
started by the layout); everything else is an init*() function in scripts/ that the component’s own <script> calls.
Tokens
Section titled “Tokens”| File | Holds |
|---|---|
theme.css |
Colours with Framer’s names — ink Black 13 #101010, ink-soft Black 10, charcoal Black 09, grey Black 08, silver Black 06, line Black 05, mist Black 04, surface Black 03, background White #FCFCFC, white, accent #B3FF00, axis (process chart), error #FF2244; breakpoints md 810, lg 1200; ease-form; animate-ticker, animate-turn; ease-spring-a/b/c; fonts font-sans (DM Sans) and font-display (Inter) with next/font’s fallback metrics |
tokens/text.ts |
Framer’s text styles: display, h1–h6, huge, hugeStroke, big / paragraph / small, menu |
tokens/motion.ts |
spring (S0), springSoft (S2), springCard (SC), springPop (SP), instant; transitions = the names usable in data-transition (spring, soft, card, pop, instant) |
types.ts |
ImageData, ButtonVariant, the card data (ProjectTickerCardData, ProjectCardData, PostCardData, ServiceCardData, JobCardData, TeamMemberData, SocialButtonData, SocialNetwork), ServiceAccordionItem, ProcessPhase, TestimonialData, PricingPlan, PageSizes, ScrollFrom, CursorKind, FormFieldData, FormStatus, RichTextBlock, IconName |
utils/ |
cn (joins classes, no Tailwind merge), href (isExternalHref, externalLinkProps), image (image(), imageUrl(), isRemote(), imageWidths(), remoteWidths), motion (motionStates(rest, hover)), play (play(), reducedMotion) |
Components
Section titled “Components”| Component | Framer | Props · notes |
|---|---|---|
| actions/ | ||
Button |
Button/Primary | href?, variant (primary · secondary · outline · icon), type, class, data-*; slot = label (the icon variant’s accessible name). Label roll S0, arrow 45° S2 |
FlipText |
Misc/Flip Text | roll (25.6; 0 = still), class; slot = label. Rolls with the nearest data-hover |
TextLink |
Button/Secondary | href, icon ("arrow-right", null = No Icon), iconOnly, class, data-*; slot = label. Underline S2 in / at once out, arrow 4px; #id scrolls smoothly (scripts/text-link.ts) |
ActionButton |
Button/Action | href, label, class. Circles slide together, arrow −45° (SC) |
SocialButton, SocialList |
Button/Social, Misc/Social List | social / socials (SocialButtonData). Hover or keyboard focus opens it to show the name (SC) |
brand/ Logo |
Logo | href, label, class (the caller sizes it), data-* |
icons/ Icon |
Phosphor | name (icons/paths.ts), class (14px when left out), label |
| navigation/ | ||
NavLink |
Button/Menu | href, current, class, data-*; slot = label. Silver fill S2, label roll S0; current = lime, no hover |
Hamburger |
Button/Hamburger | open, menuLabel, closeLabel, controls, class. scripts/hamburger.ts → setHamburger(button, open) |
| layout/ | ||
Section, section.ts (sectionGutters, sectionPadding) |
page section | id, as, class, innerClass, padding, gap, label, cursor (data-cursor; "none" = no custom cursor) |
Divider |
Misc/Divider | class |
cursor/ Cursor |
Misc/Cursor | none — one per page (the layout). Over <main>: data-cursor none = dot, "active" = ring, "none" = hidden, text = pill; data-cursor-icon="12", data-cursor-glyph (plus, play-fill). scripts/cursor.ts |
| cards/ | ||
ProjectTickerCard |
Card/Project | project, cursor, class |
ProjectCard |
Card/Project 2 | project, cursor, sizes, variant (testimonial · simple), class. Photo zoom 105 → 100 % (SC) |
PostCard |
Card/Post | post, cursor, sizes, class. Zoom (SC), Read cursor with the 12px arrow |
PostNavCard |
Card/Post Prev / Next | post, label, side (start · end), class |
ServiceCard |
Card/Service 02 | service, cursor, sizes, class. Zoom on the whole card, More Details cursor with a plus |
JobCard |
Card/Job | job, linkLabel, as (h2 · h3 · h4), class |
TeamList |
Misc/Team List + Card/Team | members, class. Desktop dimming (S2, scripts/team-list.ts) |
| data/ | ||
UserRating |
User Rating | score, max, caption, avatars, class |
ProcessGraph |
Card/We Work + Misc/Graph | phases, axis, label, class. Start → Full once in view (S2, scripts/process-graph.ts) |
| patterns/ | ||
SectionTitle |
section Title | eyebrow, title, headingClass (Heading 2 by default), class |
ServiceAccordion |
Misc/Service List + Card/Service 01 | items, defaultOpen, id (prefix of the button and panel ids — the Next.js useId(); default services), class. scripts/service-accordion.ts |
TestimonialSlider |
Card/Testimonials Slide | testimonials, interval (5 s), label, class. scripts/testimonial-slider.ts |
PricingCard |
Card/Pricing + Misc/Switch | title, plans, switchLabel, includedTitle, action, class. scripts/pricing-card.ts |
Ticker |
Ticker | speed (px/s), gapClass, direction, copies (3), pauseOnHover, label, fade, clip, class; slot = the items side by side (printed once per copy). scripts/ticker.ts |
LoadMore |
Button/Load More | count, pageSizes ({ base, md, lg }), label, listClass, gap, class; function slot {(i: number) => <Card …/>} — each call is one <li>. Classes per breakpoint in load-more.ts; scripts/load-more.ts |
RichText (+ RichTextBlock, RichTextInline) |
formatted text | blocks, width, size (paragraph · big), class. bold, italic, label, lists, headings by Framer level |
| motion/ | ||
Collapse |
accordion body | open, id, transition (a transitions name; S0 by default), class. scripts/collapse.ts → setCollapse(panel, open) |
ScrollTransform |
Scroll Transform (In View) | from, fromTablet, fromPhone (ScrollFrom), class, innerClass. scripts/scroll-effects.ts |
Parallax |
Parallax | speed, speedTablet, speedPhone, offset, class, innerClass. scripts/scroll-effects.ts |
| media/ | ||
FillImage |
next/image fill |
src (/images/<file> or a URL), alt, sizes, class, priority, draggable |
VideoCard |
About Video card | image, caption, embedUrl, playLabel, playerTitle, closeLabel, cursor, class. Modal <dialog>, the player built on open (scripts/video-card.ts) |
| forms/ | ||
Form |
Contact form | name (contact), subject, endpoint (formEndpoint(name)), hidden (formServiceFields()), submitLabel, successLabel, errorLabel, redirectTo, demo, submitClass, class; slot = the fields. Demo / static / server modes (src/lib/forms/README.md), scripts/form.ts |
FormField, FieldControl, CheckboxGroup |
form fields | FormFieldData + class; FieldControl also invalid (aria-invalid: the Error border). Errors are in the page, hidden until the check fails |
SubmitButton |
Form button | status, label, successLabel, errorLabel, class. Every state’s classes as data-[status=…] |
field.ts (fieldSurface), form-state.ts (honeypotField) |
||
utils/ CurrentYear |
— | the year in a <span> (updated by scripts/current-year.ts) |
Differences from the Next.js API
Section titled “Differences from the Next.js API”MotionProviderandMotionLinkdon’t exist: the springs are applied byplay()/scripts/hover.ts.- Children that the React component maps (
Ticker’s items) are one slot printed per copy;LoadMoretakescountand a function slot. Hamburgertakes noonClick: the header script drives it (setHamburger).Logotakes noonClick(data-*instead).- Components with a
useId()take anidprefix (ServiceAccordion). Collapsetakes a transition name ("soft"), not a transition object.
The style guide’s own demos (the spring and curve tracks, the Collapse row, the Hamburger presses, Replay) are in
src/components/style-guide/ and run scripts/style-guide.ts; they are not part of the design system.
Add every new component here and to /style-guide.