The project uses a curated component sourcing strategy defined in the charter. Sources are split into two categories: Integrated Sources (child sites use directly via build-time infrastructure) and Design Reference (agents consult for CORE authoring; child sites copy-paste-adapt).
Who this is for
- CORE implementors adapting design reference blocks into the project’s component system
- Child site developers consuming Starwind components via the token bridge
- Developers building new components and deciding which source to start from
Source categories
Integrated sources
Child sites use these directly — build infrastructure handles token mapping and compatibility.
- Starwind (external link) — bridge-enabled installable component library. Child sites import the Starwind token bridge and install components via
npx starwind@latest add. Never runnpx starwind init— it overwrites project configuration. The project ships preconfiguredstarwind.config.jsonandcomponents.jsonfiles — see the Using Design Blocks in Child Sites guide for the full setup process. - Motion — animation engine. Core uses
motion/mini; child sites may import the full package.
Design reference
Agents consult these when authoring CORE components. Child sites copy-paste-adapt patterns manually.
- Tailwind Plus Blocks — primary HTML pattern library. Copy section HTML, convert to Astro components, adapt to project tokens.
- Flowbite — page compositions and component patterns. Flowbite’s
primary-*color scale is its own custom definition and requires manual adaptation to project tokens. - Tailwind UI Kit (Catalyst) — component API patterns and class composition reference.
- Font Awesome Pro — icon library. SVGs are manually copied into the project’s icon directories (
src/core/assets/icons/andsrc/site/assets/icons/). - Custom — build from scratch only when no curated source provides an adequate pattern.
Integration process
When adapting a block from a tier-1 source into the project:
- Select the block or pattern from the appropriate tier-1 source.
- Create an Astro component in the correct
src/core/components/subdirectory (e.g.,sections/,primitives/,ui/). - Replace raw HTML elements with project primitives — use
Headinginstead of<h1>–<h6>,Buttoninstead of<button>,Iconinstead of inline SVGs,Linkinstead of<a>. - Replace hardcoded colors with semantic tokens (
--st-*). See the token adaptation section below. - Replace hardcoded spacing with primitive tokens or Tailwind utilities using the project’s spacing scale.
- Add BEM class hooks for site-level override points (e.g.,
class="c-hero",class="c-hero__heading"). - Add a Props interface with TypeScript types for all configurable properties.
- Add the ownership marker —
// CORE-OWNEDat the top of the file. - Verify accessibility — keyboard operability, visible focus states, ARIA attributes where semantic HTML is insufficient.
What NOT to do
These rules differ between CORE authoring and child site consumption.
CORE authoring rules
When building or modifying CORE components (src/core/):
- Do not install design block libraries as npm dependencies for runtime use. CORE adapts patterns from design reference sources; it does not depend on them at runtime. (Build-time dependencies like
tailwind-variantsandtailwind-mergeare permitted — they produce static output with zero client JS in SSG.) - Do not copy CSS frameworks or utility classes. The project’s existing Tailwind v4 setup provides all utility classes. External utility CSS would conflict.
- Do not use component-specific JavaScript from external sources. CORE interactive behavior must be implemented with vanilla TypeScript, not vendor scripts.
- Do not import external fonts or assets. Use the project’s asset pipeline (
src/core/assets/andsrc/site/assets/). - Do not run
npx starwind init. It overwrites project configuration. See the Using Design Blocks in Child Sites guide for how to set up Starwind manually.
Child site consumption rules
When child sites consume Starwind components via the token bridge:
- Starwind dependencies are permitted.
tailwind-variantsandtailwind-mergeare already installed as CORE production dependencies. Starwind components import them at build time. - Starwind vanilla JS is permitted. Interactive Starwind components (~10) use vanilla JS that coexists with CORE’s vanilla TypeScript — each manages independent DOM elements. Child sites use CORE’s vanilla TS components for navigation/search/theme and Starwind’s vanilla JS for UI widgets.
- Starwind components must land in the site-owned zone.
starwind.config.jsonmust setcomponentDirtosrc/site/components/starwind. Files insrc/site/are site-owned by location — no explicit ownership markers required on auto-generated third-party files. - Do not run
npx starwind init. See the Using Design Blocks in Child Sites guide for the manual setup process includingstarwind.config.jsoncreation. - Replace Tabler icons with Font Awesome. Starwind components use Tabler icons by default; replace them with the project’s
Iconprimitive.
Token adaptation
External blocks use generic Tailwind classes with hardcoded color references:
<!-- External block (before adaptation) -->
<div class="bg-blue-500 text-gray-700 border-gray-200"></div>
These must be replaced with semantic token references using the v4 parenthesis shorthand:
<!-- Adapted to project tokens -->
<div
class="bg-(--st-color-surface-soft) text-(color:--st-color-text-default) border-(--st-color-border-default)"
></div>
Note: Use the
color:type hint prefix for text color tokens to disambiguate fromfont-sizeutilities, which also use thetext-prefix. See the Component Authoring guide for the full token reference convention.
This adaptation ensures theme mode compatibility, brand consistency, and the ability for site-level overrides to propagate through the token cascade without modifying component internals.
Child site consumption
Child sites have two workflows for using design blocks, depending on the source category.
Starwind (integrated — bridge-based)
Starwind components work directly via the token bridge with no manual token adaptation. See the Using Design Blocks in Child Sites guide for the complete setup and workflow guide.
Design reference sources (copy-paste-adapt)
Tailwind Plus and Flowbite provide HTML/CSS patterns with hardcoded Tailwind classes. The workflow is:
- Copy the HTML block from the source.
- Adapt hardcoded color classes to project
--st-*tokens (see token adaptation above). - Replace
dark:variant pairs (e.g.,bg-white dark:bg-gray-900) with single token references (e.g.,bg-(--st-color-bg-canvas)) — the token cascade handles mode switching. - Flowbite blocks using
primary-*colors require adaptation since that color scale is Flowbite’s custom definition, not a Tailwind built-in.
The dark: Tailwind variant is globally active via @custom-variant dark in global.css, so copied blocks with dark: utilities render correctly in both modes even before full token adaptation. This allows incremental adaptation — blocks work immediately, then can be refined to use semantic tokens.
Current limitations for design reference sources
- No token bridge exists for Flowbite or Tailwind Plus — manual token adaptation is inherent to the copy-paste format.
- Flowbite’s Tailwind plugin is not installed — Flowbite-specific utility classes (e.g.,
primary-*) do not resolve and must be adapted.