Lookis design system — Astro
Content-free building blocks of the Lookis template, mirrored from the Framer components. 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: public, noindex, not in the sitemap and not linked from the site.
Conventions
Section titled “Conventions”- Tokens, not raw values.
text.h2,bg-ink,border-line,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;mdis 810 andlg1200. - 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”). cnonly 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 (Sectionpadding,gapandwidth,SplitLayoutgap,FactListgrid,RichTextwidth,SectionIntrotitleClass,leadClass,capClassandlabelGap,LoadSpinnerclass) or another variant.- Positioning belongs to the caller. A component does not place itself (no
absolute, offsets, margins or grid placement of its own); the caller adds them throughclass. A defaultrelativecan beat a caller’sabsolute, because the order in the CSS decides, not the call. - 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 inscripts/(or insrc/components/site/for the header and the clock), takes no arguments and finds its elements bydata-*attributes (see Scripts). A plain hover isdata-hover+data-motion(scripts/hover.ts); the links’ two-step hover isdata-stages+data-variants(scripts/stages.ts). - One component per file. Constants a component shares live in a sibling
.ts(layout/section.ts,layout/split.ts,actions/button.ts,forms/field.ts,forms/form-state.ts,icons/paths.ts), the shapes of the data the components take intypes.ts. - Framer first. The components follow the original Framer design; a deliberate refinement is written in the component’s leading comment.
Tokens
Section titled “Tokens”| File | Holds |
|---|---|
theme.css |
The colours, the breakpoints (md 810, lg 1200), the font variable (font-sans is Inter), the spring easing curves ease-s0 and ease-s2, the form easing, the ticker and spinner animations with their keyframes, the page background and text colour; src/styles/global.css imports it after Tailwind |
tokens/text.ts |
The 12 text styles (text.h2 …), per breakpoint |
tokens/motion.ts |
The Framer springs S0, S2 and SL as plain objects for Motion’s animate(), the timings of the hovers, the hero’s words, the slideshow, the name ticker and the portfolio filter, and the names usable in data-transition |
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, remoteWidths for a CMS image; imageWidths |
utils/motion.ts, utils/play.ts |
motionStates(rest, hover) for data-motion and stageStates({ rest, hover, hover2, active }) for data-variants; play(), Motion’s animate() with the visitor’s reduced-motion setting honoured (moves jump, fades still play) |
Colours
Section titled “Colours”| Token | Hex | Framer style | Used for |
|---|---|---|---|
ink |
#000000 | Black | text, the black buttons and the Submit button, label dots, filled arrow circles |
line |
#ECECEC | Line | dividers, card and field borders, the line under the header |
paper |
#FAFAFA | White | the page, the header, the footer card, text on photos, the white button |
spinner |
#999999 | (the Loading component’s own) | the ring of LoadSpinner |
error |
#FF2244 | (the form button’s own) | the Submit button’s error label, a required field’s asterisk |
error-fill |
rgb(255 34 68 / 0.15) | (the form button’s own) | the Submit button’s fill after a failed send |
Translucent blacks are opacity modifiers on ink: Black 80 = ink/80 (roles, answers, prices, a section label),
Black 60 = ink/60 (the footer’s column labels), Black 50 = ink/50 (the veil over the testimonials photo, question
numbers, a focused field’s border, the Submit button’s hover), Black 30 = ink/30 (outlined circles and pills,
placeholders), Black 20 = ink/20 (the slideshow’s arrows), Black 02 = ink/2 (the cards’ fill: facts, awards, services,
the contact form, the tinted gallery band).
Corners are 10px (rounded-[10px]: photos, project frames, cards, gallery tiles, the hero, the footer card), 4px on the
form fields, the Submit button, the service rows’ photos and the testimonial portraits, and round on buttons, pills and
arrow circles.
Text styles
Section titled “Text styles”Named as in Framer. Inter is one variable font with an optical-size axis, pinned to 14 in every style (Framer’s “Inter”, the text cut). Weight 400 and no letter spacing; Display 01 is weight 500.
| Token | Framer name | Phone / tablet (md) / desktop (lg) |
Line height | Used for |
|---|---|---|---|---|
text.display |
Display 01 | 60 / 100 / 150 | 1 | the hero’s name ticker |
text.h1 |
Heading 1 | 30 / 40 / 54 | 1.1 | page titles |
text.h1Small |
Heading 1 (Small) | 24 / 26 / 28 | 1.2 | the hero’s introduction |
text.h2 |
Heading 2 | 28 / 38 / 48 | 1.1 | section titles, the big numbers |
text.h3 |
Heading 3 | 26 / 30 / 36 | 1.1 | About’s block titles, a project’s and a service’s part titles, the contact card’s title |
text.h4 |
Heading 4 | 22 / 26 / 30 | 1.2 | a service’s price row, the 404’s “404” |
text.h5 |
Heading 5 | 20 / 24 / 28 | 1.2 | card and row titles, questions, the footer’s “Let’s Connect” |
text.h6 |
Heading 6 | 20 / 22 / 24 | 1.2 | quotes, award titles, numbered rows |
text.big |
Big Paragraph | 18 | 1.4 | leads, descriptions, rich text, prices, the footer’s links |
text.paragraph |
Medium Paragraph | 16 | 1.4 | card text, roles, small print |
text.menu |
Menu | 16 | 1.2 | the header’s links and clock, button labels |
text.label |
Label | 12, upper case | 1.2 | the labels with a dot above section titles |
Spacing
Section titled “Spacing”Section sets the page’s rhythm; its constants (layout/section.ts, layout/split.ts) are exported for the few blocks
that lay out their own box.
| Constant | Phone / tablet / desktop |
|---|---|
sectionGutters |
side padding 10 / 20 / 30 |
sectionPadding |
vertical padding 40 / 60 / 80 |
sectionGap |
gap between the blocks of a section 50 |
splitPadding |
the two-column pages’ section: 20 / 30 / 30 on top, 40 / 50 / 50 below |
The content is at most 1728 wide (Section width; 1440 for Home’s About, numbers and services and the Services
questions); SplitLayout caps its row at 1728. The header sticks to the top, 70 tall on phones and 95 from tablets up,
with a 1px Line under it that scrolls away.
Motion
Section titled “Motion”The template has no scroll, appear or page transitions; the hero’s words are the only load animation.
| Spring | Token | Values | Used by |
|---|---|---|---|
| S0 | spring |
no bounce, 0.4 s | nearly every variant change: buttons and links, the phone menu, the hamburger, Collapse, the service rows dimming, WordAppear; the default of play() and of the hover runtimes (a part without data-transition) |
| S2 | springSoft |
bounce 0.2, 0.4 s | FaqList (the row’s height), the portfolio cards moving after a filter, the footer links dimming |
| SL | slideSpring |
stiffness 200, damping 40, mass 1 (about 1.35 s) | TestimonialSlider’s step |
| Timing | Token | Value | Used by |
|---|---|---|---|
| Second hover stage | hoverDelay |
500 ms | MenuLink, MenuTab, ArrowLink (the solid underline, the arrow’s turn) |
| Word stagger | wordStagger |
0.05 s | WordAppear |
| Slide interval | slideInterval |
4000 ms | TestimonialSlider |
| Name ticker speed | nameTickerSpeed |
30 px/s | the hero’s Ticker |
| Filter delay | filterDelay |
420 ms | Portfolio’s filter: the cards move this long after the tab |
Reduced motion: moves, turns and sizes jump (play()), fades and colours still animate; the CSS hovers, the ticker and the
spinners switch off with motion-reduce:.
The easing and animation tokens of theme.css (Tailwind utilities ease-s0, animate-turn …):
| Token | Holds |
|---|---|
--ease-s0 |
Spring S0 as a linear() curve, run over 400 ms (duration-400): ProjectCard’s hover, ServiceList’s dimming |
--ease-s2 |
Spring S2 as a linear() curve (a slight overshoot), over 400 ms: Gallery tiles, the arrow circles of ServiceRow, ServiceCard, AwardRow and FaqList, the footer links |
--ease-form |
cubic-bezier(0.44, 0, 0.56, 1): the SubmitButton’s fills (0.2 s) and the LoadSpinner fade (0.3 s) |
--animate-ticker |
the Ticker belt, one copy’s width (--ticker-period); each Ticker sets its duration inline |
--animate-turn |
one turn a second: the spinners of SubmitButton and LoadSpinner |
Components
Section titled “Components”Files are components/<group>/<Name>.astro. A slot is the component’s content (a label, a list of items).
| Group | Component | What it is | Props that matter | Used in |
|---|---|---|---|---|
| actions | Button |
Framer Primary: a pill (8 / 16) with the label in Menu 16 that rolls up to a second copy on hover (S0); the colours stay. A link with href (an external one opens in a new tab), otherwise a <button>. The slot is the label |
tone (black default, white over a photo), href, type, data-* |
Home (hero, About, projects), About, a service page, Showcase, 404, Footer |
| actions | RollingLabel |
the label roll on its own: two copies 10 apart, the column rolls up 29px on hover | stages (follow the links’ two-step hover instead of the plain one) |
inside Button, MenuLink, MenuTab |
| actions | MenuLink |
Framer Button/Menu: Menu 16 over 10px, in the text colour; hover rolls the label and grows a faint underline, a solid one 0.5 s later | href, current (aria-current only), data-* |
Header, the social links (Home hero, About, Contact) |
| actions | MenuTab |
Button/Menu as a filter tab: a <button> with aria-pressed; the active one is at 50% with the solid underline. setMenuTab(button, active) in scripts/stages.ts switches it |
active, data-* |
Portfolio |
| actions | ArrowLink |
Framer Secondary: the label and a 14px arrow; hover grows the underlines and turns the arrow 45° 0.5 s later | href |
Home hero, 404 |
| brand | Logo |
the “Daniel Mercer” wordmark as inline SVG in the text colour, a link home; 62 wide on phones, 72 from tablets | href, label (the link’s name), data-* |
Header |
| icons | Icon |
a Phosphor icon as inline SVG in the text colour (arrow-up-right, plus, in icons/paths.ts) |
name (IconName), class (the size; 14px when left out), label |
inside ArrowLink, ServiceRow, ServiceCard, AwardRow, FaqList |
| motion | Collapse |
a box that grows from nothing to its height and back (S0), hiding closed content from the keyboard and screen readers; setCollapse() in scripts/collapse.ts opens it |
open, id (the button’s aria-controls) |
— (no Lookis page uses it yet; the style guide shows it) |
| cards | ProjectCard |
Framer Card/Project: a 565 : 600 photo; on desktop hover the frame shrinks 14px and a blurred cover with corner marks fades in over the title and summary; on tablets and phones the cover always shows | data (ProjectCardData: href, title, summary, image), sizes |
Home, Portfolio, a project (related projects) |
| cards | ServiceRow, ServiceList |
Framer Service With Image: photo, title, text, price pill and arrow circle in one row on desktop, a column on tablets and phones; ServiceList sets the rows between Line dividers and dims the others on hover |
data (ServiceRowData: href, title, text, price, image); list: items |
Home |
| cards | ServiceCard, ServiceCardList |
Framer Service No Image: a Black 02 card with the title, text and price pill, and an arrow circle that fills on desktop hover | data (ServiceCardData: href, title, text, price); list: items |
Services, a service page (Other Services) |
| cards | TestimonialCard |
Framer Card/Testimonial: the quote (Heading 6) and the client — portrait (80px, 40px above the name on phones), name, role | data (TestimonialCardData: quote, name, role, photo) |
inside TestimonialSlider |
| cards | AwardRow |
Framer Card/Award: a Black 02 card link with the year, an arrow circle that fills on hover (S2), the title and who gave it | data (AwardRowData: year, title, by, href), titleAs |
About |
| media | FillImage |
an image that fills its positioned parent (absolute inset-0): a /images/<file> path from the content, resized to WebP for sizes, or a CMS URL |
src, alt, sizes, priority (the first screen’s photo), class (object-cover) |
every photo |
| data | FactList |
Framer Number cards: Black 02 boxes, two columns from tablets, with the number (Heading 2), the label and an optional line | items (FactData), grid (a whole class) |
Home, About (without lines) |
| data | NumberList |
Framer Misc/Number Text: rows numbered 01, 02 … between Line dividers, in Heading 6; an empty entry drops out without renumbering | items (strings) |
a service page (Perfect for, What’s Included) |
| patterns | RichText |
CMS rich text in Big Paragraph: headings, paragraphs with bold, italic and line breaks, bulleted and numbered lists (the collections’ schema accepts paragraphs only; the style guide shows the rest) | blocks (RichTextBlock), headings (h2 or h3 style), width (a whole class) |
a project (Overview), a service page |
| patterns | Ticker |
Framer Ticker: items moving left forever; the pointer slows it to a stop unless slowOnHover is false; still for reduced motion. The slot is the items |
speed (px a second), gapClass, copies, slowOnHover, label |
Home hero (the name) |
| patterns | TestimonialSlider |
Framer Slideshow/Testimonial: one quote at a time, the next one peeking in; moves every 4 s (SL), loops, waits off screen; two arrows | items (TestimonialCardData), label, previousLabel, nextLabel |
Home, Services, a service page |
| patterns | Gallery |
Framer Misc/Gallery: square photos in 5 / 4 / 2 columns, each a link; hover shrinks the photo to 90% (S2); the slot sits over the centre | images, href |
Showcase (above the footer on most pages) |
| patterns | WordAppear |
Framer “appear by word, on mount”: each word rises 10px out of a 10px blur, 0.05 s apart, once | text, class (the text style) |
Home hero |
| patterns | LoadOnScroll, LoadSpinner |
Framer “load on scroll”: the first pageSize blocks and a spinner that asks for the next page within 500px of the screen; every block is in the page, hidden, for crawlers and without JavaScript. LoadSpinner is the ring on its own |
count, pageSize, label + slot (i) => block, class (the gap); spinner: label, class (a whole class) |
Portfolio (the spinner; LoadOnScroll itself is not used by a page) |
| patterns | FaqList |
Framer Card/Question list: numbered questions between Line dividers, each opening on its own; the circle fills and the plus turns into a cross (S2) | items (FaqItem: question, answer), id (prefix of the ids that link each button to its answer) |
Services |
| navigation | Hamburger |
Framer Button/Hamburger, 24 × 16: two lines that meet (between) and then cross into an X (open); the header times the steps with setHamburger() |
label, controls, phase (the look it starts in: the style guide), data-* |
Header (phones) |
| layout | Section |
a page section: gutters, vertical padding, the content centred and capped at width, clipped like Framer’s sections. Also sectionGutters, sectionPadding, sectionGap (layout/section.ts) |
padding, gap, width (whole class strings), innerClass, class, id, as, label |
every page section except the Home hero and the 404 |
| layout | SectionLabel |
Framer Label: a 6px round dot and the label in Label 12, Black 80; light is White, over a photo |
light |
SectionIntro; About, Contact, Services, a service page |
| layout | SectionIntro |
Framer Title Section: the label, the title (Heading 2), an optional lead and an optional action (the action slot) |
label, title, lead, align (left, center, center-md), light, as, titleClass, leadClass, capClass, labelGap |
most sections |
| layout | SplitLayout |
Framer’s two-column page shell: the page photo on the left (sticky from tablets), the blocks (the slot) on the right. Also splitPadding (layout/split.ts) |
image, preload, gap (a whole class) |
About, Services, a service page, Contact, a project |
| forms | Form |
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) or, without one, runs a demo |
name (contact), subject, endpoint, hidden, submitLabel, successLabel, errorLabel, redirectTo, demo ("fail": the style guide’s failing sample), submitClass, class |
Contact |
| forms | FieldControl, FormField, fieldSurface |
Framer form input: a White field with a 1px Line border drawn inside, 4px corners; focus turns the border Black 50. FieldControl is the control alone, named through label for assistive technology (the contact form’s fields); FormField adds a visible label with a red asterisk on a required field; fieldSurface (forms/field.ts) is the class string |
name, label, type (text, email, tel, url, date, select, textarea), placeholder, required, autoComplete, defaultValue, options, class (the grid placement) |
Contact (FieldControl); FormField is for a form with visible labels |
| forms | SubmitButton |
Framer Submit (Default, Loading, Success, Error, Disabled), 40 tall: Black, Black 50 on hover, a White ring while sending, red on a pale red fill after a failure; the markup holds the four looks and the form script switches data-status |
status (FormStatus), label, successLabel, errorLabel, disabled |
inside Form |
| forms | honeypotField |
the name of the hidden field bots fill in (forms/form-state.ts, shared by Form and the server route) |
— | scripts/form.ts, src/lib/forms/deliver.ts |
| utils | CurrentYear |
the visitor’s current year: the page ships the build year and a tiny script swaps in the current one | — | Footer |
Internal pieces (not meant to be used on their own): actions/Underline, patterns/RichTextBlock,
patterns/RichTextInline.
Page sections (the hero, the projects, the services …) live in src/components/sections/; the header, the footer and the
clock in src/components/site/.
Scripts
Section titled “Scripts”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.
| File | Function | What it does |
|---|---|---|
hover.ts |
initHover() |
plays the data-motion states of every data-hover element on hover (called by the layout) |
stages.ts |
initStages(), setMenuTab() |
the two-step hover of MenuLink, MenuTab and ArrowLink (data-stages, data-variants); switches a filter tab |
word-appear.ts |
initWordAppear() |
WordAppear: the words rise one after the other as the page loads |
ticker.ts |
initTickers() |
Ticker: measures one copy, slows to a stop under the pointer unless data-ticker-steady |
testimonial-slider.ts |
initTestimonialSliders() |
TestimonialSlider: autoplay, the arrows, the loop |
faq.ts |
initFaqs() |
FaqList: opens and closes each question |
portfolio-projects.ts |
initPortfolioProjects() |
Portfolio’s filter tabs, the cards’ slide and the pages loaded on scroll (src/components/sections/PortfolioProjects.astro) |
load-on-scroll.ts |
initLoadOnScroll(), initLoadSpinners() |
LoadOnScroll; the spinner’s ring fading in and out |
collapse.ts |
setCollapse() |
opens / closes a Collapse (used by the rows that have one) |
hamburger.ts |
setHamburger() |
the hamburger lines and aria-expanded (the header times the steps) |
form.ts |
initForms() |
Form: send, the Submit states, reset |
current-year.ts |
initCurrentYear() |
CurrentYear |
style-guide.ts |
initReplays(), initSpringDemos(), initCurveDemos(), initCollapseDemos(), initHamburgerDemos(), initMenuTabDemos() |
the style guide’s demos (src/components/style-guide) |
../../components/site/header.ts |
initHeader() |
the phone menu |
../../components/site/clock.ts |
initClocks() |
the header’s clock: the time of owner.timeZone, kept current |
New component: put it in the right group, add it to /style-guide and to this table; new interactivity: a script as above.