Basinfy/Basinfy-SaaS-Studio / .claude/skills/saas-frontend-taste
saas-frontend-taste
VerifiedDesign, refine, and verify SaaS screens with anti-slop copy and responsive layout checks.
assets/moments/word-highlight/moment.js
View on GitHub/*
word-highlight - one statement's words turn from grey to ink, word by word, as the statement crosses
the middle of the screen. Scrubbed to the scrollbar (it runs back when the visitor scrolls up); a
<strong> word turns to the accent instead of the ink. For the one statement a page stands on, 12 to
40 words, on its own ground or beside one picture.
<section class="section" data-moment="word-highlight">
<div class="container"><p class="mo-wh__text">Give tasks to <strong>Relay</strong> like a teammate …</p></div>
</section>
opts: from 0.85 (the statement's top at this share of the screen's height turns the first word),
to 0.45 (its bottom at this share turns the last).
Reduced motion, no script: the whole statement in ink. It runs on a phone too (one paragraph's
colours, no layout, no pin).
*/
export const phone = true;
export default function (root, opts, lib) {
const text = root.matches('p, h2, h3, blockquote') ? root : (root.querySelector('.mo-wh__text') || [...root.querySelectorAll('p, h2, h3, blockquote')].find(p => !p.matches('.t-label, .t-small, .muted')));
if (!text) return {};
root.classList.add('mo-wh');
const words = lib.split(text, 'words').map(i => i.parentElement);
if (lib.reduced()) { words.forEach(w => w.classList.add('is-on')); root.classList.add('is-done'); return {}; }
const from = opts.from ?? 0.85, to = opts.to ?? 0.45;
let n = -1;
const s = lib.scrub(text, (p, r) => {
const vh = innerHeight, start = vh * from, end = vh * to;
const t = lib.clamp((start - r.top) / Math.max(1, (start - end) + r.height));
const atEnd = innerHeight + scrollY >= document.documentElement.scrollHeight - 2; // page bottom: it can climb no further, the statement stands in full ink
const k = atEnd ? words.length : Math.round(t * words.length);
if (k === n) return;
n = k;
words.forEach((w, i) => w.classList.toggle('is-on', i < k));
}, { mode: 'view' });
return { destroy: s.destroy };
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |