Shared design system for Asso Info Evry Astro projects. Provides a cohesive dark theme with glassmorphism effects, SF Symbols icons, and reusable Astro components.
- Dark theme with glassmorphism (blur + transparency)
- CSS custom properties (design tokens) for colors, spacing, typography
- Reusable Astro components (Header, Footer, Forms, etc.)
- SF Symbols icon integration
- Mobile-first responsive design
- Accessibility-focused
Add as a git submodule:
git submodule add https://github.com/info-evry/astro-design.git designImport the full design system in your Astro layout:
---
import '../design/src/index.css';
---Or import specific parts:
@import '../design/src/tokens/colors.css';
@import '../design/src/components/buttons.css';src/
βββ tokens/ # CSS custom properties
β βββ colors.css # Color palette & gradients
β βββ spacing.css # Spacing scale (4px base)
β βββ typography.css # Fonts & text sizes
β βββ effects.css # Radius, shadows, transitions
βββ base/
β βββ reset.css # CSS reset, SF Symbols font-face declaration
βββ components/
β βββ buttons.css # Button variants
β βββ cards.css # Card components (glass, surface)
β βββ forms.css # Form elements & validation
β βββ modals.css # Modal dialogs
β βββ sections.css # Section layouts & containers
β βββ header.css # Header & navigation
β βββ hero.css # Hero sections
β βββ admin.css # Admin dashboard styles
β βββ disclosure.css # Accordion/disclosure groups
β βββ kpi-stats.css # Statistics cards
β βββ team-cards.css # Team grid layouts
βββ utilities/
β βββ animations.css # Keyframes & animation classes
β βββ helpers.css # Utility classes
βββ components/ # Astro components
β βββ Header.astro # Site header with mobile menu
β βββ Footer.astro # Site footer
β βββ MobileNav.astro # Mobile tab bar navigation
β βββ HeroBackground.astro # Animated hero background
β βββ SectionHeader.astro # Section title component
β βββ FormInput.astro # Form input with label
β βββ FormSelect.astro # Form select with label
β βββ FormTextarea.astro # Form textarea with label
β βββ FilterSelect.astro # Filter dropdown
β βββ DataTable.astro # Data table component
β βββ Badge.astro # Status badge
βββ integrations/
β βββ sf-symbols.ts # Vite plugin for SF Symbols shortcodes
βββ symbols/
β βββ sfsymbols.json # SF Symbols character mappings
βββ index.css # Main entry point
| Token | Value | Description |
|---|---|---|
--color-primary |
#001BA5 |
Electric blue |
--color-primary-light |
#0ea5e9 |
Light blue accent |
--color-bg |
#000000 |
Background black |
--color-surface |
#0a0a0a |
Surface color |
--color-text |
#ffffff |
Primary text |
--color-text-secondary |
#a1a1aa |
Secondary text |
--color-text-muted |
#71717a |
Muted text |
4px base unit scale from --space-1 (4px) to --space-32 (128px).
- Font: SF Pro (self-hosted, subset for Latin characters)
- Sizes:
--text-xs(12px) to--text-6xl(72px) - Tracking:
--tracking-tight,--tracking-normal,--tracking-wide
---
import Header from '../design/src/components/Header.astro';
import Footer from '../design/src/components/Footer.astro';
import MobileNav from '../design/src/components/MobileNav.astro';
---
<Header
homeUrl="/"
navLinks={[{ href: '#about', label: 'About' }]}
ctaHref="/join"
ctaLabel="Join"
/>
<MobileNav
items={[{ href: '#about', label: 'About', icon: 'info.circle' }]}
ctaHref="/join"
ctaLabel="Join"
ctaIcon="person.badge.plus"
/>
<!-- SF Symbols using shortcodes -->
<span class="sfs sfs-lg" data-sfs="@sfs:checkmark.circle.fill@"></span>
<Footer /><button class="btn btn-primary">Primary</button>
<button class="btn btn-secondary">Secondary</button>
<button class="btn btn-primary btn-lg">Large</button>
<button class="btn btn-primary btn-sm">Small</button><div class="glass-card card-content">
Glassmorphism card with blur
</div>
<div class="surface-card card-content">
Solid surface card
</div><form class="form">
<div class="form-group">
<label for="email">Email</label>
<input type="email" id="email" placeholder="you@example.com">
</div>
<div class="form-group">
<label for="message">Message</label>
<textarea id="message"></textarea>
</div>
</form><section class="section">
<div class="container">
<div class="section-header">
<span class="section-label">About</span>
<h2 class="section-title">Who We Are</h2>
<p class="section-description">Description text</p>
</div>
</div>
</section>The design system includes SF Symbols support via shortcodes that are replaced at build time.
Add the integration to your astro.config.mjs:
import sfSymbols from './design/src/integrations/sf-symbols';
export default defineConfig({
integrations: [sfSymbols()],
});Use the @sfs:symbol.name@ shortcode format in data attributes:
<!-- Inline icon -->
<span class="sfs sfs-md" data-sfs="@sfs:checkmark@"></span>
<!-- Different sizes -->
<span class="sfs sfs-sm" data-sfs="@sfs:xmark@"></span>
<span class="sfs sfs-lg" data-sfs="@sfs:person.2.fill@"></span>
<span class="sfs sfs-xl" data-sfs="@sfs:calendar@"></span>
<span class="sfs sfs-2xl" data-sfs="@sfs:star.fill@"></span>- Shortcodes like
@sfs:checkmark@are written in the HTML - At build time, the Vite plugin replaces them with actual Unicode characters
- CSS uses
::before { content: attr(data-sfs); }to display the symbol - Font subsetting scans for shortcodes and creates an optimized font file
| Class | Font Size |
|---|---|
sfs-xs |
0.75rem |
sfs-sm |
0.875rem |
sfs-md |
1rem |
sfs-lg |
1.25rem |
sfs-xl |
1.5rem |
sfs-2xl |
2rem |
For dynamic icon names (e.g., in MobileNav), use template expressions:
<span class="sfs sfs-lg" data-sfs={`@sfs:${item.icon}@`}></span>The shortcode will be resolved after SSR when the actual symbol name is known.
bun testTests cover SF Symbols mapping and CSS token existence.
# Run tests
bun test
# Watch mode
bun test --watch- astro-core - Shared code library (Router, helpers)
- astro-asso - Main association website
- astro-ndi - NDI registration platform
- astro-join - Membership portal
- astro-knowledge - Shared content
AGPL-3.0 - Asso Info Evry