Explore KtUI's CSS & JavaScript architecture
KtUI delivers a modular, lightweight component library powered by Tailwind CSS and JavaScript, optimized for scalable, maintainable, and high-performance front-end development
KtUI uses custom classes like kt-btn, kt-card, and kt-modal to encapsulate reusable UI patterns, ensuring consistency and reducing Tailwind class clutter.
kt-btn: Pre-styled buttons with variants (e.g., primary, secondary).kt-card: Containers with shadow, padding, and borders.kt-modal: Centered dialogs with backdrops.bg-blue-500, rounded-lg).KtUI supports global theming with CSS variables, inspired by Shadcn, enabling seamless light and dark mode styling. Use semantic classes like bg-primary and text-primary-foreground to apply themes defined by variables (e.g., --primary, --primary-foreground). Customize themes via CSS variables for consistent, scalable styling. See the Theming Documentation for details.
KtUI’s JavaScript components are initialized lazily via data-kt attributes, enabling declarative, performant interactivity without manual scripting.
<button
class="kt-btn kt-btn-outline"
data-kt-tooltip="true"
data-kt-tooltip-placement="bottom-start"
>
Click Me
<span class="kt-tooltip" data-kt-tooltip-content="true"
>Some tooltip info</span
>
</button>data-kt attributes are detected.data-kt-tooltip-placement define behavior.Explore the Theming Documentation to customize components with CSS variables, or dive into the Components section for usage examples.