├── .npmrc ├── src ├── lib │ ├── Sidebar │ │ ├── SidebarItems.svelte │ │ ├── SidebarItemGroup.svelte │ │ ├── SidebarItemWrapper.svelte │ │ ├── Sidebar.svelte │ │ ├── SidebarLogo.svelte │ │ ├── SidebarCTA.svelte │ │ ├── SidebarCollapse.svelte │ │ └── SidebarItem.svelte │ ├── Table │ │ ├── TableBody.svelte │ │ ├── TableCell.svelte │ │ ├── TableHeadCell.svelte │ │ ├── TableHead.svelte │ │ ├── TableRow.svelte │ │ └── Table.svelte │ ├── Avatar │ │ ├── AvatarGroup.svelte │ │ ├── AvatarGroupCounter.svelte │ │ └── Avatar.svelte │ ├── Dropdown │ │ ├── DropdownDivider.svelte │ │ ├── DropdownItem.svelte │ │ ├── DropdownHeader.svelte │ │ └── Dropdown.svelte │ ├── Breadcrumb │ │ ├── Breadcrumb.svelte │ │ └── BreadcrumbItem.svelte │ ├── Navbar │ │ ├── NavbarBrand.svelte │ │ ├── NavbarCollapse.svelte │ │ ├── Navbar.svelte │ │ ├── NavbarToggle.svelte │ │ └── NavbarLink.svelte │ ├── Footer │ │ ├── FooterLinkGroup.svelte │ │ ├── FooterLink.svelte │ │ ├── Footer.svelte │ │ ├── FooterCopyright.svelte │ │ ├── FooterIcon.svelte │ │ └── FooterBrand.svelte │ ├── Form │ │ ├── FileInput.svelte │ │ ├── Radio.svelte │ │ ├── Checkbox.svelte │ │ ├── Label.svelte │ │ ├── ToggleSwitch.svelte │ │ ├── Textarea.svelte │ │ ├── Select.svelte │ │ └── TextInput.svelte │ ├── Timeline │ │ ├── TimelineTitle.svelte │ │ ├── TimelineBody.svelte │ │ ├── TimelineTime.svelte │ │ ├── TimelineContent.svelte │ │ ├── TimelineItem.svelte │ │ ├── Timeline.svelte │ │ └── TimelinePoint.svelte │ ├── Rating │ │ ├── Rating.svelte │ │ ├── RatingAdvanced.svelte │ │ └── RatingStar.svelte │ ├── ListGroup │ │ ├── ListGroup.svelte │ │ └── ListGroupItem.svelte │ ├── Modal │ │ ├── ModalBody.svelte │ │ ├── ModalFooter.svelte │ │ ├── ModalHeader.svelte │ │ └── Modal.svelte │ ├── GenerateExports.py │ ├── Accordion │ │ ├── Accordion.svelte │ │ └── AccordionItem.svelte │ ├── clickOutside.ts │ ├── Card │ │ └── Card.svelte │ ├── Toast │ │ ├── Toast.svelte │ │ └── ToastToggle.svelte │ ├── Progress │ │ └── Progress.svelte │ ├── Badge │ │ └── Badge.svelte │ ├── Spinner │ │ └── Spinner.svelte │ ├── Alert │ │ └── Alert.svelte │ ├── Pagination │ │ └── Pagination.svelte │ ├── Tooltip │ │ └── Tooltip.svelte │ └── index.ts ├── app.css ├── app.d.ts ├── app.html ├── routes │ ├── breadcrumb.svelte │ ├── __layout.svelte │ ├── index.svelte │ ├── pagination.svelte │ ├── list-group.svelte │ ├── card.svelte │ ├── badges.svelte │ ├── tooltips.svelte │ ├── progress.svelte │ ├── spinners.svelte │ └── rating.svelte └── categories.ts ├── static ├── favicon.png └── images │ ├── badges-dark.svg │ ├── badges-light.svg │ ├── breadcrumb-dark.svg │ ├── breadcrumb-light.svg │ ├── tooltips-dark.svg │ ├── tooltips-light.svg │ ├── buttons.svg │ ├── progress-dark.svg │ ├── progress-light.svg │ ├── button-group-dark.svg │ ├── button-group-light.svg │ ├── spinners-dark.svg │ ├── spinners-light.svg │ ├── sidebar-dark.svg │ ├── sidebar-light.svg │ ├── alerts-dark.svg │ ├── alerts-light.svg │ ├── carousel-light.svg │ ├── carousel-dark.svg │ ├── timeline-dark.svg │ ├── timeline-light.svg │ ├── list-group-dark.svg │ ├── tables-dark.svg │ ├── tables-light.svg │ ├── dropdown-dark.svg │ ├── dropdown-light.svg │ ├── footer-light.svg │ ├── card-dark.svg │ ├── card-light.svg │ ├── list-group-light.svg │ ├── footer-dark.svg │ ├── modal-dark.svg │ ├── modal-light.svg │ ├── accordion-dark.svg │ ├── accordion-light.svg │ ├── tabs-dark.svg │ ├── tabs-light.svg │ ├── pagination-light.svg │ └── pagination-dark.svg ├── postcss.config.cjs ├── .gitignore ├── tailwind.config.cjs ├── README.md ├── tsconfig.json ├── svelte.config.js └── package.json /.npmrc: -------------------------------------------------------------------------------- 1 | engine-strict=true 2 | -------------------------------------------------------------------------------- /src/lib/Sidebar/SidebarItems.svelte: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /src/lib/Table/TableBody.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/lib/Avatar/AvatarGroup.svelte: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | -------------------------------------------------------------------------------- /src/lib/Dropdown/DropdownDivider.svelte: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edde746/flowbite-svelte-but-better/HEAD/static/favicon.png -------------------------------------------------------------------------------- /postcss.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | .vscode 10 | -------------------------------------------------------------------------------- /src/lib/Breadcrumb/Breadcrumb.svelte: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /src/lib/Navbar/NavbarBrand.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tailwind.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | content: ['./src/**/*.{html,js,svelte,ts}'], 3 | theme: { 4 | extend: {}, 5 | }, 6 | plugins: [require('flowbite/plugin')], 7 | }; 8 | -------------------------------------------------------------------------------- /src/app.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | code { 6 | @apply rounded-lg; 7 | } 8 | 9 | html { 10 | @apply h-screen overflow-y-hidden; 11 | } 12 | -------------------------------------------------------------------------------- /src/lib/Table/TableCell.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/lib/Table/TableHeadCell.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/lib/Footer/FooterLinkGroup.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 |
    6 | 7 |
8 | -------------------------------------------------------------------------------- /src/lib/Dropdown/DropdownItem.svelte: -------------------------------------------------------------------------------- 1 |
  • 5 | 6 |
  • 7 | -------------------------------------------------------------------------------- /src/lib/Form/FileInput.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/lib/Timeline/TimelineTitle.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 |

    6 | 7 |

    8 | -------------------------------------------------------------------------------- /src/lib/Timeline/TimelineBody.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 |

    6 | 7 |

    8 | -------------------------------------------------------------------------------- /src/lib/Dropdown/DropdownHeader.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 |
    6 | 7 |
    8 | 9 | -------------------------------------------------------------------------------- /src/lib/Timeline/TimelineTime.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 11 | -------------------------------------------------------------------------------- /src/app.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | // See https://kit.svelte.dev/docs/types#app 4 | // for information about these interfaces 5 | declare namespace App { 6 | // interface Locals {} 7 | // interface Platform {} 8 | // interface Session {} 9 | // interface Stuff {} 10 | } 11 | -------------------------------------------------------------------------------- /src/lib/Footer/FooterLink.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 |
  • 8 | 9 | 10 | 11 |
  • 12 | -------------------------------------------------------------------------------- /src/lib/Footer/Footer.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 |
    11 | 12 |
    13 | -------------------------------------------------------------------------------- /src/lib/Table/TableHead.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | %svelte.head% 8 | 9 | 10 |
    %svelte.body%
    11 | 12 | 13 | -------------------------------------------------------------------------------- /src/lib/Rating/Rating.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 |
    10 | 11 |
    12 | -------------------------------------------------------------------------------- /src/lib/Timeline/TimelineContent.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 |
    11 | 12 |
    13 | -------------------------------------------------------------------------------- /src/lib/Avatar/AvatarGroupCounter.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 9 | +{total} 10 | 11 | -------------------------------------------------------------------------------- /src/lib/ListGroup/ListGroup.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 |
    11 | 12 |
    13 | -------------------------------------------------------------------------------- /static/images/badges-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/lib/Form/Radio.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 13 | -------------------------------------------------------------------------------- /static/images/badges-light.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/lib/Modal/ModalBody.svelte: -------------------------------------------------------------------------------- 1 | 7 | 8 |
    17 | 18 |
    19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # flowbite-svelte but better 2 | 3 | Clone of flowbite-react but for Svelte without the jank of flowbite-svelte. 4 | 5 | ## Using 6 | 7 | Run 8 | ``` 9 | npm i @edde746/flowbite-svelte 10 | ``` 11 | 12 | then use like this: 13 | ```html 14 | 17 | 18 | 19 | ``` 20 | -------------------------------------------------------------------------------- /src/lib/Navbar/NavbarCollapse.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 |
    7 |
      8 | 9 |
    10 |
    11 | -------------------------------------------------------------------------------- /src/lib/GenerateExports.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | output = '' 4 | for dir in os.listdir('.'): 5 | if not os.path.isdir(dir): 6 | continue 7 | output += '/* ' + dir + ' */\n' 8 | for file in os.listdir(dir): 9 | if file.endswith('.svelte'): 10 | output += 'export { default as ' + file.split('.')[0] + ' } from \'./'+dir+'/'+file+'\';\n' 11 | 12 | open('index.ts','w').write(output) 13 | -------------------------------------------------------------------------------- /src/lib/Timeline/TimelineItem.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 |
  • 14 | 15 |
  • 16 | -------------------------------------------------------------------------------- /src/lib/Sidebar/SidebarItemGroup.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 |
      14 | 15 |
    16 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./.svelte-kit/tsconfig.json", 3 | "compilerOptions": { 4 | "allowJs": true, 5 | "checkJs": true, 6 | "esModuleInterop": true, 7 | "forceConsistentCasingInFileNames": true, 8 | "lib": ["es2020", "DOM"], 9 | "moduleResolution": "node", 10 | "module": "es2020", 11 | "resolveJsonModule": true, 12 | "skipLibCheck": true, 13 | "sourceMap": true, 14 | "strict": true, 15 | "target": "es2020" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/lib/Modal/ModalFooter.svelte: -------------------------------------------------------------------------------- 1 | 7 | 8 |
    17 | 18 |
    19 | -------------------------------------------------------------------------------- /src/lib/Form/Checkbox.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | -------------------------------------------------------------------------------- /src/lib/Timeline/Timeline.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 |
      16 | 17 |
    18 | -------------------------------------------------------------------------------- /src/lib/Accordion/Accordion.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 |
    16 | 17 |
    18 | -------------------------------------------------------------------------------- /src/lib/clickOutside.ts: -------------------------------------------------------------------------------- 1 | export function clickOutside(node: HTMLElement, callback: () => void) { 2 | const handleClick = (event: MouseEvent) => { 3 | if (!event?.target) return; 4 | if (node && !node.contains(event.target as Node) && !event.defaultPrevented) { 5 | callback(); 6 | } 7 | }; 8 | 9 | document.addEventListener('click', handleClick, true); 10 | 11 | return { 12 | destroy() { 13 | document.removeEventListener('click', handleClick, true); 14 | }, 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /src/lib/Table/TableRow.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /static/images/breadcrumb-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/lib/Form/Label.svelte: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 17 | -------------------------------------------------------------------------------- /src/lib/Rating/RatingAdvanced.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 |
    6 | 7 | 8 | 9 |
    10 |
    11 |
    12 | {percentFilled}% 13 |
    14 | -------------------------------------------------------------------------------- /static/images/breadcrumb-light.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /static/images/tooltips-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /static/images/tooltips-light.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/lib/Footer/FooterCopyright.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | © {year} 11 | {#if href} 12 | 13 | {by} 14 | 15 | {:else} 16 | {by} 17 | {/if} 18 | . All Rights Reserved. 19 | 20 | -------------------------------------------------------------------------------- /src/lib/Footer/FooterIcon.svelte: -------------------------------------------------------------------------------- 1 | 9 | 10 | {#if href} 11 | 12 | 13 | 14 | {:else} 15 | 16 | {/if} 17 | -------------------------------------------------------------------------------- /src/lib/Table/Table.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 |
    13 | 14 | 15 |
    16 |
    17 | -------------------------------------------------------------------------------- /src/lib/Footer/FooterBrand.svelte: -------------------------------------------------------------------------------- 1 | 9 | 10 | {#if href} 11 | 12 | 13 | {name} 14 | 15 | 16 | {:else} 17 | 18 | {/if} 19 | -------------------------------------------------------------------------------- /src/lib/Sidebar/SidebarItemWrapper.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 |
  • 10 | {#if $collapsed === true} 11 | 12 | 13 |
    14 | 15 |
    16 |
    17 | {:else} 18 | 19 | {/if} 20 |
  • 21 | -------------------------------------------------------------------------------- /svelte.config.js: -------------------------------------------------------------------------------- 1 | import adapter from '@sveltejs/adapter-auto'; 2 | import preprocess from 'svelte-preprocess'; 3 | 4 | /** @type {import('@sveltejs/kit').Config} */ 5 | const config = { 6 | // Consult https://github.com/sveltejs/svelte-preprocess 7 | // for more information about preprocessors 8 | preprocess: preprocess(), 9 | 10 | kit: { 11 | adapter: adapter(), 12 | vite: { 13 | ssr: { 14 | noExternal: ['svelte-icons'], 15 | }, 16 | optimizeDeps: { 17 | include: ['highlight.js', 'highlight.js/lib/core'], 18 | }, 19 | }, 20 | }, 21 | }; 22 | 23 | export default config; 24 | -------------------------------------------------------------------------------- /src/lib/Navbar/Navbar.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 | 27 | -------------------------------------------------------------------------------- /src/lib/Navbar/NavbarToggle.svelte: -------------------------------------------------------------------------------- 1 | 7 | 8 | 18 | -------------------------------------------------------------------------------- /src/lib/Sidebar/Sidebar.svelte: -------------------------------------------------------------------------------- 1 | 12 | 13 | 23 | -------------------------------------------------------------------------------- /src/lib/Rating/RatingStar.svelte: -------------------------------------------------------------------------------- 1 | 17 | 18 | 26 | -------------------------------------------------------------------------------- /static/images/buttons.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /static/images/progress-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /static/images/progress-light.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /static/images/button-group-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /static/images/button-group-light.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/lib/Form/ToggleSwitch.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 |