flowbite-svelte 0.44.8 → 0.44.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env +2 -0
- package/.eslintrc.cjs +20 -0
- package/.github/ISSUE_TEMPLATE/bug_report.yml +33 -0
- package/.github/ISSUE_TEMPLATE/config.yml +5 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +17 -0
- package/.github/pull_request_template.md +71 -0
- package/.github/workflows/playwright-and-lint.yaml +47 -0
- package/.prettierignore +16 -0
- package/.prettierrc +9 -0
- package/CHANGELOG.md +3858 -0
- package/CONTRIBUTING.md +66 -0
- package/dist/bottom-nav/BottomNavItem.svelte +3 -1
- package/dist/bottom-nav/BottomNavItem.svelte.d.ts +2 -0
- package/dist/bottom-nav/BottomNavItem.svelte.d.ts.map +1 -1
- package/dist/carousels/Carousel.svelte +52 -153
- package/dist/carousels/Carousel.svelte.d.ts +22 -37
- package/dist/carousels/Carousel.svelte.d.ts.map +1 -1
- package/dist/carousels/ControlButton.svelte +31 -0
- package/dist/carousels/ControlButton.svelte.d.ts +29 -0
- package/dist/carousels/ControlButton.svelte.d.ts.map +1 -0
- package/dist/carousels/Controls.svelte +17 -0
- package/dist/carousels/Controls.svelte.d.ts +23 -0
- package/dist/carousels/Controls.svelte.d.ts.map +1 -0
- package/dist/carousels/Indicators.svelte +26 -0
- package/dist/carousels/Indicators.svelte.d.ts +32 -0
- package/dist/carousels/Indicators.svelte.d.ts.map +1 -0
- package/dist/carousels/Thumbnail.svelte +6 -23
- package/dist/carousels/Thumbnail.svelte.d.ts +5 -16
- package/dist/carousels/Thumbnail.svelte.d.ts.map +1 -1
- package/dist/carousels/Thumbnails.svelte +26 -0
- package/dist/carousels/Thumbnails.svelte.d.ts +33 -0
- package/dist/carousels/Thumbnails.svelte.d.ts.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/tables/TableSearch.svelte +2 -2
- package/dist/tables/TableSearch.svelte.d.ts +1 -1
- package/mdsvex.config.js +18 -0
- package/package.json +18 -80
- package/playwright.config.ts +12 -0
- package/postcss.config.cjs +12 -0
- package/src/app.css +45 -0
- package/src/app.d.ts +9 -0
- package/src/app.html +28 -0
- package/src/app.postcss +55 -0
- package/src/hooks.server.js +27 -0
- package/src/lib/accordion/Accordion.svelte +61 -0
- package/src/lib/accordion/AccordionItem.svelte +120 -0
- package/src/lib/alerts/Alert.svelte +60 -0
- package/src/lib/avatar/Avatar.svelte +56 -0
- package/src/lib/avatar/Placeholder.svelte +16 -0
- package/src/lib/badges/Badge.svelte +108 -0
- package/src/lib/banner/Banner.svelte +64 -0
- package/src/lib/bottom-nav/BottomNav.svelte +76 -0
- package/src/lib/bottom-nav/BottomNavHeader.svelte +19 -0
- package/src/lib/bottom-nav/BottomNavHeaderItem.svelte +23 -0
- package/src/lib/bottom-nav/BottomNavItem.svelte +76 -0
- package/src/lib/breadcrumbs/Breadcrumb.svelte +25 -0
- package/src/lib/breadcrumbs/BreadcrumbItem.svelte +51 -0
- package/src/lib/buttongroups/ButtonGroup.svelte +22 -0
- package/src/lib/buttons/Button.svelte +100 -0
- package/src/lib/buttons/GradientButton.svelte +79 -0
- package/src/lib/cards/Card.svelte +70 -0
- package/src/lib/carousels/Carousel.svelte +166 -0
- package/src/lib/carousels/ControlButton.svelte +34 -0
- package/src/lib/carousels/Controls.svelte +21 -0
- package/src/lib/carousels/Indicators.svelte +31 -0
- package/src/lib/carousels/Thumbnail.svelte +20 -0
- package/src/lib/carousels/Thumbnails.svelte +30 -0
- package/src/lib/charts/Chart.svelte +35 -0
- package/src/lib/darkmode/DarkMode.svelte +58 -0
- package/src/lib/datepicker/Calender.svelte +3 -0
- package/src/lib/datepicker/Datepicker.svelte +66 -0
- package/src/lib/device-mockup/Android.svelte +24 -0
- package/src/lib/device-mockup/DefaultMockup.svelte +21 -0
- package/src/lib/device-mockup/DeviceMockup.svelte +235 -0
- package/src/lib/device-mockup/Ios.svelte +21 -0
- package/src/lib/device-mockup/Smartwatch.svelte +15 -0
- package/src/lib/device-mockup/Tablet.svelte +21 -0
- package/src/lib/drawer/Drawer.svelte +87 -0
- package/src/lib/dropdowns/Dropdown.svelte +81 -0
- package/src/lib/dropdowns/DropdownDivider.svelte +13 -0
- package/src/lib/dropdowns/DropdownHeader.svelte +21 -0
- package/src/lib/dropdowns/DropdownItem.svelte +47 -0
- package/src/lib/footer/Footer.svelte +18 -0
- package/src/lib/footer/FooterBrand.svelte +39 -0
- package/src/lib/footer/FooterCopyright.svelte +38 -0
- package/src/lib/footer/FooterIcon.svelte +25 -0
- package/src/lib/footer/FooterLink.svelte +26 -0
- package/src/lib/footer/FooterLinkGroup.svelte +15 -0
- package/src/lib/forms/Checkbox.svelte +70 -0
- package/src/lib/forms/Dropzone.svelte +32 -0
- package/src/lib/forms/Fileupload.svelte +21 -0
- package/src/lib/forms/FloatingLabelInput.svelte +94 -0
- package/src/lib/forms/Helper.svelte +23 -0
- package/src/lib/forms/Input.svelte +83 -0
- package/src/lib/forms/InputAddon.svelte +47 -0
- package/src/lib/forms/Label.svelte +40 -0
- package/src/lib/forms/MultiSelect.svelte +126 -0
- package/src/lib/forms/NumberInput.svelte +16 -0
- package/src/lib/forms/Radio.svelte +53 -0
- package/src/lib/forms/RadioInline.svelte +9 -0
- package/src/lib/forms/Range.svelte +24 -0
- package/src/lib/forms/Search.svelte +44 -0
- package/src/lib/forms/Select.svelte +49 -0
- package/src/lib/forms/Textarea.svelte +51 -0
- package/src/lib/forms/Toggle.svelte +56 -0
- package/src/lib/forms/VoiceSearch.svelte +57 -0
- package/src/lib/gallery/Gallery.svelte +31 -0
- package/src/lib/index.ts +228 -0
- package/src/lib/indicators/Indicator.svelte +86 -0
- package/src/lib/kbd/ArrowKeyDown.svelte +15 -0
- package/src/lib/kbd/ArrowKeyLeft.svelte +15 -0
- package/src/lib/kbd/ArrowKeyRight.svelte +15 -0
- package/src/lib/kbd/ArrowKeyUp.svelte +15 -0
- package/src/lib/kbd/Kbd.svelte +15 -0
- package/src/lib/list-group/Listgroup.svelte +45 -0
- package/src/lib/list-group/ListgroupItem.svelte +57 -0
- package/src/lib/megamenu/MegaMenu.svelte +52 -0
- package/src/lib/modals/Modal.svelte +162 -0
- package/src/lib/navbar/Menu.svelte +38 -0
- package/src/lib/navbar/NavBrand.svelte +15 -0
- package/src/lib/navbar/NavHamburger.svelte +20 -0
- package/src/lib/navbar/NavLi.svelte +37 -0
- package/src/lib/navbar/NavSidebarHamburger.svelte +20 -0
- package/src/lib/navbar/NavUl.svelte +68 -0
- package/src/lib/navbar/Navbar.svelte +42 -0
- package/src/lib/navbar/SidebarMenu.svelte +37 -0
- package/src/lib/paginations/Pagination.svelte +59 -0
- package/src/lib/paginations/PaginationItem.svelte +40 -0
- package/src/lib/popover/Popover.svelte +34 -0
- package/src/lib/progressbars/Progressbar.svelte +52 -0
- package/src/lib/ratings/AdvancedRating.svelte +45 -0
- package/src/lib/ratings/Heart.svelte +39 -0
- package/src/lib/ratings/Rating.svelte +57 -0
- package/src/lib/ratings/RatingComment.svelte +85 -0
- package/src/lib/ratings/Review.svelte +78 -0
- package/src/lib/ratings/ScoreRating.svelte +76 -0
- package/src/lib/ratings/Star.svelte +47 -0
- package/src/lib/ratings/Thumbup.svelte +39 -0
- package/src/lib/sidebars/Sidebar.svelte +40 -0
- package/src/lib/sidebars/SidebarBrand.svelte +24 -0
- package/src/lib/sidebars/SidebarCta.svelte +28 -0
- package/src/lib/sidebars/SidebarDropdownItem.svelte +26 -0
- package/src/lib/sidebars/SidebarDropdownWrapper.svelte +71 -0
- package/src/lib/sidebars/SidebarGroup.svelte +24 -0
- package/src/lib/sidebars/SidebarItem.svelte +49 -0
- package/src/lib/sidebars/SidebarWrapper.svelte +16 -0
- package/src/lib/skeleton/CardPlaceholder.svelte +48 -0
- package/src/lib/skeleton/ImagePlaceholder.svelte +31 -0
- package/src/lib/skeleton/ListPlaceholder.svelte +50 -0
- package/src/lib/skeleton/Skeleton.svelte +38 -0
- package/src/lib/skeleton/TestimonialPlaceholder.svelte +24 -0
- package/src/lib/skeleton/TextPlaceholder.svelte +60 -0
- package/src/lib/skeleton/VideoPlaceholder.svelte +33 -0
- package/src/lib/skeleton/WidgetPlaceholder.svelte +26 -0
- package/src/lib/speed-dial/SpeedDial.svelte +80 -0
- package/src/lib/speed-dial/SpeedDialButton.svelte +49 -0
- package/src/lib/spinners/Spinner.svelte +49 -0
- package/src/lib/steps/StepIndicator.svelte +75 -0
- package/src/lib/tables/Table.svelte +49 -0
- package/src/lib/tables/TableBody.svelte +14 -0
- package/src/lib/tables/TableBodyCell.svelte +22 -0
- package/src/lib/tables/TableBodyRow.svelte +50 -0
- package/src/lib/tables/TableHead.svelte +45 -0
- package/src/lib/tables/TableHeadCell.svelte +15 -0
- package/src/lib/tables/TableSearch.svelte +73 -0
- package/src/lib/tabs/TabItem.svelte +61 -0
- package/src/lib/tabs/Tabs.svelte +78 -0
- package/src/lib/timeline/Activity.svelte +16 -0
- package/src/lib/timeline/ActivityItem.svelte +59 -0
- package/src/lib/timeline/Group.svelte +27 -0
- package/src/lib/timeline/GroupItem.svelte +59 -0
- package/src/lib/timeline/Timeline.svelte +25 -0
- package/src/lib/timeline/TimelineHorizontal.svelte +17 -0
- package/src/lib/timeline/TimelineItem.svelte +116 -0
- package/src/lib/timeline/TimelineItemHorizontal.svelte +72 -0
- package/src/lib/timeline/TimelineItemVertical.svelte +44 -0
- package/src/lib/toasts/Toast.svelte +99 -0
- package/src/lib/toolbar/Toolbar.svelte +52 -0
- package/src/lib/toolbar/ToolbarButton.svelte +67 -0
- package/src/lib/toolbar/ToolbarGroup.svelte +20 -0
- package/src/lib/tooltips/Tooltip.svelte +42 -0
- package/src/lib/types.ts +163 -0
- package/src/lib/typography/A.svelte +20 -0
- package/src/lib/typography/Blockquote.svelte +51 -0
- package/src/lib/typography/DescriptionList.svelte +22 -0
- package/src/lib/typography/Heading.svelte +28 -0
- package/src/lib/typography/Hr.svelte +37 -0
- package/src/lib/typography/Img.svelte +39 -0
- package/src/lib/typography/Layout.svelte +21 -0
- package/src/lib/typography/Li.svelte +19 -0
- package/src/lib/typography/List.svelte +33 -0
- package/src/lib/typography/Mark.svelte +20 -0
- package/src/lib/typography/P.svelte +102 -0
- package/src/lib/typography/Secondary.svelte +18 -0
- package/src/lib/typography/Span.svelte +35 -0
- package/src/lib/utils/CloseButton.svelte +19 -0
- package/src/lib/utils/Frame.svelte +142 -0
- package/src/lib/utils/Popper.svelte +206 -0
- package/src/lib/utils/Wrapper.svelte +22 -0
- package/src/lib/utils/backdrop.ts +101 -0
- package/src/lib/utils/clickOutside.ts +16 -0
- package/src/lib/utils/createEventDispatcher.ts +24 -0
- package/src/lib/utils/focusTrap.js +42 -0
- package/src/lib/utils/generateId.js +5 -0
- package/src/lib/video/Video.svelte +29 -0
- package/src/routes/+error.svelte +5 -0
- package/src/routes/+layout.svelte +98 -0
- package/src/routes/+page.server.ts +18 -0
- package/src/routes/+page.svelte +55 -0
- package/src/routes/api/posts/+server.js +7 -0
- package/src/routes/component-data/A.json +10 -0
- package/src/routes/component-data/Accordion.json +12 -0
- package/src/routes/component-data/AccordionItem.json +23 -0
- package/src/routes/component-data/Activity.json +1 -0
- package/src/routes/component-data/ActivityItem.json +16 -0
- package/src/routes/component-data/AdvancedRating.json +13 -0
- package/src/routes/component-data/Alert.json +9 -0
- package/src/routes/component-data/Android.json +12 -0
- package/src/routes/component-data/ArrowKeyDown.json +1 -0
- package/src/routes/component-data/ArrowKeyLeft.json +1 -0
- package/src/routes/component-data/ArrowKeyRight.json +1 -0
- package/src/routes/component-data/ArrowKeyUp.json +1 -0
- package/src/routes/component-data/Avatar.json +15 -0
- package/src/routes/component-data/Badge.json +10 -0
- package/src/routes/component-data/Banner.json +12 -0
- package/src/routes/component-data/Blockquote.json +15 -0
- package/src/routes/component-data/BottomNav.json +13 -0
- package/src/routes/component-data/BottomNavHeader.json +9 -0
- package/src/routes/component-data/BottomNavHeaderItem.json +11 -0
- package/src/routes/component-data/BottomNavItem.json +12 -0
- package/src/routes/component-data/Breadcrumb.json +11 -0
- package/src/routes/component-data/BreadcrumbItem.json +12 -0
- package/src/routes/component-data/Button.json +14 -0
- package/src/routes/component-data/ButtonGroup.json +9 -0
- package/src/routes/component-data/Calender.json +1 -0
- package/src/routes/component-data/Card.json +13 -0
- package/src/routes/component-data/CardPlaceholder.json +9 -0
- package/src/routes/component-data/Carousel.json +11 -0
- package/src/routes/component-data/Chart.json +1 -0
- package/src/routes/component-data/Checkbox.json +14 -0
- package/src/routes/component-data/CloseButton.json +1 -0
- package/src/routes/component-data/ControlButton.json +9 -0
- package/src/routes/component-data/Controls.json +1 -0
- package/src/routes/component-data/DarkMode.json +9 -0
- package/src/routes/component-data/Datepicker.json +14 -0
- package/src/routes/component-data/DefaultMockup.json +11 -0
- package/src/routes/component-data/DescriptionList.json +10 -0
- package/src/routes/component-data/DeviceMockup.json +50 -0
- package/src/routes/component-data/Drawer.json +23 -0
- package/src/routes/component-data/Dropdown.json +13 -0
- package/src/routes/component-data/DropdownDivider.json +1 -0
- package/src/routes/component-data/DropdownHeader.json +9 -0
- package/src/routes/component-data/DropdownItem.json +10 -0
- package/src/routes/component-data/Dropzone.json +10 -0
- package/src/routes/component-data/Fileupload.json +10 -0
- package/src/routes/component-data/FloatingLabelInput.json +14 -0
- package/src/routes/component-data/Footer.json +1 -0
- package/src/routes/component-data/FooterBrand.json +15 -0
- package/src/routes/component-data/FooterCopyright.json +14 -0
- package/src/routes/component-data/FooterIcon.json +11 -0
- package/src/routes/component-data/FooterLink.json +11 -0
- package/src/routes/component-data/FooterLinkGroup.json +1 -0
- package/src/routes/component-data/Frame.json +18 -0
- package/src/routes/component-data/Gallery.json +9 -0
- package/src/routes/component-data/GradientButton.json +9 -0
- package/src/routes/component-data/Group.json +11 -0
- package/src/routes/component-data/GroupItem.json +13 -0
- package/src/routes/component-data/Heading.json +10 -0
- package/src/routes/component-data/Heart.json +14 -0
- package/src/routes/component-data/Helper.json +9 -0
- package/src/routes/component-data/Hr.json +13 -0
- package/src/routes/component-data/ImagePlaceholder.json +9 -0
- package/src/routes/component-data/Img.json +17 -0
- package/src/routes/component-data/Indicator.json +13 -0
- package/src/routes/component-data/Indicators.json +9 -0
- package/src/routes/component-data/Input.json +13 -0
- package/src/routes/component-data/InputAddon.json +1 -0
- package/src/routes/component-data/Ios.json +11 -0
- package/src/routes/component-data/Kbd.json +1 -0
- package/src/routes/component-data/Label.json +10 -0
- package/src/routes/component-data/Layout.json +10 -0
- package/src/routes/component-data/Li.json +9 -0
- package/src/routes/component-data/List.json +10 -0
- package/src/routes/component-data/ListPlaceholder.json +1 -0
- package/src/routes/component-data/Listgroup.json +10 -0
- package/src/routes/component-data/ListgroupItem.json +17 -0
- package/src/routes/component-data/Mark.json +10 -0
- package/src/routes/component-data/MegaMenu.json +11 -0
- package/src/routes/component-data/Menu.json +11 -0
- package/src/routes/component-data/Modal.json +17 -0
- package/src/routes/component-data/MultiSelect.json +11 -0
- package/src/routes/component-data/NavBrand.json +1 -0
- package/src/routes/component-data/NavHamburger.json +9 -0
- package/src/routes/component-data/NavLi.json +10 -0
- package/src/routes/component-data/NavSidebarHamburger.json +9 -0
- package/src/routes/component-data/NavUl.json +14 -0
- package/src/routes/component-data/Navbar.json +10 -0
- package/src/routes/component-data/NumberInput.json +1 -0
- package/src/routes/component-data/P.json +19 -0
- package/src/routes/component-data/Pagination.json +13 -0
- package/src/routes/component-data/PaginationItem.json +12 -0
- package/src/routes/component-data/Placeholder.json +1 -0
- package/src/routes/component-data/Popover.json +9 -0
- package/src/routes/component-data/Popper.json +17 -0
- package/src/routes/component-data/Progressbar.json +14 -0
- package/src/routes/component-data/Radio.json +13 -0
- package/src/routes/component-data/RadioInline.json +1 -0
- package/src/routes/component-data/Range.json +9 -0
- package/src/routes/component-data/Rating.json +14 -0
- package/src/routes/component-data/RatingComment.json +10 -0
- package/src/routes/component-data/Review.json +13 -0
- package/src/routes/component-data/ScoreRating.json +13 -0
- package/src/routes/component-data/Search.json +10 -0
- package/src/routes/component-data/Secondary.json +9 -0
- package/src/routes/component-data/Select.json +14 -0
- package/src/routes/component-data/Sidebar.json +11 -0
- package/src/routes/component-data/SidebarBrand.json +11 -0
- package/src/routes/component-data/SidebarCta.json +11 -0
- package/src/routes/component-data/SidebarDropdownItem.json +12 -0
- package/src/routes/component-data/SidebarDropdownWrapper.json +14 -0
- package/src/routes/component-data/SidebarGroup.json +10 -0
- package/src/routes/component-data/SidebarItem.json +12 -0
- package/src/routes/component-data/SidebarMenu.json +11 -0
- package/src/routes/component-data/SidebarWrapper.json +1 -0
- package/src/routes/component-data/Skeleton.json +9 -0
- package/src/routes/component-data/Smartwatch.json +9 -0
- package/src/routes/component-data/Span.json +16 -0
- package/src/routes/component-data/SpeedDial.json +18 -0
- package/src/routes/component-data/SpeedDialButton.json +14 -0
- package/src/routes/component-data/Spinner.json +13 -0
- package/src/routes/component-data/Star.json +14 -0
- package/src/routes/component-data/StepIndicator.json +15 -0
- package/src/routes/component-data/TabItem.json +12 -0
- package/src/routes/component-data/Table.json +14 -0
- package/src/routes/component-data/TableBody.json +1 -0
- package/src/routes/component-data/TableBodyCell.json +1 -0
- package/src/routes/component-data/TableBodyRow.json +1 -0
- package/src/routes/component-data/TableHead.json +9 -0
- package/src/routes/component-data/TableHeadCell.json +1 -0
- package/src/routes/component-data/TableSearch.json +19 -0
- package/src/routes/component-data/Tablet.json +11 -0
- package/src/routes/component-data/Tabs.json +13 -0
- package/src/routes/component-data/TestimonialPlaceholder.json +1 -0
- package/src/routes/component-data/TextPlaceholder.json +9 -0
- package/src/routes/component-data/Textarea.json +11 -0
- package/src/routes/component-data/Thumbnail.json +10 -0
- package/src/routes/component-data/Thumbnails.json +9 -0
- package/src/routes/component-data/Thumbup.json +14 -0
- package/src/routes/component-data/Timeline.json +1 -0
- package/src/routes/component-data/TimelineHorizontal.json +1 -0
- package/src/routes/component-data/TimelineItem.json +10 -0
- package/src/routes/component-data/TimelineItemHorizontal.json +19 -0
- package/src/routes/component-data/TimelineItemVertical.json +13 -0
- package/src/routes/component-data/Toast.json +15 -0
- package/src/routes/component-data/Toggle.json +12 -0
- package/src/routes/component-data/Toolbar.json +9 -0
- package/src/routes/component-data/ToolbarButton.json +12 -0
- package/src/routes/component-data/ToolbarGroup.json +1 -0
- package/src/routes/component-data/Tooltip.json +9 -0
- package/src/routes/component-data/Video.json +12 -0
- package/src/routes/component-data/VideoPlaceholder.json +9 -0
- package/src/routes/component-data/VoiceSearch.json +16 -0
- package/src/routes/component-data/WidgetPlaceholder.json +1 -0
- package/src/routes/component-data/Wrapper.json +10 -0
- package/src/routes/component-data/backdrop.json +9 -0
- package/src/routes/component-data/clickOutside.json +1 -0
- package/src/routes/component-data/createEventDispatcher.json +1 -0
- package/src/routes/component-data/focusTrap.json +1 -0
- package/src/routes/component-data/generateId.json +1 -0
- package/src/routes/component-data/index.json +1 -0
- package/src/routes/component-data/types.json +1 -0
- package/src/routes/docs/+layout.js +10 -0
- package/src/routes/docs/+layout.svelte +74 -0
- package/src/routes/docs/components/[slug]/+page.js +13 -0
- package/src/routes/docs/components/[slug]/+page.svelte +6 -0
- package/src/routes/docs/components/accordion.md +315 -0
- package/src/routes/docs/components/alert.md +342 -0
- package/src/routes/docs/components/avatar.md +215 -0
- package/src/routes/docs/components/badge.md +269 -0
- package/src/routes/docs/components/banner.md +166 -0
- package/src/routes/docs/components/bottom-navigation.md +397 -0
- package/src/routes/docs/components/breadcrumb.md +112 -0
- package/src/routes/docs/components/button-group.md +198 -0
- package/src/routes/docs/components/button.md +314 -0
- package/src/routes/docs/components/card.md +423 -0
- package/src/routes/docs/components/carousel.md +242 -0
- package/src/routes/docs/components/darkmode.md +111 -0
- package/src/routes/docs/components/device-mockups.md +212 -0
- package/src/routes/docs/components/drawer.md +638 -0
- package/src/routes/docs/components/dropdown.md +748 -0
- package/src/routes/docs/components/footer.md +268 -0
- package/src/routes/docs/components/forms.md +254 -0
- package/src/routes/docs/components/gallery.md +230 -0
- package/src/routes/docs/components/imageData/+server.js +43 -0
- package/src/routes/docs/components/indicators.md +273 -0
- package/src/routes/docs/components/kbd.md +248 -0
- package/src/routes/docs/components/list-group.md +157 -0
- package/src/routes/docs/components/mega-menu.md +298 -0
- package/src/routes/docs/components/modal.md +413 -0
- package/src/routes/docs/components/navbar.md +342 -0
- package/src/routes/docs/components/pagination.md +350 -0
- package/src/routes/docs/components/popover.md +388 -0
- package/src/routes/docs/components/progress.md +170 -0
- package/src/routes/docs/components/rating.md +326 -0
- package/src/routes/docs/components/sidebar.md +568 -0
- package/src/routes/docs/components/skeleton.md +165 -0
- package/src/routes/docs/components/speed-dial.md +523 -0
- package/src/routes/docs/components/spinner.md +117 -0
- package/src/routes/docs/components/tab.md +341 -0
- package/src/routes/docs/components/table.md +871 -0
- package/src/routes/docs/components/timeline.md +267 -0
- package/src/routes/docs/components/toast.md +362 -0
- package/src/routes/docs/components/tooltip.md +156 -0
- package/src/routes/docs/components/typography.md +158 -0
- package/src/routes/docs/components/video.md +125 -0
- package/src/routes/docs/examples/[slug]/+page.js +13 -0
- package/src/routes/docs/examples/[slug]/+page.svelte +6 -0
- package/src/routes/docs/examples/sidebar-layout.md +20 -0
- package/src/routes/docs/examples/snapshot.md +59 -0
- package/src/routes/docs/examples/testsnap.svelte +49 -0
- package/src/routes/docs/experimental/[slug]/+page.js +13 -0
- package/src/routes/docs/experimental/[slug]/+page.svelte +6 -0
- package/src/routes/docs/experimental/datepicker.md +131 -0
- package/src/routes/docs/extend/CheckCircle.svelte +3 -0
- package/src/routes/docs/extend/[slug]/+page.js +13 -0
- package/src/routes/docs/extend/[slug]/+page.svelte +6 -0
- package/src/routes/docs/extend/flowbite-svelte-blocks.md +28 -0
- package/src/routes/docs/extend/flowbite-svelte-starter.md +34 -0
- package/src/routes/docs/extend/icons.md +204 -0
- package/src/routes/docs/extend/step-indicator.md +162 -0
- package/src/routes/docs/forms/[slug]/+page.js +13 -0
- package/src/routes/docs/forms/[slug]/+page.svelte +6 -0
- package/src/routes/docs/forms/checkbox.md +329 -0
- package/src/routes/docs/forms/file-input.md +171 -0
- package/src/routes/docs/forms/floating-label.md +176 -0
- package/src/routes/docs/forms/input-field.md +398 -0
- package/src/routes/docs/forms/radio.md +303 -0
- package/src/routes/docs/forms/range.md +110 -0
- package/src/routes/docs/forms/search-input.md +133 -0
- package/src/routes/docs/forms/select.md +280 -0
- package/src/routes/docs/forms/textarea.md +142 -0
- package/src/routes/docs/forms/toggle.md +86 -0
- package/src/routes/docs/pages/[slug]/+page.js +13 -0
- package/src/routes/docs/pages/[slug]/+page.svelte +6 -0
- package/src/routes/docs/pages/colors.md +152 -0
- package/src/routes/docs/pages/compiler-speed.md +116 -0
- package/src/routes/docs/pages/customization.md +103 -0
- package/src/routes/docs/pages/how-to-contribute.md +138 -0
- package/src/routes/docs/pages/ide-support.md +19 -0
- package/src/routes/docs/pages/introduction.md +131 -0
- package/src/routes/docs/pages/license.md +22 -0
- package/src/routes/docs/pages/quickstart.md +128 -0
- package/src/routes/docs/pages/typescript.md +25 -0
- package/src/routes/docs/plugins/[slug]/+page.js +13 -0
- package/src/routes/docs/plugins/[slug]/+page.svelte +6 -0
- package/src/routes/docs/plugins/charts.md +990 -0
- package/src/routes/docs/typography/[slug]/+page.js +13 -0
- package/src/routes/docs/typography/[slug]/+page.svelte +6 -0
- package/src/routes/docs/typography/blockquote.md +214 -0
- package/src/routes/docs/typography/heading.md +270 -0
- package/src/routes/docs/typography/hr.md +115 -0
- package/src/routes/docs/typography/image.md +244 -0
- package/src/routes/docs/typography/link.md +147 -0
- package/src/routes/docs/typography/list.md +358 -0
- package/src/routes/docs/typography/paragraph.md +265 -0
- package/src/routes/docs/typography/text.md +340 -0
- package/src/routes/docs/utilities/[slug]/+page.js +13 -0
- package/src/routes/docs/utilities/[slug]/+page.svelte +6 -0
- package/src/routes/docs/utilities/close-button.md +42 -0
- package/src/routes/docs/utilities/label.md +41 -0
- package/src/routes/docs/utilities/toolbar.md +157 -0
- package/src/routes/landing/CTA.svelte +98 -0
- package/src/routes/landing/Components.svelte +42 -0
- package/src/routes/landing/Contributors.svelte +55 -0
- package/src/routes/landing/DesignFigma.svelte +39 -0
- package/src/routes/landing/Featured.svelte +33 -0
- package/src/routes/landing/GetStarted.svelte +23 -0
- package/src/routes/landing/Hero.svelte +38 -0
- package/src/routes/landing/SocialProof.svelte +80 -0
- package/src/routes/landing/utils/A.svelte +5 -0
- package/src/routes/landing/utils/H2.svelte +1 -0
- package/src/routes/landing/utils/Row.svelte +16 -0
- package/src/routes/landing/utils/Section.svelte +9 -0
- package/src/routes/layouts/component/+page.svelte +44 -0
- package/src/routes/layouts/component/Anchor.svelte +29 -0
- package/src/routes/layouts/component/code.svelte +1 -0
- package/src/routes/layouts/component/h1.svelte +0 -0
- package/src/routes/layouts/component/h2.svelte +5 -0
- package/src/routes/layouts/component/h3.svelte +5 -0
- package/src/routes/layouts/testLayout/+page.svelte +5 -0
- package/src/routes/utils/AlgoliaSearch.svelte +22 -0
- package/src/routes/utils/CompoAttributesViewer.svelte +78 -0
- package/src/routes/utils/CompoCard.svelte +36 -0
- package/src/routes/utils/CompoDescription.svelte +7 -0
- package/src/routes/utils/CopyCliboardInput.svelte +45 -0
- package/src/routes/utils/DocBadge.svelte +7 -0
- package/src/routes/utils/DocBadgeList.svelte +10 -0
- package/src/routes/utils/ExampleDarkMode.svelte +16 -0
- package/src/routes/utils/ExampleWrapper.svelte +143 -0
- package/src/routes/utils/Footer.svelte +64 -0
- package/src/routes/utils/GitHubSource.svelte +13 -0
- package/src/routes/utils/GitHubSourceList.svelte +21 -0
- package/src/routes/utils/MetaTag.svelte +42 -0
- package/src/routes/utils/Newsletter.svelte +52 -0
- package/src/routes/utils/PageHeadSection.svelte +20 -0
- package/src/routes/utils/Paging.svelte +60 -0
- package/src/routes/utils/TableDefaultRow.svelte +81 -0
- package/src/routes/utils/TableProp.svelte +41 -0
- package/src/routes/utils/Toc.svelte +55 -0
- package/src/routes/utils/ToolbarLink.svelte +12 -0
- package/src/routes/utils/data.json +48 -0
- package/src/routes/utils/icons/Angular.svelte +3 -0
- package/src/routes/utils/icons/ArrowLeft.svelte +3 -0
- package/src/routes/utils/icons/ArrowRight.svelte +3 -0
- package/src/routes/utils/icons/Check.svelte +3 -0
- package/src/routes/utils/icons/China.svelte +9 -0
- package/src/routes/utils/icons/Clipboard.svelte +3 -0
- package/src/routes/utils/icons/CoinbaseWallet.svelte +4 -0
- package/src/routes/utils/icons/Combinator.svelte +35 -0
- package/src/routes/utils/icons/Community.svelte +5 -0
- package/src/routes/utils/icons/Dev.svelte +9 -0
- package/src/routes/utils/icons/Discord.svelte +5 -0
- package/src/routes/utils/icons/Dribble.svelte +3 -0
- package/src/routes/utils/icons/Figma.svelte +14 -0
- package/src/routes/utils/icons/FlowbiteLogo.svelte +49 -0
- package/src/routes/utils/icons/Fortmatic.svelte +4 -0
- package/src/routes/utils/icons/Germany.svelte +5 -0
- package/src/routes/utils/icons/GitHub.svelte +13 -0
- package/src/routes/utils/icons/Hunt.svelte +17 -0
- package/src/routes/utils/icons/Italy.svelte +7 -0
- package/src/routes/utils/icons/Mail.svelte +4 -0
- package/src/routes/utils/icons/MetaMask.svelte +31 -0
- package/src/routes/utils/icons/Moon.svelte +3 -0
- package/src/routes/utils/icons/Npm.svelte +3 -0
- package/src/routes/utils/icons/OperaWallet.svelte +17 -0
- package/src/routes/utils/icons/Quote.svelte +3 -0
- package/src/routes/utils/icons/React.svelte +4 -0
- package/src/routes/utils/icons/Reddit.svelte +23 -0
- package/src/routes/utils/icons/Sun.svelte +7 -0
- package/src/routes/utils/icons/Usa.svelte +31 -0
- package/src/routes/utils/icons/Vue.svelte +3 -0
- package/src/routes/utils/icons/WalletConnect.svelte +18 -0
- package/src/routes/utils/icons/YouTube.svelte +3 -0
- package/src/routes/utils/icons/YouTubeFull.svelte +17 -0
- package/src/routes/utils/index.ts +146 -0
- package/src/routes/utils/mdsvex.d.ts +8 -0
- package/static/images/alert-prop.png +0 -0
- package/static/images/carousel/cosmic-timetraveler-pYyOZ8q7AII-unsplash.webp +0 -0
- package/static/images/carousel/cristina-gottardi-CSpjU6hYo_0-unsplash.webp +0 -0
- package/static/images/carousel/johannes-plenio-RwHv7LgeC7s-unsplash.webp +0 -0
- package/static/images/carousel/jonatan-pie-3l3RwQdHRHg-unsplash.webp +0 -0
- package/static/images/carousel/mark-harpur-K2s_YE031CA-unsplash.webp +0 -0
- package/static/images/carousel/pietro-de-grandi-T7K4aEPoGGk-unsplash.webp +0 -0
- package/static/images/carousel/sergey-pesterev-tMvuB9se2uQ-unsplash.webp +0 -0
- package/static/images/carousel/solotravelgoals-7kLufxYoqWk-unsplash.webp +0 -0
- package/static/images/carousel-1.svg +4 -0
- package/static/images/carousel-2.svg +4 -0
- package/static/images/carousel-3.svg +4 -0
- package/static/images/carousel-4.svg +4 -0
- package/static/images/carousel-5.svg +4 -0
- package/static/images/code-example-dark.png +0 -0
- package/static/images/code-example.png +0 -0
- package/static/images/colors.webp +0 -0
- package/static/images/components/accordion-dark.svg +40 -0
- package/static/images/components/accordion.svg +40 -0
- package/static/images/components/alert-dark.svg +11 -0
- package/static/images/components/alert.svg +11 -0
- package/static/images/components/avatar-dark.svg +117 -0
- package/static/images/components/avatar.svg +117 -0
- package/static/images/components/badge-dark.svg +5 -0
- package/static/images/components/badge.svg +5 -0
- package/static/images/components/banner-dark.svg +34 -0
- package/static/images/components/banner.svg +33 -0
- package/static/images/components/bottom-navigation-dark.svg +44 -0
- package/static/images/components/bottom-navigation.svg +43 -0
- package/static/images/components/breadcrumb-dark.svg +7 -0
- package/static/images/components/breadcrumb.svg +7 -0
- package/static/images/components/button-dark.svg +10 -0
- package/static/images/components/button-group-dark.svg +10 -0
- package/static/images/components/button-group.svg +10 -0
- package/static/images/components/button.svg +10 -0
- package/static/images/components/card-dark.svg +31 -0
- package/static/images/components/card.svg +32 -0
- package/static/images/components/carousel-dark.svg +13 -0
- package/static/images/components/carousel.svg +13 -0
- package/static/images/components/charts-dark.svg +29 -0
- package/static/images/components/charts.svg +29 -0
- package/static/images/components/darkmode-dark.svg +7 -0
- package/static/images/components/darkmode.svg +3 -0
- package/static/images/components/device-mockups-dark.svg +17 -0
- package/static/images/components/device-mockups.svg +17 -0
- package/static/images/components/drawer-dark.svg +32 -0
- package/static/images/components/drawer.svg +32 -0
- package/static/images/components/dropdown-dark.svg +35 -0
- package/static/images/components/dropdown.svg +35 -0
- package/static/images/components/footer-dark.svg +52 -0
- package/static/images/components/footer.svg +50 -0
- package/static/images/components/forms-dark.svg +64 -0
- package/static/images/components/forms.svg +64 -0
- package/static/images/components/gallery-dark.svg +14 -0
- package/static/images/components/gallery.svg +14 -0
- package/static/images/components/indicators-dark.svg +38 -0
- package/static/images/components/indicators.svg +38 -0
- package/static/images/components/jumbotron-dark.svg +13 -0
- package/static/images/components/jumbotron.svg +13 -0
- package/static/images/components/kbd-dark.svg +460 -0
- package/static/images/components/kbd.svg +462 -0
- package/static/images/components/list-group-dark.svg +58 -0
- package/static/images/components/list-group.svg +58 -0
- package/static/images/components/mega-menu-dark.svg +71 -0
- package/static/images/components/mega-menu.svg +71 -0
- package/static/images/components/modal-dark.svg +32 -0
- package/static/images/components/modal.svg +33 -0
- package/static/images/components/navbar-dark.svg +78 -0
- package/static/images/components/navbar.svg +78 -0
- package/static/images/components/pagination-dark.svg +50 -0
- package/static/images/components/pagination.svg +50 -0
- package/static/images/components/popover-dark.svg +18 -0
- package/static/images/components/popover.svg +17 -0
- package/static/images/components/progress-dark.svg +10 -0
- package/static/images/components/progress.svg +10 -0
- package/static/images/components/rating-dark.svg +29 -0
- package/static/images/components/rating.svg +29 -0
- package/static/images/components/sidebar-dark.svg +17 -0
- package/static/images/components/sidebar.svg +18 -0
- package/static/images/components/skeleton-dark.svg +10 -0
- package/static/images/components/skeleton.svg +10 -0
- package/static/images/components/speed-dial-dark.svg +69 -0
- package/static/images/components/speed-dial.svg +69 -0
- package/static/images/components/spinner-dark.svg +6 -0
- package/static/images/components/spinner.svg +6 -0
- package/static/images/components/stepper-dark.svg +11 -0
- package/static/images/components/stepper.svg +10 -0
- package/static/images/components/tab-dark.svg +10 -0
- package/static/images/components/tab.svg +10 -0
- package/static/images/components/table-dark.svg +47 -0
- package/static/images/components/table.svg +47 -0
- package/static/images/components/timeline-dark.svg +20 -0
- package/static/images/components/timeline.svg +20 -0
- package/static/images/components/toast-dark.svg +49 -0
- package/static/images/components/toast.svg +49 -0
- package/static/images/components/tooltip-dark.svg +7 -0
- package/static/images/components/tooltip.svg +7 -0
- package/static/images/components/typography-dark.svg +13 -0
- package/static/images/components/typography.svg +13 -0
- package/static/images/components/video-dark.svg +4 -0
- package/static/images/components/video.svg +4 -0
- package/static/images/eugene.jpg +0 -0
- package/static/images/examples/content-gallery-3.png +0 -0
- package/static/images/examples/image-1.jpg +0 -0
- package/static/images/examples/image-1@2x.jpg +0 -0
- package/static/images/examples/image-2@2x.jpg +0 -0
- package/static/images/examples/image-3@2x.jpg +0 -0
- package/static/images/examples/image-4@2x.jpg +0 -0
- package/static/images/experimental/datepicker-dark.svg +67 -0
- package/static/images/experimental/datepicker.svg +67 -0
- package/static/images/favicon.png +0 -0
- package/static/images/favicon.svg +49 -0
- package/static/images/figma-dark.png +0 -0
- package/static/images/figma.png +0 -0
- package/static/images/flowbite-svelte-blocks-optimized.png +0 -0
- package/static/images/flowbite-svelte-icon-logo.svg +49 -0
- package/static/images/flowbite-svelte-icon.svg +49 -0
- package/static/images/flowbite-svelte-og-image.png +0 -0
- package/static/images/flowbite-svelte.png +0 -0
- package/static/images/forms/checkbox-dark.svg +14 -0
- package/static/images/forms/checkbox.svg +14 -0
- package/static/images/forms/file-input-dark.svg +59 -0
- package/static/images/forms/file-input.svg +46 -0
- package/static/images/forms/floating-label-dark.svg +11 -0
- package/static/images/forms/floating-label.svg +11 -0
- package/static/images/forms/input-field-dark.svg +65 -0
- package/static/images/forms/input-field.svg +66 -0
- package/static/images/forms/radio-dark.svg +14 -0
- package/static/images/forms/radio.svg +12 -0
- package/static/images/forms/range-dark.svg +38 -0
- package/static/images/forms/range.svg +38 -0
- package/static/images/forms/search-input-dark.svg +82 -0
- package/static/images/forms/search-input.svg +82 -0
- package/static/images/forms/select-dark.svg +64 -0
- package/static/images/forms/select.svg +64 -0
- package/static/images/forms/textarea-dark.svg +16 -0
- package/static/images/forms/textarea.svg +16 -0
- package/static/images/forms/toggle-dark.svg +12 -0
- package/static/images/forms/toggle.svg +12 -0
- package/static/images/gallery-dark.png +0 -0
- package/static/images/gallery.png +0 -0
- package/static/images/graphs-dark.png +0 -0
- package/static/images/graphs.png +0 -0
- package/static/images/image-1.jpeg +0 -0
- package/static/images/image-1.png +0 -0
- package/static/images/image-1.webp +0 -0
- package/static/images/image-2.jpeg +0 -0
- package/static/images/image-2.png +0 -0
- package/static/images/image-2.webp +0 -0
- package/static/images/image-4.jpeg +0 -0
- package/static/images/image-4.png +0 -0
- package/static/images/image-4.webp +0 -0
- package/static/images/italy.png +0 -0
- package/static/images/nature-1.jpeg +0 -0
- package/static/images/office1.webp +0 -0
- package/static/images/product-1.webp +0 -0
- package/static/images/profile-picture-1.webp +0 -0
- package/static/images/profile-picture-2.webp +0 -0
- package/static/images/profile-picture-3.webp +0 -0
- package/static/images/profile-picture-4.webp +0 -0
- package/static/images/profile-picture-5.webp +0 -0
- package/static/images/sveltekit-sidebar-layout-optimized.png +0 -0
- package/static/images/tailwind-code-dark.png +0 -0
- package/static/images/tailwind-code.png +0 -0
- package/static/images/typography/blockquote-dark.svg +8 -0
- package/static/images/typography/blockquote.svg +8 -0
- package/static/images/typography/heading-dark.svg +5 -0
- package/static/images/typography/heading.svg +5 -0
- package/static/images/typography/hr-dark.svg +7 -0
- package/static/images/typography/hr.svg +7 -0
- package/static/images/typography/image-dark.svg +6 -0
- package/static/images/typography/image.svg +6 -0
- package/static/images/typography/link-dark.svg +4 -0
- package/static/images/typography/link.svg +4 -0
- package/static/images/typography/list-dark.svg +26 -0
- package/static/images/typography/list.svg +26 -0
- package/static/images/typography/paragraph-dark.svg +13 -0
- package/static/images/typography/paragraph.svg +13 -0
- package/static/images/typography/text-dark.svg +11 -0
- package/static/images/typography/text.svg +11 -0
- package/static/site.webmanifest +12 -0
- package/static/styles/docs.css +537 -0
- package/static/videos/compo-doc.gif +0 -0
- package/static/videos/flowbite.mp4 +0 -0
- package/svelte.config.js +28 -0
- package/tailwind.config.cjs +89 -0
- package/tests/components.spec.ts +199 -0
- package/tests/examples.spec.ts +11 -0
- package/tests/extend.spec.ts +19 -0
- package/tests/forms.spec.ts +62 -0
- package/tests/page.spec.ts +46 -0
- package/tests/plugins.spec.ts +7 -0
- package/tests/redirect.spec.ts +175 -0
- package/tests/typography.spec.ts +52 -0
- package/tests/utilities.spec.ts +22 -0
- package/tsconfig.json +21 -0
- package/vite.config.ts +22 -0
- package/vite.config.ts.timestamp-1692816833518-844de2c3e2008.mjs +22 -0
- package/dist/carousels/Caption.svelte +0 -17
- package/dist/carousels/Caption.svelte.d.ts +0 -26
- package/dist/carousels/Caption.svelte.d.ts.map +0 -1
- package/dist/carousels/CarouselTransition.svelte +0 -174
- package/dist/carousels/CarouselTransition.svelte.d.ts +0 -68
- package/dist/carousels/CarouselTransition.svelte.d.ts.map +0 -1
- package/dist/carousels/Indicator.svelte +0 -20
- package/dist/carousels/Indicator.svelte.d.ts +0 -28
- package/dist/carousels/Indicator.svelte.d.ts.map +0 -1
- package/dist/carousels/Slide.svelte +0 -23
- package/dist/carousels/Slide.svelte.d.ts +0 -30
- package/dist/carousels/Slide.svelte.d.ts.map +0 -1
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: componentLayout
|
|
3
|
+
title: Svelte Button Group - Flowbite
|
|
4
|
+
breadcrumb_title: Svelte Button Group
|
|
5
|
+
component_title: Button group
|
|
6
|
+
dir: Components
|
|
7
|
+
description: Button groups are a Tailwind CSS powered set of buttons sticked together in a horizontal line
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
import { TableProp, TableDefaultRow, CompoAttributesViewer, DocBadgeList } from '../../utils'
|
|
12
|
+
import { Badge, P, A } from '$lib'
|
|
13
|
+
const components = 'ButtonGroup'
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
The button group component from Flowbite-Svelte can be used to stack together multiple buttons and links inside a single element.
|
|
17
|
+
|
|
18
|
+
## Setup
|
|
19
|
+
|
|
20
|
+
```svelte example hideOutput
|
|
21
|
+
<script>
|
|
22
|
+
import { ButtonGroup, Button } from 'flowbite-svelte';
|
|
23
|
+
</script>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Default
|
|
27
|
+
|
|
28
|
+
Use the following code to stack together buttons into a single group.
|
|
29
|
+
|
|
30
|
+
```svelte example class="flex justify-center" hideScript
|
|
31
|
+
<script>
|
|
32
|
+
import { ButtonGroup, Button } from 'flowbite-svelte';
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<ButtonGroup>
|
|
36
|
+
<Button>Profile</Button>
|
|
37
|
+
<Button>Settings</Button>
|
|
38
|
+
<Button>Messages</Button>
|
|
39
|
+
</ButtonGroup>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## More examples
|
|
43
|
+
|
|
44
|
+
```svelte example class="flex flex-col flex-wrap gap-4"
|
|
45
|
+
<script>
|
|
46
|
+
import { ButtonGroup, Button, GradientButton } from 'flowbite-svelte';
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<div class="text-gray-900 dark:text-gray-100">
|
|
50
|
+
<div class="py-4">Pills</div>
|
|
51
|
+
<ButtonGroup class="space-x-px">
|
|
52
|
+
<Button pill color="purple">Profile</Button>
|
|
53
|
+
<Button pill color="purple">Settings</Button>
|
|
54
|
+
<Button pill color="purple">Messages</Button>
|
|
55
|
+
</ButtonGroup>
|
|
56
|
+
<div class="py-4">Standard buttons</div>
|
|
57
|
+
<ButtonGroup>
|
|
58
|
+
<Button color="red">Profile</Button>
|
|
59
|
+
<Button color="green">Settings</Button>
|
|
60
|
+
<Button color="yellow">Messages</Button>
|
|
61
|
+
</ButtonGroup>
|
|
62
|
+
<div class="py-4">Outline</div>
|
|
63
|
+
<ButtonGroup>
|
|
64
|
+
<Button outline color="red">Profile</Button>
|
|
65
|
+
<Button outline color="green">Settings</Button>
|
|
66
|
+
<Button outline color="yellow">Messages</Button>
|
|
67
|
+
</ButtonGroup>
|
|
68
|
+
<div class="py-4">Gradient with shadows</div>
|
|
69
|
+
<ButtonGroup>
|
|
70
|
+
<GradientButton shadow="green" color="green">Profile</GradientButton>
|
|
71
|
+
<GradientButton shadow="pink" color="pink">Settings</GradientButton>
|
|
72
|
+
<GradientButton shadow="teal" color="teal">Messages</GradientButton>
|
|
73
|
+
</ButtonGroup>
|
|
74
|
+
<div class="py-4">Dualtone gradient</div>
|
|
75
|
+
<ButtonGroup class="space-x-px">
|
|
76
|
+
<GradientButton color="purpleToBlue">Profile</GradientButton>
|
|
77
|
+
<GradientButton color="cyanToBlue">Settings</GradientButton>
|
|
78
|
+
<GradientButton color="greenToBlue">Messages</GradientButton>
|
|
79
|
+
</ButtonGroup>
|
|
80
|
+
</div>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Button group as links
|
|
84
|
+
|
|
85
|
+
You can also use the button group component as links.
|
|
86
|
+
|
|
87
|
+
```svelte example class="flex justify-center" hideScript
|
|
88
|
+
<script>
|
|
89
|
+
import { ButtonGroup, Button } from 'flowbite-svelte';
|
|
90
|
+
</script>
|
|
91
|
+
|
|
92
|
+
<ButtonGroup>
|
|
93
|
+
<Button href="/">Profile</Button>
|
|
94
|
+
<Button href="/">Settings</Button>
|
|
95
|
+
<Button href="/">Messages</Button>
|
|
96
|
+
</ButtonGroup>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Group buttons with icons
|
|
100
|
+
|
|
101
|
+
You can also use SVG icons inside the grouped buttons.
|
|
102
|
+
|
|
103
|
+
```svelte example class="flex justify-center"
|
|
104
|
+
<script>
|
|
105
|
+
import { ButtonGroup, Button } from 'flowbite-svelte';
|
|
106
|
+
import { UserCircleSolid, AdjustmentsVerticalOutline, DownloadSolid } from 'flowbite-svelte-icons';
|
|
107
|
+
</script>
|
|
108
|
+
|
|
109
|
+
<ButtonGroup>
|
|
110
|
+
<Button>
|
|
111
|
+
<UserCircleSolid class="w-3 h-3 mr-2" />
|
|
112
|
+
Profile
|
|
113
|
+
</Button>
|
|
114
|
+
<Button>
|
|
115
|
+
<AdjustmentsVerticalOutline class="w-3 h-3 mr-2" />
|
|
116
|
+
Settings
|
|
117
|
+
</Button>
|
|
118
|
+
<Button>
|
|
119
|
+
<DownloadSolid class="w-3 h-3 mr-2" />
|
|
120
|
+
Download
|
|
121
|
+
</Button>
|
|
122
|
+
</ButtonGroup>
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Outline
|
|
126
|
+
|
|
127
|
+
Group a series of buttons together on a single line or stack them in a vertical column.
|
|
128
|
+
|
|
129
|
+
```svelte example class="flex justify-center" hideScript
|
|
130
|
+
<script>
|
|
131
|
+
import { ButtonGroup, Button } from 'flowbite-svelte';
|
|
132
|
+
</script>
|
|
133
|
+
|
|
134
|
+
<ButtonGroup>
|
|
135
|
+
<Button outline color="dark">Profile</Button>
|
|
136
|
+
<Button outline color="dark">Settings</Button>
|
|
137
|
+
<Button outline color="dark">Messages</Button>
|
|
138
|
+
</ButtonGroup>
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Outline with icon
|
|
142
|
+
|
|
143
|
+
Group a series of buttons together on a single line or stack them in a vertical column.
|
|
144
|
+
|
|
145
|
+
```svelte example class="flex justify-center"
|
|
146
|
+
<script>
|
|
147
|
+
import { ButtonGroup, Button } from 'flowbite-svelte';
|
|
148
|
+
import { UserCircleSolid, AdjustmentsVerticalOutline, DownloadSolid } from 'flowbite-svelte-icons';
|
|
149
|
+
</script>
|
|
150
|
+
|
|
151
|
+
<ButtonGroup>
|
|
152
|
+
<Button outline color="dark">
|
|
153
|
+
<UserCircleSolid class="w-3 h-3 mr-2" />
|
|
154
|
+
Profile
|
|
155
|
+
</Button>
|
|
156
|
+
<Button outline color="dark">
|
|
157
|
+
<AdjustmentsVerticalOutline class="w-3 h-3 mr-2" />
|
|
158
|
+
Settings
|
|
159
|
+
</Button>
|
|
160
|
+
<Button outline color="dark">
|
|
161
|
+
<DownloadSolid class="w-3 h-3 mr-2" />
|
|
162
|
+
Download
|
|
163
|
+
</Button>
|
|
164
|
+
</ButtonGroup>
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Events
|
|
168
|
+
|
|
169
|
+
You can add the `on:click` event to the `Button` component.
|
|
170
|
+
|
|
171
|
+
```svelte example class="flex justify-center"
|
|
172
|
+
<script>
|
|
173
|
+
import { ButtonGroup, Button } from 'flowbite-svelte';
|
|
174
|
+
const handleClick = () => {
|
|
175
|
+
alert('Clicked');
|
|
176
|
+
};
|
|
177
|
+
</script>
|
|
178
|
+
|
|
179
|
+
<ButtonGroup>
|
|
180
|
+
<Button on:click={handleClick}>Click me</Button>
|
|
181
|
+
<Button>Settings</Button>
|
|
182
|
+
<Button>Messages</Button>
|
|
183
|
+
</ButtonGroup>
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Component data
|
|
187
|
+
|
|
188
|
+
The component has the following props, type, and default values. See [types page](/docs/pages/typescript) for type information.
|
|
189
|
+
|
|
190
|
+
### ButtonGroup styling
|
|
191
|
+
|
|
192
|
+
- Use the `class` prop to overwrite `divClass`.
|
|
193
|
+
|
|
194
|
+
<CompoAttributesViewer {components}/>
|
|
195
|
+
|
|
196
|
+
## References
|
|
197
|
+
|
|
198
|
+
- [Flowbite Button Group](https://flowbite.com/docs/components/button-group/)
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: componentLayout
|
|
3
|
+
title: Svelte Buttons - Flowbite
|
|
4
|
+
breadcrumb_title: Svelte Buttons
|
|
5
|
+
component_title: Buttons
|
|
6
|
+
dir: Components
|
|
7
|
+
description: Use the button component inside forms, as links, social login, payment options with support for multiple styles, colors, sizes, gradients, and shadows
|
|
8
|
+
thumnailSize: w-24
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
import { TableProp, TableDefaultRow, CompoAttributesViewer, DocBadgeList } from '../../utils'
|
|
13
|
+
import { Badge, P, A } from '$lib'
|
|
14
|
+
|
|
15
|
+
const components = 'Button, GradientButton'
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
The button component is probably the most widely used element in any user interface or website as it can be used to launch an action but also to link to other pages.
|
|
19
|
+
|
|
20
|
+
Flowbite-Svelte provides a large variety of styles and sizes for the button component including outlined buttons, multiple colors, sizes, buttons with icons, and more.
|
|
21
|
+
|
|
22
|
+
## Setup
|
|
23
|
+
|
|
24
|
+
Import a button component in the script tag.
|
|
25
|
+
|
|
26
|
+
```svelte example hideOutput
|
|
27
|
+
<script>
|
|
28
|
+
import { Button } from 'flowbite-svelte';
|
|
29
|
+
</script>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Default button
|
|
33
|
+
|
|
34
|
+
Use these default button styles with multiple colors to indicate an action or link within your website. The default `type` is set to `button`. You can change it by using the `type` prop.
|
|
35
|
+
|
|
36
|
+
```svelte example class="flex flex-wrap gap-2" hideScript
|
|
37
|
+
<script>
|
|
38
|
+
import { Button } from 'flowbite-svelte';
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<Button>Default</Button>
|
|
42
|
+
<Button color="alternative">Alternative</Button>
|
|
43
|
+
<Button color="dark">Dark</Button>
|
|
44
|
+
<Button color="light">Light</Button>
|
|
45
|
+
<Button color="blue">Blue</Button>
|
|
46
|
+
<Button color="green">Green</Button>
|
|
47
|
+
<Button color="red">Red</Button>
|
|
48
|
+
<Button color="yellow">Yellow</Button>
|
|
49
|
+
<Button color="purple">Purple</Button>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Button with link
|
|
53
|
+
|
|
54
|
+
You can add a link to a Button component:
|
|
55
|
+
|
|
56
|
+
```svelte example class="flex flex-wrap gap-2" hideScript
|
|
57
|
+
<script>
|
|
58
|
+
import { Button } from 'flowbite-svelte';
|
|
59
|
+
</script>
|
|
60
|
+
|
|
61
|
+
<Button href="/">Home</Button>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Button pills
|
|
65
|
+
|
|
66
|
+
The button pills can be used as an alternative style by using fully rounded edges.
|
|
67
|
+
|
|
68
|
+
```svelte example class="flex flex-wrap gap-2" hideScript
|
|
69
|
+
<script>
|
|
70
|
+
import { Button } from 'flowbite-svelte';
|
|
71
|
+
</script>
|
|
72
|
+
|
|
73
|
+
<Button pill>Default</Button>
|
|
74
|
+
<Button color="alternative" pill>Alternative</Button>
|
|
75
|
+
<Button color="dark" pill>Dark</Button>
|
|
76
|
+
<Button color="light" pill>Light</Button>
|
|
77
|
+
<Button color="blue" pill>Blue</Button>
|
|
78
|
+
<Button color="green" pill>Green</Button>
|
|
79
|
+
<Button color="red" pill>Red</Button>
|
|
80
|
+
<Button color="yellow" pill>Yellow</Button>
|
|
81
|
+
<Button color="purple" pill>Purple</Button>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Gradient monochrome
|
|
85
|
+
|
|
86
|
+
These beautifully colored buttons built with the gradient color stops utility classes from Tailwind CSS can be used as a creative alternative to the default button styles.
|
|
87
|
+
|
|
88
|
+
```svelte example class="flex flex-wrap gap-2"
|
|
89
|
+
<script>
|
|
90
|
+
import { GradientButton } from 'flowbite-svelte';
|
|
91
|
+
</script>
|
|
92
|
+
|
|
93
|
+
<GradientButton color="blue">Blue</GradientButton>
|
|
94
|
+
<GradientButton color="green">Green</GradientButton>
|
|
95
|
+
<GradientButton color="cyan">Cyan</GradientButton>
|
|
96
|
+
<GradientButton color="teal">Teal</GradientButton>
|
|
97
|
+
<GradientButton color="lime">Lime</GradientButton>
|
|
98
|
+
<GradientButton color="red">Red</GradientButton>
|
|
99
|
+
<GradientButton color="pink">Pink</GradientButton>
|
|
100
|
+
<GradientButton color="purple">Purple</GradientButton>
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Gradient duotone
|
|
104
|
+
|
|
105
|
+
These buttons use a style that includes two contrasted colors creating an impressive mesh gradient effect.
|
|
106
|
+
|
|
107
|
+
```svelte example class="flex flex-wrap gap-2"
|
|
108
|
+
<script>
|
|
109
|
+
import { GradientButton } from 'flowbite-svelte';
|
|
110
|
+
</script>
|
|
111
|
+
|
|
112
|
+
<GradientButton color="purpleToBlue">Purple to Blue</GradientButton>
|
|
113
|
+
<GradientButton color="cyanToBlue">Cyan to Blue</GradientButton>
|
|
114
|
+
<GradientButton color="greenToBlue">Green to Blue</GradientButton>
|
|
115
|
+
<GradientButton color="purpleToPink">Purple to Pink</GradientButton>
|
|
116
|
+
<GradientButton color="pinkToOrange">Pink to Orange</GradientButton>
|
|
117
|
+
<GradientButton color="tealToLime">Teal to Lime</GradientButton>
|
|
118
|
+
<GradientButton color="redToYellow">Red to Yellow</GradientButton>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Gradient outline
|
|
122
|
+
|
|
123
|
+
This is a special button style that incorporates a gradient color for the outline that can be used as a secondary style to the fully colored gradient buttons.
|
|
124
|
+
|
|
125
|
+
```svelte example class="flex flex-wrap gap-2"
|
|
126
|
+
<script>
|
|
127
|
+
import { GradientButton } from 'flowbite-svelte';
|
|
128
|
+
</script>
|
|
129
|
+
|
|
130
|
+
<GradientButton outline color="purpleToBlue">Purple to Blue</GradientButton>
|
|
131
|
+
<GradientButton outline color="cyanToBlue">Cyan to Blue</GradientButton>
|
|
132
|
+
<GradientButton outline color="greenToBlue">Green to Blue</GradientButton>
|
|
133
|
+
<GradientButton outline color="purpleToPink">Purple to Pink</GradientButton>
|
|
134
|
+
<GradientButton outline color="pinkToOrange">Pink to Orange</GradientButton>
|
|
135
|
+
<GradientButton outline color="tealToLime">Teal to Lime</GradientButton>
|
|
136
|
+
<GradientButton outline pill color="redToYellow">Red to Yellow</GradientButton>
|
|
137
|
+
<GradientButton outline color="redToYellow" class="w-72">Red to Yellow</GradientButton>
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Colored shadows
|
|
141
|
+
|
|
142
|
+
These beautiful button elements with color shadows can be used since the release of Tailwind v3.0.
|
|
143
|
+
|
|
144
|
+
```svelte example class="flex flex-wrap gap-2"
|
|
145
|
+
<script>
|
|
146
|
+
import { Button, GradientButton } from 'flowbite-svelte';
|
|
147
|
+
</script>
|
|
148
|
+
|
|
149
|
+
<GradientButton shadow color="blue">Blue</GradientButton>
|
|
150
|
+
<GradientButton shadow color="green">Green</GradientButton>
|
|
151
|
+
<GradientButton shadow color="cyan">Cyan</GradientButton>
|
|
152
|
+
<GradientButton shadow color="teal">Teal</GradientButton>
|
|
153
|
+
<GradientButton shadow color="lime">Lime</GradientButton>
|
|
154
|
+
<GradientButton shadow color="red">Red</GradientButton>
|
|
155
|
+
<GradientButton shadow color="pink">Pink</GradientButton>
|
|
156
|
+
<GradientButton shadow color="purple">Purple</GradientButton>
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Outline buttons
|
|
160
|
+
|
|
161
|
+
Use the following button styles to show the colors only for the border of the element.
|
|
162
|
+
|
|
163
|
+
```svelte example class="flex flex-wrap gap-2" hideScript
|
|
164
|
+
<script>
|
|
165
|
+
import { Button } from 'flowbite-svelte';
|
|
166
|
+
</script>
|
|
167
|
+
|
|
168
|
+
<div class="flex flex-wrap gap-2">
|
|
169
|
+
<Button outline>Default</Button>
|
|
170
|
+
<Button outline color="dark">Dark</Button>
|
|
171
|
+
<Button outline color="green">Green</Button>
|
|
172
|
+
<Button outline color="red">Red</Button>
|
|
173
|
+
<Button outline color="yellow">Yellow</Button>
|
|
174
|
+
<Button outline color="purple">Purple</Button>
|
|
175
|
+
</div>
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
## Button sizes with icons
|
|
179
|
+
|
|
180
|
+
Use these examples if you want to use smaller or larger buttons.
|
|
181
|
+
|
|
182
|
+
```svelte example class="gap-2" hideScript
|
|
183
|
+
<script>
|
|
184
|
+
import { Button } from 'flowbite-svelte';
|
|
185
|
+
import { EnvelopeSolid } from 'flowbite-svelte-icons';
|
|
186
|
+
</script>
|
|
187
|
+
|
|
188
|
+
<Button size="xs"><EnvelopeSolid class="w-3 h-3 mr-2" />Extra small</Button>
|
|
189
|
+
<Button size="sm"><EnvelopeSolid class="w-3 h-3 mr-2" />Small</Button>
|
|
190
|
+
<Button size="md"><EnvelopeSolid class="w-3.5 h-3.5 mr-2" />Base</Button>
|
|
191
|
+
<Button size="lg"><EnvelopeSolid class="w-4 h-4 mr-2" />Large</Button>
|
|
192
|
+
<Button size="xl"><EnvelopeSolid class="w-4 h-4 mr-2" />Extra large</Button>
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
## Button with icon
|
|
196
|
+
|
|
197
|
+
Use the following examples to add a SVG icon inside the button either on the left or right side.
|
|
198
|
+
|
|
199
|
+
```svelte example class="flex flex-wrap gap-2"
|
|
200
|
+
<script>
|
|
201
|
+
import { Button } from 'flowbite-svelte';
|
|
202
|
+
import { ArrowRightOutline, ShoppingCartSolid } from 'flowbite-svelte-icons';
|
|
203
|
+
</script>
|
|
204
|
+
|
|
205
|
+
<Button>
|
|
206
|
+
<ShoppingCartSolid class="w-3.5 h-3.5 mr-2" /> Buy Now
|
|
207
|
+
</Button>
|
|
208
|
+
<Button>
|
|
209
|
+
Choose Plan <ArrowRightOutline class="w-3.5 h-3.5 ml-2" />
|
|
210
|
+
</Button>
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
## Button with label
|
|
214
|
+
|
|
215
|
+
This example can be used to show a notification count or helper text inside a button using the badge element.
|
|
216
|
+
|
|
217
|
+
```svelte example class="flex flex-wrap gap-2"
|
|
218
|
+
<script>
|
|
219
|
+
import { Button, Indicator } from 'flowbite-svelte';
|
|
220
|
+
</script>
|
|
221
|
+
|
|
222
|
+
<Button class="gap-2">
|
|
223
|
+
Messages
|
|
224
|
+
<Indicator color="none" class="bg-primary-200 text-xs text-primary-800 font-semibold" size="lg">2</Indicator>
|
|
225
|
+
</Button>
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
## Icon buttons
|
|
229
|
+
|
|
230
|
+
Sometimes you need a button to indicate an action using only an icon.
|
|
231
|
+
|
|
232
|
+
```svelte example class="flex flex-wrap gap-2"
|
|
233
|
+
<script>
|
|
234
|
+
import { Button } from 'flowbite-svelte';
|
|
235
|
+
import { ThumbsUpSolid, ArrowRightOutline } from 'flowbite-svelte-icons';
|
|
236
|
+
</script>
|
|
237
|
+
|
|
238
|
+
<div class="flex flex-wrap items-center gap-2">
|
|
239
|
+
<Button class="!p-2"><ArrowRightOutline class="w-5 h-5" /></Button>
|
|
240
|
+
<Button pill={true} class="!p-2"><ArrowRightOutline class="w-4 h-4" /></Button>
|
|
241
|
+
<Button outline={true} class="!p-2" size="lg">
|
|
242
|
+
<ThumbsUpSolid class="w-5 h-5 text-primary-700" />
|
|
243
|
+
</Button>
|
|
244
|
+
<Button pill={true} outline={true} class="!p-2" size="xl">
|
|
245
|
+
<ThumbsUpSolid class="w-4 h-4 text-primary-700" />
|
|
246
|
+
</Button>
|
|
247
|
+
</div>
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
## Loader
|
|
251
|
+
|
|
252
|
+
Use the spinner components from Flowbite-Svelte to indicate a loader animation inside buttons.
|
|
253
|
+
|
|
254
|
+
```svelte example class="flex flex-wrap gap-2"
|
|
255
|
+
<script>
|
|
256
|
+
import { Button, Spinner } from 'flowbite-svelte';
|
|
257
|
+
</script>
|
|
258
|
+
|
|
259
|
+
<Button>
|
|
260
|
+
<Spinner class="mr-3" size="4" color="white" />Loading ...
|
|
261
|
+
</Button>
|
|
262
|
+
<Button color="alternative">
|
|
263
|
+
<Spinner class="mr-3" size="4" />Loading ...
|
|
264
|
+
</Button>
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
## Disabled
|
|
268
|
+
|
|
269
|
+
You can add any additional button attributes. The following example shows adding the `disabled` attribute.
|
|
270
|
+
|
|
271
|
+
```svelte example class="flex flex-wrap gap-2" hideScript
|
|
272
|
+
<script>
|
|
273
|
+
import { Button } from 'flowbite-svelte';
|
|
274
|
+
</script>
|
|
275
|
+
|
|
276
|
+
<Button disabled>Disabled</Button>
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
## Events
|
|
280
|
+
|
|
281
|
+
You can use on:click or any standard on:\* to listen to the event.
|
|
282
|
+
|
|
283
|
+
```svelte example class="flex flex-wrap gap-2"
|
|
284
|
+
<script>
|
|
285
|
+
import { Button } from 'flowbite-svelte';
|
|
286
|
+
const btn1 = () => {
|
|
287
|
+
alert('You clicked btn1.');
|
|
288
|
+
};
|
|
289
|
+
const btn2 = () => {
|
|
290
|
+
alert('You touched btn2.');
|
|
291
|
+
};
|
|
292
|
+
</script>
|
|
293
|
+
|
|
294
|
+
<Button on:click={btn1}>Button 1</Button>
|
|
295
|
+
<Button on:touchstart={btn2}>Button 2</Button>
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
## Component data
|
|
299
|
+
|
|
300
|
+
The component has the following props, type, and default values. See [types page](/docs/pages/typescript) for type information.
|
|
301
|
+
|
|
302
|
+
### Button styling
|
|
303
|
+
|
|
304
|
+
- Use the `class` prop to overwrite `button` tag class.
|
|
305
|
+
|
|
306
|
+
### GradientButton styling
|
|
307
|
+
|
|
308
|
+
- Use the `class` prop to overwrite `button` tag class.
|
|
309
|
+
|
|
310
|
+
<CompoAttributesViewer {components}/>
|
|
311
|
+
|
|
312
|
+
## References
|
|
313
|
+
|
|
314
|
+
- [Flowbite Buttons](https://flowbite.com/docs/components/buttons/)
|