Skip to content
JoshiCodesPublic

About

Core Component Kit for SvelteKit with Tailwind v4

Topics

Resources

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

cock

COre Component Kit — the SvelteKit layer I start projects on.

Docs and live examples · Components · Theme generator

NPM Version NPM Last Update


90 components for Svelte 5 and Tailwind 4, written in TypeScript. Forms, dialogs, menus, tables and a few effects, with the keyboard handling and dark mode already done. Two runtime dependencies: clsx and tailwind-merge.

bun add @joshicodes/cock

Import the tokens after Tailwind in your global stylesheet:

@import 'tailwindcss';
@import '@joshicodes/cock/theme.css';
<script>
	import { Button, Card, CardHeader, CardTitle } from '@joshicodes/cock';
</script>

<Card>
	<CardHeader>
		<CardTitle>Hello</CardTitle>
	</CardHeader>
	<Button>Click</Button>
</Card>

Three colors are set by hand, everything else is mixed from them with color-mix:

:root {
	--ck-bg: oklch(0.985 0 0);
	--ck-fg: oklch(0.205 0 0);
	--ck-accent: oklch(0.58 0.19 32);
}

Everything else — every component with live examples, props tables, theming, the dark-mode hook and the generator — is on cock.joshicodes.de.

A note

I am not good at frontend design. That is why I made this kit. A lot of the design work was done with Claude Code, but I went over it myself. I intend to keep the kit simple and easy to use while still shipping what a project needs. If you want to fix something or add something new, open an issue or a pull request — CONTRIBUTING.md says how the repo fits together.

MIT © JoshiCodes

About

Core Component Kit for SvelteKit with Tailwind v4

Topics

Resources

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages