项目作者: creativetimofficial

项目描述 :
Tailwind Starter Kit a beautiful extension for TailwindCSS, Free and Open Source
高级语言: CSS
项目地址: git://github.com/creativetimofficial/tailwind-starter-kit.git
创建时间: 2019-12-20T15:56:31Z
项目社区:https://github.com/creativetimofficial/tailwind-starter-kit

开源协议:MIT License

下载


[!NOTE]
This repository was previously named tailwind-starter-kit and has been renamed to david-ai to better reflect its purpose and direction.

David UI - Free Tailwind CSS Components Library

David UI is a free and open-source collection of customizable, production-ready UI components built with Tailwind CSS. Designed to be developer-friendly and performance-focused, David UI streamlines the creation of modern, visually appealing interfaces, helping you deliver high-quality user experiences faster.

David UI Thumb



npm version
npm downloads

Table of Contents

Getting Started

Learn how to use david-ai components to quickly and easily create elegant and flexible pages using Tailwind CSS.

david-ai is working with Tailwind CSS classes and you need to have Tailwind CSS installed on your project - Tailwind CSS Installation.

Using with CDN

You can include david-ai via a CDN and initialize alerts globally in the browser. Add the following script to your HTML file:

  1. <script
  2. src="https://cdn.jsdelivr.net/gh/creativetimofficial/david-ai@1.0.6/packages/dist/david-ai.min.js"
  3. defer
  4. ></script>

Basic Usage NPM

  1. npm i david-ai

After installing, you can use the components in your project across different frameworks:

  1. import { initAlert } from "david-ai";
  2. // Initialize alerts
  3. initAlert();

Using with Global Access

If you prefer, you can use the DavidAI global object instead of directly importing initAlert:

  1. import * as DavidAI from "david-ai";
  2. // Initialize alerts
  3. DavidAI.initAlert();

TypeScript

David AI components can be used in two ways - through simple ESM imports or programmatically with TypeScript support. Here’s how to use both approaches:

Simple ESM Import

The quickest way to use components is through direct ESM imports:

  1. import { initAlert } from "david-ai";
  2. // Initialize alerts
  3. initAlert();

Programmatic Usage with TypeScript

For more control and type safety, you can use the programmatic approach with full TypeScript support:

This programmatic approach provides:

  • Full TypeScript support
  • Fine-grained control over component behavior
  • Access to component instance methods
  • Proper cleanup on unmount
  1. import { Accordion } from "david-ai";
  2. import type { AccordionConfig, IAccordion } from "david-ai";
  3. document.addEventListener("DOMContentLoaded", () => {
  4. const container = document.getElementById("accordion-container");
  5. if (container) {
  6. const config: AccordionConfig = {
  7. exclusive: true,
  8. allOpen: false,
  9. };
  10. const accordion: IAccordion = new Accordion(container, config);
  11. // Handle external button controls
  12. const showAllButton = document.getElementById("show-all");
  13. const hideAllButton = document.getElementById("hide-all");
  14. const toggleFirstButton = document.getElementById("toggle-first");
  15. showAllButton?.addEventListener("click", () => {
  16. accordion.showAll();
  17. });
  18. hideAllButton?.addEventListener("click", () => {
  19. accordion.hideAll();
  20. });
  21. toggleFirstButton?.addEventListener("click", () => {
  22. const firstButton = document.getElementById("button-1") as HTMLElement;
  23. if (firstButton) {
  24. accordion.toggle(firstButton);
  25. }
  26. });
  27. // Cleanup on unmount
  28. window.addEventListener("unload", () => {
  29. accordion.cleanup();
  30. });
  31. }
  32. });

For detailed usage of each component, check out their respective documentation:

Congratulations 🥳, you did it, now you’re ready to use david-ai.

Documentation

David UI’s documentation includes code snippets, previews, and detailed usage instructions for each component, ensuring a smooth implementation process.

Visit the David UI Docs to explore the entire library.

Explore Components








































































































































accordion



alert



avatar

Accordion Alert Avatar


typography



breadcrumbs



button

Badge Breadcrumbs Button


select



card



checkbox

Button Group Card Checkbox


chip



tooltip



menu

Chip Collapse Dropdown


typography



icon-button



typography

Footer Icon Button Image


input



tooltip



dialog

Input List Modal


navbar



pagination



popover

Navbar Pagination Popover


progress-bar



radio-button



tooltip

Progress Bar Radio Button Rating Bar


tooltip



tooltip



tooltip

Sidebar Spinner Stepper


switch



typography



tabs

Switch Table Tabs


textarea



tooltip



typography

Textarea Tooltip Typography


tooltip



tooltip

Timeline Video

Community

  • We’re excited to see the community adopt David AI, raise issues, and provide feedback.
  • Whether it’s a feature request, bug report, or a project to showcase, please get involved!

License

Copyright (c) 2020-2025 Creative Tim

David UI is distributed under the MIT License, providing freedom and flexibility for all projects.

Older Version

You can find the older version of the David UI in the tailwind-starter-kit branch.

Contribute & Feedback

We welcome contributions and feedback! If you have suggestions, encounter issues, or want to propose new components, feel free to open an issue or submit a pull request on our repository. Your input helps make David UI better for everyone.


Build better, faster, and smarter with David UI. Explore the documentation and start leveraging our components to deliver polished, user-friendly interfaces with ease.