Skip to content
Sign inJoin waitlist

Marai Neesu design system — Astro

Content-free building blocks of the Marai Neesu 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-black, text-black/80, spring — never a hex or a font size typed into a component, and a value used twice becomes a token. Keep class names standard (bg-<color>, md:, lg:). Phone is the default; md is 810 and lg 1200. (Motion states animate colours as rgba(5,5,5,…) or var(--color-…) strings: Motion cannot interpolate the color-mix() Tailwind writes for an opacity modifier.)
  • No content imports. A component takes its data through props; sections map content with src/lib/to-ui.ts. No copy lives in a component (the only strings are the form’s fallbacks: “Submit”, “Thank you”, “Something went wrong”).
  • cn only joins class names. It does not merge Tailwind classes: two classes for the same property and variant are decided by their order in the generated CSS, not by the call. Where a default has to change it is a prop that takes a whole class string (Section padding and gap, SectionTitle textClass, RichText headingSpace / blockSpace / listSpace, Ticker fadeClass, Form submitClass) or another variant.
  • Positioning belongs to the caller. A component does not place itself (no offsets, margins or grid placement of its own); the caller adds them through class. GoBack is the exception: it is fixed to the bottom of the window.
  • State and motion are scripts, not framework islands. 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/ (or in src/components/site/ for the header), takes no arguments and finds its elements by data-* attributes (see Scripts). Hover is data-hover + data-motion (scripts/hover.ts).
  • One component per file. Constants a component shares live in a sibling .ts (layout/section.ts, actions/button.ts, actions/product-button.ts, actions/underline.ts, cards/card.ts, forms/field.ts, forms/form-state.ts, icons/paths.ts, patterns/rich-text.ts), the shapes of the data the components take in types.ts. Props className / innerClassName / gapClassName of the Next.js version are class / innerClass / gapClass here.
  • A repeated slot is a function of the index. A slot renders once, so a component that repeats each child takes the slot as a function: Accordion ((i: number) => content, when content is not a string) and the sections’ CardSlideshow. Ticker renders its items once and prints them again for each copy.
  • Framer first. The components follow the original Framer design; a deliberate refinement is written in the component’s leading comment.
File Holds
theme.css The colours, the breakpoints (md 810, lg 1200), the font variable (font-sans is Manrope), the ease-form curve, the animations with their keyframes (turn, ticker-x, ticker-y), the page background and text colour — the same file as the Next.js version; src/styles/global.css imports it after Tailwind
tokens/text.ts The 15 text styles (text.h2 …), per breakpoint
tokens/motion.ts The Framer transitions S1, S2, S3, SL and instant as plain objects for Motion’s animate(), and the names usable in data-transition (spring, flat, roll, instant)
utils/cn.ts, utils/href.ts cn; isExternalHref and externalLinkProps (http(s) links open in a new tab, mailto and tel do not)
utils/image.ts image(src): the imported file of a /images/<file> path (src/assets/images); imageUrl, isRemote for a CMS image; imageWidths
utils/motion.ts, utils/play.ts motionStates(rest, hover) and motionTransitions() for data-motion / data-transition, restStyle(); play(), Motion’s animate() with the visitor’s reduced-motion setting honoured the way the Next.js MotionProvider does
Token Value Framer style Used for
black #050505 Black text, the filled buttons, the current menu link, a ticked box
black/80 80% Black 80 leads, descriptions, card text, the Submit button pressed, the logo’s seal
black/60 60% Black 60 meta lines, the current breadcrumb, placeholders, a focused field’s border
black/30 30% Black 30 the rule between a lesson’s number and title, the veil over a post’s cover
black/10 10% Black 10 dividers, field and checkbox borders, the module pill’s hairline
black/5 5% Black 05 card hairlines (cardSurface), field fills
black/3 3% Black 03 card surfaces, chips, accordion rows, the outline button
grey #9FA0A3 Grey the rolling roles, the place under the logo, the menu button’s lines; the secondary product button’s hairline
accent #FC5000 Accent hover colour of links and buttons, the stars, the e-mail’s second copy, GoBack on hover
background #F6F6F6 Background the page, the header bar, text on Black
white #FFFFFF White the tick of a checkbox, the Submit spinner, text on the course cover
white/50 50% White 50 the header’s link pill and the logo pill (with a 10px blur)
white/5, white/3 5%, 3% White 05, White 03 the Course page’s label chip on its dark block
available #1FB514 (Framer’s own value) the dot of StatusBadge
error #FF2244 (Framer’s own value) at 15% (bg-error/15): the Submit button’s fill after a failed send

The hover states that scripts animate between two exact colours write Black, Background and Accent as rgb() / rgba() values (actions/button.ts, actions/product-button.ts, the post, service and tool cards, Accordion and scripts/accordion.ts, and the header bar in src/components/site/): change them with the tokens.

Corners: 10px on cards and their photos (cardSurface), 8px on the experience, testimonial and accordion cards and the course image, 4px on product buttons, fields and checkboxes, 2px on the accordion’s and module’s boxes and the social tiles, round on buttons, chips, pills and avatars.

Named as in Framer, all Manrope (one variable font). Displays are 400, headings 500 at line height 1.2, scaled per breakpoint; the paragraphs are the same size everywhere. Bold runs in rich text are 700.

Token Framer name Phone / tablet (md) / desktop (lg) Used for
text.display1 Display 01 38 / 52 / 64, 400 the Home hero’s title
text.display2 Display 02 24 / 36 / 42, 400 a post’s title, the 404’s title
text.h1 Heading 1 24 / 26 / 28 an inner page’s <h1> (SectionTitle as="h1"), the footer’s call to action
text.h2 Heading 2 22 / 24 / 26 section titles
text.h3 Heading 3 20 / 22 / 24 rich-text headings of a post, the custom-request row, the newsletter
text.h4 Heading 4 20 / 21 / 22 the course card’s title, FooterLink, the CV’s block titles
text.h5 Heading 5 18 / 19 / 20 service, product, experience and accordion titles
text.h6 Heading 6 16 / 17 / 18 project, post, tool, module and lesson titles
text.h6Small Heading 6 Small 14 the logo’s name, a CV line’s subtitle, a lesson’s number
text.big Big Paragraph 18 / 1.4 a post’s body, a testimonial’s name
text.paragraph Medium Paragraph 16 / 1.4 leads, descriptions, rich text, form labels, breadcrumbs
text.small Small Paragraph 14 / 1.2 meta, chips, labels
text.tiny Tiny Paragraph 12 / 1.2 the place under the logo
text.menu Menu 13, 500, 0.03em apart the header’s links
text.button Button 12 / 1.1, 500, upper case button labels, links with an arrow (the copy stays mixed case)

Section sets the page’s rhythm; its constants (layout/section.ts) are exported for the few blocks that lay out their own box.

Constant Value
sectionGutters side padding 20 / 30 / 40
sectionPadding vertical padding 40 / 50 / 50
sectionGap 50 between the blocks of a section

The content is at most 1200 wide (Framer “Inner”). The fixed header is 74 / 84 / 92 tall; src/layouts/Layout.astro pads <main> by that.

Name Token data-transition Values Used by
S1 spring spring (the default) spring 0.4 s, bounce 0.2 nearly every hover: Button, NavLink, UnderlineLink, the logo, SocialTiles, ProductButton, PostCard, ToolCard, GoBack, CourseModule; every data-motion part that names no transition
S2 springFlat flat spring 0.4 s, no bounce the header’s scroll look and the phone menu, ProjectCard, ProductCard, ServiceCard, Accordion
S3 springRoll roll spring 0.5 s, no bounce EmailLink’s roll
SL slideSpring — stiffness 200, damping 40, mass 1 Framer’s Slideshow: WordRoll, the testimonials on phones (CardSlideshow)
— instant instant duration 0 a change Framer makes at once (the underline snapping back)

The CSS tokens of theme.css (Tailwind utilities ease-form, animate-turn …):

Token Holds
--ease-form cubic-bezier(0.44, 0, 0.56, 1): the SubmitButton’s colours (0.2 s)
--animate-turn one turn a second, linear: the SubmitButton spinner
--animate-ticker-x, --animate-ticker-y the Ticker belt over one copy (--ticker-period); each Ticker sets its duration inline, right and down run them in reverse

Reduced motion: play() makes moves, turns and size changes jump to their end (fades and colours still animate), and the tickers stop (motion-reduce:animate-none).

All paths are under components/.

Group Component File What it is Props that matter
actions Button actions/Button.astro Framer Button/Primary: a 36px pill, the label in Button 12; with icon a 14px icon that turns 45° on hover. Primary is Black and lifts with a shadow stack, Outline (Black 03, hairline) fills Black, Accent (Accent 03, inner glow) adds outer shadows. A link with href (external in a new tab), otherwise a <button>. Tones: actions/button.ts tone (primary default, outline, accent), icon, href, type, class, data-*
actions UnderlineLink actions/UnderlineLink.astro Framer Button/Secondary: label, a 12px arrow and an underline that grows on hover (S1) and snaps back; label and arrow turn Accent, the arrow turns 45°. The underline’s states: actions/underline.ts href, arrow (true), size (button: Button 12 upper case; small: Small Paragraph, the CV’s links)
actions NavLink actions/NavLink.astro Framer Button/Menu: Menu 13 on a 10 / 16 pill; the current page is a Black pill without hover, the others turn Accent and grow the underline href, current (aria-current), data-*
actions FooterLink actions/FooterLink.astro the footer’s links in Heading 4; Accent and underlined on hover, at once (CSS) href
actions EmailLink actions/EmailLink.astro Framer Button/Text (the hero’s e-mail): Medium Paragraph that rolls up to an Accent copy on hover (S3) email
actions ProductButton actions/ProductButton.astro Framer Button/Product: 32 tall, 4px corners; primary Black → Accent, secondary Grey hairline → filled Black; with a label a 16px icon turns 45° on hover, without one only the icon (the cart). Tones: actions/product-button.ts href, tone (secondary default), icon (arrow-up-right), label (name of an icon-only button), class (width)
actions GoBack actions/GoBack.astro Framer Back: a Black pill fixed 20 above the bottom of the window, Accent on hover; goes back, or to fallbackHref when the previous page is not on this site fallbackHref, label
brand Logo brand/Logo.astro Framer Misc/Logo: a 34px avatar, the name (Heading 6 Small) over the place (Tiny, Grey), linking home. pill: on a White 50 blurred pill with the verified seal; hover swaps the lines for hoverLines and the seal for a back arrow href, name, place, avatar, verifiedLabel, pill, hoverLines
icons Icon icons/Icon.astro, icons/paths.ts a Phosphor icon as inline SVG in the text colour; the 14 icons are in paths.ts name (IconName), class (size; 14px when left out), label (an image with a name; decorative without), hidden, data-*
cards ProjectCard cards/ProjectCard.astro Framer Card/Project: a 4:3 photo, title, a two-line summary and the meta line; the whole card links; hover (S2) zooms the photo to 105%, squares its bottom corners, the title turns Accent ProjectCardData (href, title, summary, image, service, date, dateTime), heading, sizes
cards MetaLine, cardSurface cards/MetaLine.astro, cards/card.ts two texts in Small Paragraph, Black 60, with a dot (an item is a string or { text, dateTime } for a <time>); the card surface class (Black 03, Black 05 hairline, 10px corners) items
cards ProductCard cards/ProductCard.astro Framer Card/Product: a half-grey photo, the title, tagline and price pill, the cart and “View Details” buttons; hover (S2) colours and zooms the photo ProductCardData (href, title, tagline, price, image, buyUrl, buyLabel, detailsLabel), heading
cards PostCard cards/PostCard.astro Framer Card/Post: a 4:3 photo, the category and date, a two-line title; the whole card links; hover adds a soft shadow, squares the photo’s bottom corners, the title turns Accent PostCardData (href, title, image, category, date, dateTime), heading
cards ServiceCard cards/ServiceCard.astro Framer Card/Service: title, price, description and “More Details”; two columns of photos at the right that roll on hover (S2, 5 px/s); phones: one row above, always rolling ServiceCardData (title, priceLabel, description, link, images), heading
cards TestimonialCard cards/TestimonialCard.astro Framer Card/Testimonial: 340 × 300 (350 wide on phones), the person, the Accent stars and the quote; no hover TestimonialCardData (name, role, photo, quote, rating, ratingLabel)
cards CourseCard cards/CourseCard.astro Framer Card/Course (Home): the image, the Framer-mark chip, title, text and a Primary button; no hover CourseCardData (label, title, text, image, link)
cards CourseModule cards/CourseModule.astro Framer Card/Module: the module pill, title and caret as a button; open (S1), the lessons with number, rule, title and a “Free Preview” link; each module opens on its own CourseModuleData (label, title, lessons), id (prefix of the panel’s id), defaultOpen, heading (h4)
cards ExperienceCard cards/ExperienceCard.astro Framer Card/Experience (About): the job title, the company and period with icons, the description; no hover ExperienceCardData (title, company, period, description), heading
cards ToolCard cards/ToolCard.astro Framer Card/Stack (About): a link to the tool (new tab) with its logo, name and category; hover fills it Black 03 and grows an arrow ToolCardData (href, title, category, logo), heading
cards CvCard, CvPostCard, CvDate cards/CvCard.astro, cards/CvPostCard.astro, cards/CvDate.astro Framer Card/CV: the date (120 wide, CvDate) and a small UnderlineLink, subtitle and description; CvPostCard is the CV’s Writing row (date, photo, title, category), the whole row a link CvCardData (date, dateTime, link, subtitle, text); CvPostCardData (href, title, category, image, date, dateTime), heading
data StatusBadge data/StatusBadge.astro Framer Subtitle chip of the CV: an available dot and the label (the slot) on a Black 03 pill slot
media FillImage, SizedImage media/FillImage.astro, media/SizedImage.astro the images of the components: FillImage fills its positioned parent (next/image fill), SizedImage is drawn at a given size (1x and 2x); /images/<file> paths from the content, or a CMS URL; SVG files are served as they are src, alt, sizes, priority (FillImage); width, height, hidden (SizedImage); class
navigation Breadcrumbs navigation/Breadcrumbs.astro Framer Breadcrumbs: Medium Paragraph links (Accent and underlined on hover), “/” between, the current page in Black 60 items ({ label, href? }), label (the nav’s name)
navigation SocialTiles navigation/SocialTiles.astro Framer Misc/Social List: tiles with two letters; hover fades the others to 30% and shows the profile’s icon items (SocialTile: label, short, href, icon)
patterns RichText patterns/RichText.astro (with RichTextBlock.astro, RichTextInline.astro, rich-text.ts) CMS rich text: headings (levels 2–6), paragraphs with **bold**, `code` and line breaks, bulleted and numbered lists, nested blocks (RichTextBlock), headings (style per level), headingSpace, blockSpace, listSpace, class (paragraph style and colour)
patterns Ticker patterns/Ticker.astro Framer Ticker: items moving forever, measured in the browser so items keep their own sizes; faded ends; still for reduced motion speed (px/s), direction (left, right, up, down), running (with setTickerRunning()), gapClass, trackClass, copies, fade, fadeClass, label; the slot is the items
patterns WordRoll patterns/WordRoll.astro Framer Slideshow of texts (the hero’s and the CV’s roles): one line up every interval seconds with SL, forever items, interval (4), lineHeight, itemClass
patterns Accordion patterns/Accordion.astro Framer Card/Accordions (the FAQs of Services and Course): Black 03 rows with a Heading 5 title button and a plus / minus box; each row opens on its own (S2) items ({ title, content? }; without content, the slot (i: number) => …), id (prefix of the panels’ ids), defaultOpen ([0]), heading (h3)
layout Section, Divider layout/Section.astro, layout/Divider.astro, layout/section.ts a page section: gutters, vertical padding, blocks 50 apart, content at most 1200 wide; Divider is the 1px Black 10 line between sections padding, gap (whole class strings), innerClass, class, id, as, label
layout SectionTitle layout/SectionTitle.astro Framer Title: Heading 2 (Heading 1 as h1) and a Black 80 lead, at most 550 wide (750 wide); a button in the action slot sits at the right (under it on phones); title and text slots replace the props title, text, as, wide, textClass (a whole class); slots action, title, text
forms Form forms/Form.astro a form that sends its fields and shows its progress on the Submit button: a spinner, then Thank you and the fields reset (or a redirect), or an error and the fields keep what was typed; a honeypot field (fax). It posts to endpoint (a form service, a webhook or the site’s own /api/forms route, from formEndpoint() in src/lib/forms/endpoint.ts) or, without one, runs a demo name (contact, newsletter), subject, endpoint, hidden (formServiceFields()), submitLabel, successLabel, errorLabel, redirectTo, demo ("fail": the style guide’s failing sample), submitClass, class
forms FormField, FieldControl, CheckboxGroup, fieldSurface forms/FormField.astro, forms/FieldControl.astro, forms/CheckboxGroup.astro, forms/field.ts Framer form field: a Medium Paragraph label 10 over a control (Black 05 fill, Black 10 hairline, 4px corners; focus: Black 60), no required mark (as in Framer); FieldControl is the control alone, fieldSurface its class string; CheckboxGroup a fieldset of 16px checkboxes, every ticked one sent under one name FormFieldData (name, label, type: text, email, tel, url, date, textarea; placeholder, required, autoComplete, defaultValue); CheckboxGroup: name, label, options
forms SubmitButton forms/SubmitButton.astro Framer Submit (Default, Loading, Success, Error, Disabled): a 33px Black pill, Accent on hover, Black 80 pressed; a white ring while sending; Error on a 15% red fill; Disabled at 50%. The markup holds every look and the form script switches data-status status (idle, pending, success, error), label, successLabel, errorLabel, disabled
forms honeypotField forms/form-state.ts the name of the hidden field bots fill in, shared by Form and the server route —
utils CurrentYear utils/CurrentYear.astro the current year: the page ships the build year in a <span> and a tiny script swaps in the visitor’s —
utils LocalTime utils/LocalTime.astro Framer Time & Date: the time in a time zone (“7:41 PM”), following the clock; empty until the script runs timeZone

Page sections (the hero, the projects, the services …, and CardSlideshow, the testimonials’ slideshow on phones) live in src/components/sections/; the header and footer in src/components/site/.

Every script is a scripts/<name>.ts that exports init*() functions without arguments (the HTML edition is generated from this version and calls each of them; helpers with arguments have other names). A component calls its function from its own <script>; each function marks what it has processed (data-*-ready), so calling it twice does nothing. They animate through play() (utils/play.ts) with the tokens of tokens/motion.ts.

File Function What it does
hover.ts initHover(), setHovered() plays the data-motion states of every data-hover element on hover, and fires hoverchange on the host (called by the layout)
accordion.ts initAccordions() Accordion rows (S2, the plus / minus box) and CourseModule (S1, the caret); each row on its own
collapse.ts setCollapse() opens and closes a panel from nothing to its content’s height (used by accordion.ts)
ticker.ts initTickers(), setTickerRunning() Ticker: measures one copy and runs the CSS belt; starts and stops a ticker (the service cards)
service-card.ts initServiceCards() ServiceCard: rolls the two photo columns while the pointer is over the card
word-roll.ts initWordRolls() WordRoll: one line up every interval seconds (SL)
card-slideshow.ts initCardSlideshows() the sections’ CardSlideshow: a card every 4 seconds (SL), the arrows
social-tiles.ts initSocialTiles() SocialTiles: dims the others and shows the icon
logo.ts initLogo() Logo with pill: swaps the lines and the seal on hover
load-more.ts initLoadMore() the Blog’s “Load More”: shows the hidden cards and moves the focus
go-back.ts initGoBack() GoBack: back on this site, or to the fallback page
form.ts initForms() Form: send, the Submit states, reset or redirect, the demo
local-time.ts initLocalTime() LocalTime: the time in its time zone, refreshed every 5 seconds
current-year.ts initCurrentYear() CurrentYear
style-guide.ts initSpringDemos() the style guide’s spring tracks (src/components/style-guide/SpringDemo.astro)
../../components/site/header.ts initHeader() the desktop header’s scroll look, the phone menu

New component: put it in the right group, add it to /style-guide and to this table; new interactivity: a script as above.