├── .gitignore ├── LICENSE ├── README.md ├── examples ├── accordion.html ├── carousel.html ├── clipboard.html ├── collapse.html ├── datepicker.html ├── dial.html ├── dismiss.html ├── drawer.html ├── dropdown.html ├── input-counter.html ├── modal.html ├── popover.html ├── tabs.html └── tooltip.html ├── index.html ├── package-lock.json ├── package.json ├── src ├── accordion.ts ├── carousel.ts ├── clipboard.ts ├── collapse.ts ├── datepicker.ts ├── dial.ts ├── dismiss.ts ├── drawer.ts ├── dropdown.ts ├── index.ts ├── input-counter.ts ├── input.css ├── modal.ts ├── popover.ts ├── tabs.ts └── tooltip.ts ├── tailwind.config.js ├── tsconfig.json └── webpack.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | lib/ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Bergside Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Tailwind CSS + TypeScript + Flowbite Starter 2 | 3 | This is a starter repository that you can use to see examples and get started with working with the Tailwind CSS, Flowbite components, and TypeScript. Read this [guide on Flowbite to learn more](https://flowbite.com/docs/getting-started/typescript/) on how this repository works. 4 | 5 | ## Getting started 6 | 7 | Make sure that you have Node.js installed on your project. Run the following command to install all dependencies: 8 | 9 | ``` 10 | npm install 11 | ``` 12 | 13 | Run this command to compile and watch for changes for Tailwind CSS: 14 | 15 | ``` 16 | npx tailwindcss -i ./src/input.css -o ./dist/output.css --watch 17 | ``` 18 | 19 | Run this command to compile and bundle the TypeScript code into `app-bundle.js`: 20 | 21 | ``` 22 | npx webpack --watch 23 | ``` 24 | 25 | Open up the `index.html` file locally and you can see a list of components that are initialised programatically via the TypeScript files that you can find inside the `src/` folder. 26 | 27 | For example, this is the code that creates the modal component inside the `modal.ts` file: 28 | 29 | ``` 30 | import { Modal } from 'flowbite' 31 | import type { ModalOptions, ModalInterface } from 'flowbite' 32 | 33 | const $buttonElement: HTMLElement = document.querySelector('#button'); 34 | const $modalElement: HTMLElement = document.querySelector('#modal'); 35 | 36 | const modalOptions: ModalOptions = { 37 | placement: 'top-right' 38 | } 39 | 40 | if ($modalElement) { 41 | const modal: ModalInterface = new Modal($modalElement, modalOptions); 42 | $buttonElement.addEventListener('click', () => modal.toggle()); 43 | 44 | modal.show(); 45 | } 46 | ``` 47 | 48 | ## License 49 | 50 | This project is open-source under the MIT license. 51 | -------------------------------------------------------------------------------- /examples/accordion.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 |Flowbite is an open-source library of interactive components built on top of Tailwind CSS including buttons, dropdowns, modals, navbars, and more.
21 |Check out this guide to learn how to get started and start developing websites even faster with components on top of Tailwind CSS.
22 |Flowbite is first conceptualized and designed using the Figma software so everything you see in the library has a design equivalent in our Figma file.
33 |Check out the Figma design system based on the utility classes from Tailwind CSS and components from Flowbite.
34 |The main difference is that the core components from Flowbite are open source under the MIT license, whereas Tailwind UI is a paid product. Another difference is that Flowbite relies on smaller and standalone components, whereas Tailwind UI offers sections of pages.
45 |However, we actually recommend using both Flowbite, Flowbite Pro, and even Tailwind UI as there is no technical reason stopping you from using the best of two worlds.
46 |Learn more about these technologies:
47 |Supercharge your hiring by taking advantage of our limited-time sale for Flowbite Docs + Job Board. Unlimited access to over 190K top-ranked candidates and the #1 design job board.
19 |And here's some amazing content. It's very engaging. Right?
19 |This is some placeholder content the Profile tab's associated content. Clicking another tab will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the content visibility and styling.
31 |This is some placeholder content the Dashboard tab's associated content. Clicking another tab will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the content visibility and styling.
34 |This is some placeholder content the Settings tab's associated content. Clicking another tab will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the content visibility and styling.
37 |This is some placeholder content the Contacts tab's associated content. Clicking another tab will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the content visibility and styling.
40 |Learn more about Flowbite + TypeScript here.
58 |