Styleframe – Type-Safe, Composable CSS in TypeScript
Styleframe – Type-Safe, Composable CSS in TypeScript
Hi HN, Over the past 10+ years I’ve been building design systems at various companies, tooling, and UI libraries, including an open-source UI library called Inkline. Through that work I kept running into the same recurring issues: CSS styles breaking due to typos or wrong values, design tokens getting duplicated or drifting, themes becoming unmanageable, and tooling that didn't scale in TypeScript-heavy front-end stacks. I built Styleframe to address these problems. It’s a TypeScript-native way to build type-safe, composable, and scalable design systems. Key features: - Type-safe CSS: Write selectors, variables, utilities, themes and tokens in TS and have compile-time checking (no silent runtime CSS bugs). - Composable design systems: Build tokens, themes, selectors and utilities as reusable pieces, combine modules cleanly, share across projects. - Rich design tokens and theming: Variables for color, spacing, typography, breakpoints, border-radius and shadows; theme overrides for light/dark/brand variants; output optimized CSS. - Framework-agnostic usage: Works with React, Vue, Svelte, Solid, Astro, any bundler. In large teams or systems, styling becomes a fragile surface area: styles leak, tokens diverge, themes multiply, build complexity increases, and developer experience suffers. By writing styling in a typed API, Styleframe aims to make CSS first-class and manageable in modern TS-driven design systems. What I’m looking for I’d appreciate feedback from the HN community — especially if you: - Are maintaining or have built design systems in TypeScript-heavy stacks - Have experienced pain with CSS scalability, theming or token drift - Are interested in typed styling APIs or trying out Styleframe in your stack Happy to answer questions, walk through how the core engine works, or compare to existing solutions. Thanks for reading — looking forward to your thoughts. — Alex
Share cardActual performance
Launch Intel predictions
Analyze your own launch →Correct prediction on native model
Similar products
Type-safe internationalization library for TypeScript
Fastify-zod, type-once, run everywhere (TypeScript/OpenAPI)
Type Safe TypeScript/JS ORM for SQLite, MySQL and PostgreSQL
I made type-safe Firestore ORM and call it Typesaurus
C8x type safe K8s deployments
Newzly-phantom – Asynchronous type-safe Scala DSL for Cassandra
type-kanren – type-level microKanren in TypeScript
Ts-essentials – Reusable, type-safe, TypeScript types
ts-error-tuple – Concise and type-safe error handling for TypeScript
Type-level Lambda Calculus interpreter in TypeScript