Add it to your package

Inside the dash monorepo: declare the workspace dependency, install, run. The lib is symlinked — no publish step.

1 · Declare the workspace dependency
json
// packages/your-app/package.json
{
	"dependencies": {
		"@dashfi/svelte": "workspace:*"
	}
}
2 · Install + run
bash
# inside the dash monorepo
pnpm install                                # picks up the workspace symlink
nx serve dashfi-ui                          # OR pnpm --filter dashfi-ui dev
# the lib is live-symlinked — edits in libs/svelte-components/lib/ hot-reload
Tailwind setup

The lib ships a Tailwind preset (jade brand color, ink primary, cobalt secondary, orange destructive). Extend it from your app config.

typescript
// packages/your-app/tailwind.config.ts
import type { Config } from 'tailwindcss';
import { tailwindPreset } from '@dashfi/svelte/design-system/tailwind/config';

const config: Config = {
	presets: [tailwindPreset],
	content: [
		'./src/**/*.{html,js,svelte,ts}',
		// Scan the lib source so Tailwind generates classes used by its components
		'../../libs/svelte-components/lib/src/lib/**/*.{html,js,svelte,ts}',
	]
};

export default config;
Vite config

SSR needs the lib bundled (Svelte 5 component compilation). Add @dashfi/svelte to ssr.noExternal.

typescript
// packages/your-app/vite.config.ts
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vitest/config';
import tailwindcss from '@tailwindcss/vite';

export default defineConfig({
	plugins: [tailwindcss(), sveltekit()],
	// Required — bundle lib code in SSR so Svelte 5 components compile correctly
	ssr: {
		noExternal: ['@dashfi/svelte']
	}
});
Stylesheet entry

Import the lib's stylesheet once at the top of your app.css. Then layer your own @theme overrides on top.

css
/* packages/your-app/src/app.css */
@import 'tailwindcss';
@import '@dashfi/svelte/styles/global.css';     /* HSL token layer + base resets */

/* Optional — scoped overrides for your app surface */
@theme {
	--color-brand: #2b605c;
	--color-brand-foreground: #ffffff;
}
Quick start

A working component in 10 lines. Drop this into any Svelte 5 route once the four config steps above are done.

svelte
<script lang="ts">
	import { Button } from '@dashfi/svelte/ui/button';
	import { Card, CardHeader, CardTitle, CardContent } from '@dashfi/svelte/ui/card';
</script>

<Card>
	<CardHeader>
		<CardTitle>First card</CardTitle>
	</CardHeader>
	<CardContent>
		<Button variant="brand">Hello, Dash</Button>
	</CardContent>
</Card>
Theming

Three layered tiers: base primitives → product semantic → marketing aliases. The full taxonomy is documented at /foundations/color. To override, redeclare the semantic layer.

1
Base palette

13 brand primitives — --dash-jade, --dash-cobalt, --dash-ink, etc. Single source of every hex.

2
Product semantic

Component-facing — --bg, --fg, --brand, --border. Two modes (light + dark). What you override.

3
Marketing aliases

--m-* tokens. Reference the base palette directly. Used by marketing surfaces.

Example — shift jade
css
/* app.css  ·  override a single semantic token */
:root {
	--brand: #1a8a78;
	--color-brand: #1a8a78;
}

html.dark {
	--brand: #6dd0c6;
	--color-brand: #6dd0c6;
}

/* The lib's components read --color-brand via Tailwind utilities (bg-brand,
   text-brand). The portal chrome reads --brand directly. Keep both in sync. */
Component stability

62 components shipped — 28 stable, 34 beta, 0 deprecated. Beta APIs may shift; stable APIs are frozen until a major version cut.

Component
Category
Status
Import
Button
Inputs
Stable
@dashfi/svelte/ui/button
Input
Inputs
Stable
@dashfi/svelte/ui/input
Textarea
Inputs
Stable
@dashfi/svelte/ui/textarea
Label
Inputs
Stable
@dashfi/svelte/ui/label
Checkbox
Inputs
Stable
@dashfi/svelte/ui/checkbox
Switch
Inputs
Stable
@dashfi/svelte/ui/switch
Radio Group
Inputs
Stable
@dashfi/svelte/ui/radio-group
Select
Inputs
Stable
@dashfi/svelte/ui/select
Toggle
Inputs
Stable
@dashfi/svelte/ui/toggle
Toggle Group
Inputs
Stable
@dashfi/svelte/ui/toggle-group
Calendar
Inputs
Stable
@dashfi/svelte/ui/calendar
Badge
Display
Stable
@dashfi/svelte/ui/badge
Avatar
Display
Stable
@dashfi/svelte/ui/avatar
Pill
Display
Stable
@dashfi/svelte/ui/pill
Empty
Display
Stable
@dashfi/svelte/ui/empty
Separator
Display
Stable
@dashfi/svelte/ui/separator
Skeleton
Display
Stable
@dashfi/svelte/ui/skeleton
Code Block
Display
Beta
@dashfi/svelte/ui/code-block
Alert
Feedback
Stable
@dashfi/svelte/ui/alert
Alert Dialog
Feedback
Stable
@dashfi/svelte/ui/alert-dialog
Dialog
Feedback
Beta
@dashfi/svelte/ui/dialog
Sheet
Feedback
Stable
@dashfi/svelte/ui/sheet
Popover
Feedback
Beta
@dashfi/svelte/ui/popover
Tooltip
Feedback
Beta
@dashfi/svelte/ui/tooltip
Progress
Feedback
Stable
@dashfi/svelte/ui/progress
Linear Loader
Feedback
Stable
@dashfi/svelte/ui/linear-loader
Loader
Feedback
Stable
@dashfi/svelte/ui/loader
Spinner
Feedback
Beta
@dashfi/svelte/ui/spinner
Tabs
Navigation
Stable
@dashfi/svelte/ui/tabs
Accordion
Navigation
Stable
@dashfi/svelte/ui/accordion
Collapsible
Navigation
Beta
@dashfi/svelte/ui/collapsible
Breadcrumb
Navigation
Stable
@dashfi/svelte/ui/breadcrumb
Pagination
Navigation
Beta
@dashfi/svelte/ui/pagination
Pagination Wrapper
Navigation
Beta
@dashfi/svelte/ui/pagination-wrapper
Sidebar
Navigation
Beta
@dashfi/svelte/ui/sidebar
Dropdown Menu
Navigation
Beta
@dashfi/svelte/ui/dropdown-menu
Scroll Area
Navigation
Beta
@dashfi/svelte/ui/scroll-area
Card
Layout
Stable
@dashfi/svelte/ui/card
Multi Select
Inputs
Beta
@dashfi/svelte/ui/multi-select
Phone Input
Inputs
Beta
@dashfi/svelte/ui/phone-input
Tel Input
Inputs
Beta
@dashfi/svelte/ui/tel-input
Date Range Selector
Inputs
Beta
@dashfi/svelte/ui/date-range-selector
Range Calendar
Inputs
Beta
@dashfi/svelte/ui/range-calendar
Form
Inputs
Beta
@dashfi/svelte/ui/form
Alert Error
Display
Beta
@dashfi/svelte/ui/alert-error
Indicator
Display
Beta
@dashfi/svelte/ui/indicator
Item
Display
Beta
@dashfi/svelte/ui/item
Logo
Display
Stable
@dashfi/svelte/ui/logo
Merchant Logo
Display
Beta
@dashfi/svelte/ui/merchant-logo
Flow Lines
Display
Beta
@dashfi/svelte/ui/flow-lines
Magnetic Hover
Display
Beta
@dashfi/svelte/ui/magnetic-hover
Drawer
Feedback
Beta
@dashfi/svelte/ui/drawer
Fullscreen Dialog
Feedback
Beta
@dashfi/svelte/ui/fullscreen-dialog
Hover Card
Feedback
Beta
@dashfi/svelte/ui/hover-card
Toast (Sonner)
Feedback
Beta
@dashfi/svelte/ui/sonner
Support Modal
Feedback
Beta
@dashfi/svelte/ui/support-modal
Command
Navigation
Beta
@dashfi/svelte/ui/command
Sub Navigation
Navigation
Beta
@dashfi/svelte/ui/navigation
Table
Data
Beta
@dashfi/svelte/ui/table
Enhanced Table
Data
Beta
@dashfi/svelte/ui/enhanced-table
Data Table
Data
Beta
@dashfi/svelte/ui/data-table
Table Filters
Data
Beta
@dashfi/svelte/ui/table-filters
Add a new component

The lib is the source of truth. Add the component in libs/svelte-components/lib first, then document it here in dashbook.

bash
# Add a new component to @dashfi/svelte
cd libs/svelte-components/lib

# Generate the directory: src/lib/ui/your-component/
#   your-component.svelte
#   your-component.stories.svelte
#   index.ts

# Re-export
echo "export { default as YourComponent } from './your-component.svelte';" \
	>> src/lib/ui/your-component/index.ts

# Build the lib (dashbook hot-reloads because of link: protocol)
pnpm build

# Open a stories file alongside — Storybook picks it up automatically
  • Match existing patterns — Svelte 5 runes ($props, $state, $derived), tailwind-variants for variants, bits-ui for keyboard / focus semantics.
  • Always forward class through cn(...) from $lib/utils.js.
  • Make ref bindable for surfaces consumers will want to attach to.
  • Add the new slug + metadata to dashbook/src/lib/content/components.ts.
  • Generate a route page at dashbook/src/routes/components/{slug}/+page.svelte with the canonical Preview / Code / Docs / Anatomy / Accessibility / Changelog tabs.
Contributing

Internal-only. Issues and PRs land in the dash monorepo. Voice and chrome conventions live in PLAN.md §13.

Component changes

Open a PR against github.com/FunnelDash/core touching libs/svelte-components/lib/. CI runs visual regression via Storybook Chromatic and svelte-check. Dashbook will hot-reload via the link: symlink — no extra step.

Dashbook changes

Documentation, new patterns, foundations content — PR against FunnelDash/core under packages/brand-book/. Match the existing chrome (InnerPage, PageHeader, Section) and tone (sentence case, no exclamation marks, no emoji). See PLAN.md §13 in the repo root.

What we don't take

New components without a real consumer in dashfi-ui or another internal package. New patterns without a documented Dash.fi use case. Visual reskins of the portal that drift from the canonical handoff.

External references

Storybook is the engineering deep-dive; the Figma library is the design source of truth and ships in a parallel track.