installation.mdx 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. ---
  2. title: Installation
  3. order: 1
  4. summary: Learn how to set up Tabler in your project by creating a basic HTML file, adding Tabler’s CSS and JavaScript, and exploring its powerful components to build responsive and visually stunning web applications.
  5. description: "Set up Tabler: HTML, CSS, JS, and build stunning UIs."
  6. ---
  7. This guide will take you through the essential steps to set up Tabler in your project, from creating a basic HTML file to incorporating Tabler’s styles and scripts. Let’s dive in!
  8. <div className="steps">
  9. ### Step 1: Create a Basic HTML File
  10. Begin by creating a new `index.html` file in the root of your project. This file will serve as the foundation for your Tabler-based interface. Include the basic HTML structure and a `<meta name="viewport">` tag for proper responsiveness:
  11. ```html
  12. <!doctype html>
  13. <html lang="en">
  14. <head>
  15. <meta charset="utf-8">
  16. <meta name="viewport" content="width=device-width, initial-scale=1">
  17. <title>Tabler demo</title>
  18. </head>
  19. <body>
  20. <h1>Hello, world!</h1>
  21. </body>
  22. </html>
  23. ```
  24. ### Step 2: Add Tabler CSS and JavaScript
  25. Enhance your page by including Tabler's CSS and JavaScript files. Use the following links to load the core Tabler styles and scripts from the CDN:
  26. ```html
  27. <link rel="stylesheet" href="$TABLER_CDN/dist/css/tabler.min.css">
  28. <script src="$TABLER_CDN/dist/js/tabler.min.js"></script>
  29. ```
  30. Update your HTML file to include these resources:
  31. ```html
  32. <!doctype html>
  33. <html lang="en">
  34. <head>
  35. <meta charset="utf-8">
  36. <meta name="viewport" content="width=device-width, initial-scale=1">
  37. <title>Tabler Demo</title>
  38. <link rel="stylesheet" href="$TABLER_CDN/dist/css/tabler.min.css">
  39. </head>
  40. <body>
  41. <h1>Hello, Tabler!</h1>
  42. <script src="$TABLER_CDN/dist/js/tabler.min.js"></script>
  43. </body>
  44. </html>
  45. ```
  46. This setup includes the Tabler CSS and JavaScript via a CDN, providing a responsive and functional base for your project.
  47. You can also download the files and include them locally in your project. For more information, see the [Download](/docs/ui/getting-started/download) page.
  48. ### 3. Open in Your Browser
  49. Save the file and open it in your browser. You should see your first Tabler-powered page! From here, you can start adding layouts and components to create a fully functional and visually appealing web application.
  50. </div>
  51. With these simple steps, you're ready to explore Tabler's features and build stunning web interfaces. For inspiration and guidance, you can view live demos at [preview.tabler.io](https://preview.tabler.io) and consult our [official documentation](https://tabler.io/docs) for detailed instructions and examples.