惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Visual Studio Blog
爱范儿
爱范儿
GbyAI
GbyAI
博客园 - 叶小钗
Last Week in AI
Last Week in AI
Jina AI
Jina AI
Microsoft Security Blog
Microsoft Security Blog
云风的 BLOG
云风的 BLOG
C
Check Point Blog
H
Help Net Security
P
Proofpoint News Feed
酷 壳 – CoolShell
酷 壳 – CoolShell
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
大猫的无限游戏
大猫的无限游戏
H
Hackread – Cybersecurity News, Data Breaches, AI and More
B
Blog RSS Feed
Y
Y Combinator Blog
U
Unit 42
T
Tailwind CSS Blog
MyScale Blog
MyScale Blog
N
Netflix TechBlog - Medium
S
SegmentFault 最新的问题
J
Java Code Geeks
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
kovax-react 0.8: Tailwind v4 preset, FormField adapters, ...
Aleksey Alekseev · 2026-05-26 · via DEV Community
Cover image for kovax-react 0.8: Tailwind v4 preset, FormField adapters, ColorModeScript, and Storybook

Aleksey Alekseev

kovax-react 0.8.0 is on npm. This release connects Kovax to the wider ecosystem: Tailwind CSS v4 utilities backed by --kx-* tokens, thin form adapters for popular libraries, a FOUC guard for theme mode, and a Storybook catalog beside the existing playground.


TL;DR — everything since 0.7.0

Area What shipped
Tailwind v4 kovax-react/tailwind — generated @theme inline preset; bg-kx-primary-500, p-kx-md, rounded-kx-md, …
Forms kovax-react/react-hook-form, kovax-react/tanstack-formFormField, FormFieldError, ref/value injection
Theme / FOUC ColorModeScript (Chakra-style), buildColorModeInitScript, shared KOVAX_* constants
Storybook autoDocs, @storybook/addon-a11y, Visual Tests; deployed to /storybook on GitHub Pages
Docs TAILWIND.md, updated Form.md, QUICK_START.md, RELEASES.md
npm install kovax-react@0.8.0

Optional peers: react-hook-form, @tanstack/react-form, Tailwind v4.


Tailwind v4 — theme-reactive utilities

Kovax components already use ThemeProvider and var(--kx-…). 0.8 exports a Tailwind v4 preset so utility classes read the same variables:

@import "tailwindcss";
@import "kovax-react/tailwind";

<div className="bg-kx-primary-500 text-kx-base-white p-kx-md rounded-kx-md shadow-kx-sm">
  Kovax tokens in Tailwind
</div>

Why @theme inline: utilities resolve var(--kx-…) at use-site — light/dark palette swaps from ThemeProvider stay reactive.

Kovax token Example utility
--kx-color-primary-500 bg-kx-primary-500
--kx-spacing-md p-kx-md, gap-kx-lg
--kx-radius-md rounded-kx-md
--kx-text-lg text-kx-lg

Mix with Kovax components:

import { Button, Box } from "kovax-react";

<Box className="border border-kx-secondary-200 bg-kx-secondary-50 p-kx-lg">
  <Button variant="solid" color="primary">Submit</Button>
</Box>

Guide: TAILWIND.md.


FormField adapters

FormControl context ( isInvalid, isRequired, isDisabled ) now wires automatically from form libraries.

react-hook-form

import { useForm } from "react-hook-form";
import { FormField, FormFieldError } from "kovax-react/react-hook-form";
import { FormControl, FormLabel, Input, Button, VStack } from "kovax-react";

type Values = { email: string };

export function SignIn() {
  const { control, handleSubmit } = useForm<Values>();

  return (
    <form onSubmit={handleSubmit(console.log)}>
      <VStack gap={16} align="stretch">
        <FormField control={control} name="email" rules={{ required: true }}>
          <FormControl>
            <FormLabel>Email</FormLabel>
            <Input type="email" />
            <FormFieldError />
          </FormControl>
        </FormField>
        <Button type="submit">Sign in</Button>
      </VStack>
    </form>
  );
}

TanStack Form

import { useForm } from "@tanstack/react-form";
import { FormField, FormFieldError } from "kovax-react/tanstack-form";
import { FormControl, FormLabel, Input, VStack } from "kovax-react";

export function ProfileForm() {
  const form = useForm({ defaultValues: { name: "" } });

  return (
    <VStack gap={16} align="stretch">
      <FormField form={form} name="name">
        <FormControl>
          <FormLabel>Name</FormLabel>
          <Input />
          <FormFieldError />
        </FormControl>
      </FormField>
    </VStack>
  );
}

Peers are optional — install only the adapter you need.

Docs: Form.md.


ColorModeScript — no theme flash

Blocking inline script in <head> sets data-kovax-theme before first paint (localStorage + prefers-color-scheme).

// app/layout.tsx — Next.js App Router
import { ColorModeScript } from "kovax-react/server";

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en" suppressHydrationWarning>
      <head>
        <ColorModeScript storageKey="kovax-color-mode" />
      </head>
      <body>{children}</body>
    </html>
  );
}

// app/providers.tsx
"use client";
import { ThemeProvider } from "kovax-react";

export function Providers({ children }: { children: React.ReactNode }) {
  return (
    <ThemeProvider storageKey="kovax-color-mode" defaultColorMode="system">
      {children}
    </ThemeProvider>
  );
}

Use the same storageKey / defaultColorMode on script and provider.

Plain HTML: buildColorModeScriptTag() from kovax-react/server.


Storybook alongside the playground

npm run dev:storybook
npm run build:storybook

  • autoDocs — props tables from TypeScript (tags: ['autodocs']).
  • @storybook/addon-a11y — axe in the Accessibility panel.
  • @chromatic-com/storybook — Visual Tests (connect a Chromatic project for baselines).

Stories resolve library source via Vite aliases — no root npm run build required for local dev.


Recap: 0.6 and 0.7

Version Highlights
0.6 Avatar, Badge, Menu, Skeleton, Pagination, useBreakpointUp
0.7 kovax-react/server, "use client", jest-axe, size-limit, NEXTJS_APP_ROUTER.md

Drafts: dev-to-v0.6.md, dev-to-v0.7.md.


Changelog

CHANGELOG.md · playground Releases tab.

Issues and PRs on GitHub — thanks for reading.