You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[David UI](https://www.creative-tim.com/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.
-[Using with Global Access](#using-with-global-access)
25
+
-[Typescript](#typescript)
16
26
-[Documentation](#documentation)
17
27
-[Explore Components](#explore-components)
18
28
-[Community](#community)
19
29
-[License](#license)
20
-
-[Older Version](#older-version)
21
30
-[Contribute \& Feedback](#contribute--feedback)
22
31
23
-
24
-
## Quick Start
32
+
## Getting Started
25
33
26
34
Learn how to use `david-ai` components to quickly and easily create elegant and flexible pages using Tailwind CSS.
27
35
28
36
`david-ai` is working with Tailwind CSS classes and you need to have Tailwind CSS installed on your project - <ahref="https://tailwindcss.com/docs/installation"target="_blank">Tailwind CSS Installation.</a>
29
37
38
+
### Using with CDN
30
39
31
-
### Install `david-ai`
40
+
You can include david-ai via a CDN and initialize alerts globally in the browser. Add the following script to your HTML file:
After installing, you can use the components in your project across different frameworks:
56
+
57
+
```tsx
58
+
import { initAlert } from"david-ai";
59
+
60
+
// Initialize alerts
61
+
initAlert();
62
+
```
63
+
64
+
### Using with Global Access
65
+
66
+
If you prefer, you can use the DavidAI global object instead of directly importing initAlert:
67
+
68
+
```tsx
69
+
import*asDavidAIfrom"david-ai";
70
+
71
+
// Initialize alerts
72
+
DavidAI.initAlert();
73
+
```
74
+
75
+
## TypeScript
76
+
77
+
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:
78
+
79
+
### Simple ESM Import
80
+
81
+
The quickest way to use components is through direct ESM imports:
82
+
83
+
```tsx
84
+
import { initAlert } from"david-ai";
85
+
86
+
// Initialize alerts
87
+
initAlert();
88
+
```
89
+
90
+
### Programmatic Usage with TypeScript
91
+
92
+
For more control and type safety, you can use the programmatic approach with full TypeScript support:
David UI is distributed under the **[MIT License](https://creative-tim.com/david-ui/docs/html/license)**, providing freedom and flexibility for all projects.
336
452
337
453
## Older Version
454
+
338
455
You can find the older version of the David UI in the [tailwind-starter-kit](https://github.com/creativetimofficial/david-ai/tree/tailwind-starter-kit) branch.
339
456
340
457
## Contribute & Feedback
@@ -344,4 +461,3 @@ We welcome contributions and feedback! If you have suggestions, encounter issues
344
461
---
345
462
346
463
**Build better, faster, and smarter with David UI.** Explore the documentation and start leveraging our components to deliver polished, user-friendly interfaces with ease.
0 commit comments