A client's design system
What is yours to decide when Khaeli builds your design system, what is already decided, and the site you receive.
This page is for the team at a client. When Khaeli builds a product for you, it also builds your design system and hands you a site that documents it, so that your own people can apply the design in places Khaeli never builds.
Your brand on the foundation
The foundation
Your brand
import { useId } from "react"
import { Button } from "@/components/ui/button"
import { Checkbox } from "@/components/ui/checkbox"
import { Label } from "@/components/ui/label"
import { Progress, ProgressLabel, ProgressValue } from "@/components/ui/progress"
import { Switch } from "@/components/ui/switch"
import { PrimaryScope } from "~/components/getting-started/theming"
const brands: { id: string; name: string; primary?: "teal" }[] = [
{ id: "foundation", name: "The foundation" },
{ id: "yours", name: "Your brand", primary: "teal" },
]
export default function YourBrandOnTheFoundation() {
const id = useId()
return (
<div className="grid w-full max-w-xl gap-x-12 gap-y-10 sm:grid-cols-2">
{brands.map((brand) => {
const controls = (
<>
<p className="text-sm text-muted-foreground">{brand.name}</p>
<div className="flex items-center gap-2">
<Button>Send invoice</Button>
<Button variant="link">Preview the email</Button>
</div>
<div className="flex items-center gap-2">
<Checkbox id={`${id}-${brand.id}-pdf`} defaultChecked />
<Label htmlFor={`${id}-${brand.id}-pdf`}>Attach the PDF</Label>
</div>
<div className="flex items-center gap-2">
<Switch id={`${id}-${brand.id}-remind`} defaultChecked />
<Label htmlFor={`${id}-${brand.id}-remind`}>Remind when overdue</Label>
</div>
<Progress value={80}>
<ProgressLabel>Invoices sent</ProgressLabel>
<ProgressValue />
</Progress>
</>
)
return brand.primary ? (
<PrimaryScope key={brand.id} primary={brand.primary} className="flex flex-col gap-4">
{controls}
</PrimaryScope>
) : (
<div key={brand.id} className="flex flex-col gap-4">
{controls}
</div>
)
})}
</div>
)
}
Your colours and typefaces take the brand's place in the foundation, and every control that follows the brand changes with them. Your brand colour stays exactly as you define it: where white text on it would be hard to read, filled buttons take a darker step of the same hue.
What you decide and what is fixed
You decide
Your brand colour, tints and charts
Your own faces, in regular and medium
How every label and message reads
What your product never shows
Fixed for every product
30px controls on one spacing unit
One radius ladder, from 6px to 16px
One set of sizes, in two weights
The same durations and eases
import { LockIcon, PenLineIcon } from "@keyline-icons/react"
import { useId } from "react"
import { Item, ItemContent, ItemDescription, ItemGroup, ItemTitle } from "@/components/ui/item"
const sides = [
{
title: "You decide",
icon: PenLineIcon,
rows: [
{ name: "Colour", holds: "Your brand colour, tints and charts" },
{ name: "Typefaces", holds: "Your own faces, in regular and medium" },
{ name: "Voice", holds: "How every label and message reads" },
{ name: "Bans", holds: "What your product never shows" },
],
},
{
title: "Fixed for every product",
icon: LockIcon,
rows: [
{ name: "Sizes", holds: "30px controls on one spacing unit" },
{ name: "Corners", holds: "One radius ladder, from 6px to 16px" },
{ name: "Type scale", holds: "One set of sizes, in two weights" },
{ name: "Motion", holds: "The same durations and eases" },
],
},
]
export default function WhatYouDecideAndWhatIsFixed() {
const id = useId()
return (
<div className="grid w-full max-w-xl gap-x-8 gap-y-6 sm:grid-cols-2">
{sides.map(({ title, icon: Icon, rows }, side) => (
<div key={title} className="flex flex-col gap-1">
<p id={`${id}-${side}`} className="flex items-center gap-2 px-3 font-medium">
<Icon aria-hidden className="size-4 text-muted-foreground" />
{title}
</p>
<ItemGroup role="list" aria-labelledby={`${id}-${side}`} className="has-data-[size=sm]:gap-0">
{rows.map(({ name, holds }) => (
<Item key={name} role="listitem" size="sm" className="py-1.5">
<ItemContent>
<ItemTitle>{name}</ItemTitle>
<ItemDescription>{holds}</ItemDescription>
</ItemContent>
</Item>
))}
</ItemGroup>
</div>
))}
</div>
)
}
You decide the look and the voice once, through one named approver on your side. The structure beneath is shared by every product, so a radius or a spacing scale from your brand guidelines is recorded and not applied; Theming lists everything a product sets.
The site you receive
Harbour studio
Design System
import { ArrowUpRightIcon, SearchIcon } from "@keyline-icons/react"
import { Badge } from "@/components/ui/badge"
import { Button } from "@/components/ui/button"
import { Checkbox } from "@/components/ui/checkbox"
import { Progress, ProgressLabel, ProgressValue } from "@/components/ui/progress"
import { Switch } from "@/components/ui/switch"
import { PrimaryScope } from "~/components/getting-started/theming"
import { Screen, ScreenBody, ScreenSidebar, type ScreenNavigation } from "~/components/principles/screen"
const site: ScreenNavigation = {
name: "Harbour studio",
groups: [
{
rows: [
{ title: "Introduction" },
{ title: "Foundations" },
{ title: "Typography" },
{ title: "Components" },
{ title: "Applied" },
{ title: "How it is built" },
],
},
],
foot: [{ title: "Open product", icon: ArrowUpRightIcon }],
}
const tile = "flex min-h-20 items-center justify-center rounded-xl border border-border p-3"
export default function TheSiteYouReceive() {
return (
<Screen sidebar={<ScreenSidebar current="Introduction" navigation={site} />}>
<ScreenBody>
<PrimaryScope primary="teal" className="grid flex-1 grid-cols-4 gap-2">
<div className={tile}>
<Badge variant="positive">Paid</Badge>
</div>
<div className={`${tile} col-span-2 row-span-2`}>
<p className="text-center text-lg font-medium">
Harbour studio
<br />
Design System
</p>
</div>
<div className={tile}>
<Switch defaultChecked aria-label="Remind when overdue" />
</div>
<div className={tile}>
<Checkbox defaultChecked aria-label="Attach the PDF" />
</div>
<div className={tile}>
<Button variant="outline" size="icon" aria-label="Search invoices">
<SearchIcon />
</Button>
</div>
<div className={`${tile} col-span-2`}>
<Button>Create invoice</Button>
</div>
<div className={`${tile} col-span-2`}>
<Progress value={80}>
<ProgressLabel>Invoices sent</ProgressLabel>
<ProgressValue />
</Progress>
</div>
</PrimaryScope>
</ScreenBody>
</Screen>
)
}
Your site is your own copy of this one, in your palette and typefaces: an introduction, the foundations, the typography, a page for each component your product uses, the design applied to each surface you named, and how it was built. Every value it shows is read from your product, so the site cannot drift from it.
An app that keeps its own structure
An app of yours that already ships its own interface may keep its structure instead of moving onto the foundation. You and Khaeli decide that once, before design starts, and the decision is written down with the product. Your site is then built from the app's own components and values; the rest works the same.