BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/shadcn-customs-ui/theme-preset-tool

Theme Preset Tool

shadcn-customs-ui/theme-preset-tool
FreeBlock

Interactive theme builder with 12 OKLCH presets, random palette generator, per-token color editor, radius control, and CSS/JSON export. Standalone — no Redux required.

Install it

npx shadcn@latest add https://formkitcn.pro/r/theme-preset-tool.json

Source

components/theme/app-theme-provider.tsxformkitcn.pro/r/theme-preset-tool.json
1"use client";
2
3import {
4 createContext,
5 type ReactNode,
6 useCallback,
7 useContext,
8 useEffect,
9 useMemo,
10 useState,
11} from "react";
12
13type ThemeMode = "light" | "dark";
14type ThemePreference = ThemeMode | "system";
15
16export type AppThemeProviderProps = {
17 children: ReactNode;
18 attribute?: string | string[];
19 defaultTheme?: ThemePreference;
20 enableSystem?: boolean;
21 enableColorScheme?: boolean;
22 disableTransitionOnChange?: boolean;
23 storageKey?: string;
24 forcedTheme?: ThemeMode;
25 value?: Record<string, string>;
26};
27
28type AppThemeContextValue = {
29 theme: ThemePreference;
30 resolvedTheme: ThemeMode;
31 systemTheme: ThemeMode;
32 setTheme: (value: ThemePreference | ((current: ThemePreference) => ThemePreference)) => void;
33};
34
35const MEDIA = "(prefers-color-scheme: dark)";
36
37const AppThemeContext = createContext<AppThemeContextValue | undefined>(undefined);
38
39function getSystemTheme(): ThemeMode {
40 if (typeof window === "undefined") {
41 return "light";
42 }
43
44 return window.matchMedia(MEDIA).matches ? "dark" : "light";
45}
46
47function disableTransitionsTemporarily() {
48 const style = document.createElement("style");
49 style.appendChild(
50 document.createTextNode(
51 "*,*::before,*::after{-webkit-transition:none!important;transition:none!important}"
52 )
53 );
54 document.head.appendChild(style);
55
56 return () => {
57 window.getComputedStyle(document.body);
58 window.setTimeout(() => {
59 document.head.removeChild(style);
60 }, 1);
61 };
62}
63
64export function AppThemeProvider({
65 children,
66 attribute = "class",
67 defaultTheme = "dark",
68 enableSystem = false,
69 enableColorScheme = false,
70 disableTransitionOnChange = true,
71 storageKey = "app-theme",
72 forcedTheme,
73 value,
74}: AppThemeProviderProps) {
75 const [theme, setThemeState] = useState<ThemePreference>(defaultTheme);
76 const [systemTheme, setSystemTheme] = useState<ThemeMode>("light");
77
78 useEffect(() => {
79 if (typeof window === "undefined") {
80 return;
81 }
82
83 let frameId = 0;
84
85 try {
86 const stored = window.localStorage.getItem(storageKey) as ThemePreference | null;
87 if (stored === "light" || stored === "dark" || stored === "system") {
88 frameId = window.requestAnimationFrame(() => {
89 setThemeState(stored);
90 });
91 }
92 } catch {
93 // ignore storage failures
94 }
95
96 return () => window.cancelAnimationFrame(frameId);
97 }, [storageKey]);
98
99 useEffect(() => {
100 if (!enableSystem || typeof window === "undefined") {
101 return;
102 }
103
104// … truncated

What it pulls in

npm packages

  • lucide-react

Other registry items

  • button
  • tabs
  • input
  • textarea
  • badge
  • checkbox
  • label
  • alert
  • progress
  • switch
  • sonner
  • https://formkitcn.pro/r/redux-methods-tool.json

Files it writes

  • styles/theme-preset-base.css
  • components/theme/app-theme-provider.tsx
  • lib/theme/types.ts
  • lib/theme/presets.ts
  • lib/theme/utils.ts
  • lib/theme/theme-store.ts
  • components/theme/useThemeBuilderState.standalone.ts
  • components/theme/dispatchThemeAction.standalone.ts
  • components/theme/ThemeBuilder.tsx
  • components/theme/ThemeBuilderTrigger.tsx
  • components/theme/ThemeManager.tsx
  • components/providers/AppProviders.tsx
  • components/theme/ThemePresetProvider.tsx
  • components/theme/PresetSelector.tsx
  • components/theme/ColorEditor.tsx
  • components/theme/ColorPickerRow.tsx
  • components/theme/RadiusControl.tsx
  • components/theme/ExportPanel.tsx
  • components/theme/PreviewPanel.tsx
  • components/site/AppHeader.standalone.tsx
  • components/site/AppShell.standalone.tsx
  • components/site/ThemeToggle.tsx

Facts

Registry
shadcn-customs-ui
Type
registry:block
Access
Free
Files written
22
Licence
the repository states none
In the index
at or before 2026-08-05
Last confirmed
today

Go to the source

Docs on shadcn-customs-ui formkitcn.pro adrian007143/FormkitCN-UI on GitHub Raw registry item This item as JSON

More from shadcn-customs-ui

All 8 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Data Griddata-table-dynamicshadcn-customs-uiBlocksFree8 deps · 17 files
Login Form Templateform-dynamic-templateshadcn-customs-uiBlocksFree5 deps · 7 files
Field Rendererform-fieldshadcn-customs-uiBlocksFree6 deps · 26 files
Form Layoutform-layoutshadcn-customs-uiBlocksFreeno deps · 7 files
Form Layout Templateform-template-01shadcn-customs-uiBlocksFree3 deps
Step Formmultistep-form-templateshadcn-customs-uiBlocksFree6 deps · 6 files
Redux Toolredux-methods-toolshadcn-customs-uiBlocksFree2 deps · 11 files

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex