Comprehensive instructions for developing Svelte components that maintain consistency with the established Workilo design system and architecture.
src/
├── lib/
│ ├── components/
│ │ ├── dashboard/ # Dashboard-specific components
│ │ ├── workflows/ # Workflow-specific components
│ │ ├── app/ # App shell components
│ │ ├── auth/ # Authentication components
│ │ └── [feature]/ # Feature-specific folders
│ ├── styles/ # CSS files per feature
│ └── workalongs.ts # Data definitions
└── routes/
├── app/ # Protected app routes
│ ├── workflows/ # Workflow pages
│ ├── workalongs/ # Workalong management
│ └── [feature]/ # Other app features
└── [public]/ # Public marketing pages--wk-primary: #10B981--wk-secondary: #6D28D9--wk-accent: #FF8A00bi-*) for all iconographycol-*, row, g-*)<script lang="ts">
// Props with TypeScript types
export let data: ComponentData[];
export let isLoading = false;
// Internal state
let internalState = '';
// Functions
function handleAction() {
// Component logic
}
</script>
<!-- Main template -->
<div class="component-container">
<!-- Content -->
</div>
<style>
/* Component-specific styles */
</style>Display metrics, quick actions, overview data. Use cards with shadow and hover effects.
Display workflow states, phases, progress. Include status-based styling and progress indicators.
<div class="card border-0 shadow-sm h-100">
<div class="card-header bg-transparent border-0 pb-0">
<h5 class="card-title mb-0">
<i class="bi bi-[icon] me-2 text-primary"></i>
Title
</h5>
</div>
<div class="card-body">
<!-- Content -->
</div>
</div>
<style>
.card {
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}
</style>xs: < 576px (mobile)sm: ≥ 576pxmd: ≥ 768pxlg: ≥ 992pxxl: ≥ 1200pxxxl: ≥ 1400px<div class="row g-3">
<div class="col-12 col-lg-6"><!-- Content --></div>
<div class="col-12 col-lg-6"><!-- Content --></div>
</div>interface Workflow {
title: string;
basedOn: string;
subtitle: string;
workalongs: Workalong[];
phases: WorkflowPhase[];
}
interface Workalong {
name: string;
role: string;
color: string;
avatar: string;
}/app/* routes are protected<div class="d-flex justify-content-between align-items-center mb-4">
<div>
<h1 class="h2 mb-1">Page Title</h1>
<p class="text-muted mb-0">Page description</p>
</div>
<div class="d-flex gap-2">
<button class="btn btn-outline-secondary">Secondary Action</button>
<button class="btn btn-primary">Primary Action</button>
</div>
</div>function getStatusIcon(status: string) {
switch(status) {
case 'done': return 'bi-check-circle-fill';
case 'in-progress': return 'bi-arrow-clockwise';
case 'pending': return 'bi-circle';
default: return 'bi-circle';
}
}