K2POV UI Registry
A private source registry distributes editable UI, styles, documentation and project resources, with compile checks in disposable consumers.
The Problem
K2POV applications need shared UI source while each consumer keeps editable code and owns its behavior. Installation must include related styles, helpers and project resources, then compile in a real consumer.
My Contribution
I was K2POV's sole technical builder; this case focuses on the shared UI registry and its source-distribution model.
How It Works
- 01Start with the CSS contract. Control height, padding, icon size and radii follow the text scale, so a size change updates the whole control rather than a collection of unrelated values.
- 02Choose color and surface treatment independently. Shared rules paint hover, active, selected and disabled states, and reset their values on each control so nested controls do not inherit a parent's active paint.
- 03Separate native HTML elements from composed Base UI components. A button element, a composed Button and a navigation link can share the same visual recipe while keeping their own behavior and semantics.
- 04Distribute components, styles, helpers and project resources through an authenticated shadcn source registry. Documentation, installable examples and consumer checks make the installation inspectable in the application that owns it.
Engineering Decisions
Keep control geometry tied to typography
The registry's size ladder selects a text scale. Shared CSS derives the control's remaining geometry, including padding and icon size. Grouped controls use the same appearance vocabulary.
Compact controls still need usable hit areas and space between neighboring targets. Text scale alone does not establish keyboard behavior or accessible names.
Separate color from visual emphasis
A brand-colored action can be solid, outlined or quiet without defining three unrelated components. One set of state rules serves the treatments and native or composed controls.
Each color and treatment still needs contrast checks in its actual theme and surrounding content. The site's small selection does not expose every registry option.
Install source that the application owns
The canonical catalog describes the files and dependencies to install. Consumer checks install source into disposable applications and compile it, including components, examples and project configuration.
Installed copies can diverge. Updating the registry requires comparing and checking the consumer's source; applications do not update automatically.
Outcome
Consumers install editable source through the authenticated registry, and disposable-consumer checks compile the installed files. The portfolio example uses registry Select, Dialog and Tabs with a native Table adapter; its proposal stays in browser state and does not install the private registry or call an external provider.