New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@sylphx/silk

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sylphx/silk

Type-safe CSS-in-TypeScript without codegen. 45-65% smaller CSS in production with modern color functions (oklch, color-mix) and native nesting.

latest
Source
npmnpm
Version
2.2.3
Version published
Maintainers
1
Created
Source

@sylphx/silk

Type-safe CSS-in-TypeScript without codegen. 88.5% smaller CSS than Panda CSS with modern color functions (OKLCH, color-mix) and native CSS nesting.

Installation

npm install @sylphx/silk
# or
bun add @sylphx/silk

Quick Start

import { defineConfig, createStyleSystem } from '@sylphx/silk'

const config = defineConfig({
  colors: {
    brand: { 500: '#3b82f6' }
  },
  spacing: { 4: '1rem' }
})

const { css } = createStyleSystem(config)

const button = css({
  bg: 'brand.500',      // ✨ Fully typed
  px: 4,
  _hover: { opacity: 0.8 }
})

Features

  • Zero Codegen - No build step required (unlike Panda CSS)
  • 88.5% Smaller - 682B vs 5,936B (Panda CSS)
  • Full Type Safety - Only design tokens allowed
  • Modern CSS - OKLCH colors, color-mix(), native nesting, @layer
  • Critical CSS - Built-in extraction (unique feature)
  • Performance Monitoring - Built-in analytics

Codegen Strategy

Silk follows a pure build-time approach:

  • Development: Runtime css() for hot reload and debugging
  • Production: Babel plugin transforms css() to static strings at build-time
  • No Runtime: Zero JavaScript overhead in production bundles

The default css() function throws an error if not transformed by the build plugin, ensuring zero runtime overhead.

Ecosystem

Framework Integrations

  • @sylphx/silk-react - React bindings with styled components
  • @sylphx/silk-vue - Vue 3 Composition API support
  • @sylphx/silk-svelte - Svelte reactive stores
  • @sylphx/silk-solid - Solid.js fine-grained reactivity
  • @sylphx/silk-qwik - Qwik resumability & zero hydration
  • @sylphx/silk-preact - Preact 3KB React alternative

Meta-Framework Plugins

Build Tools

Design System Presets

Documentation

Full documentation: GitHub Repository

License

MIT © SylphX Ltd

Keywords

css

FAQs

Package last updated on 09 Nov 2025

Related posts