flowbite-svelte 0.44.7 → 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,215 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: componentLayout
|
|
3
|
+
title: Svelte Avatar - Flowbite
|
|
4
|
+
breadcrumb_title: Svelte Avatar
|
|
5
|
+
component_title: Avatar
|
|
6
|
+
dir: Components
|
|
7
|
+
description: Use the avatar component to show a visual representation of a user profile using an image element or SVG object based on multiple styles and sizes
|
|
8
|
+
thumnailSize: w-64
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
import { TableProp, TableDefaultRow, CompoAttributesViewer } from '../../utils'
|
|
13
|
+
import { P, A } from '$lib'
|
|
14
|
+
|
|
15
|
+
const components = 'Avatar, Placeholder'
|
|
16
|
+
let name;
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
The avatar component can be used as a visual identifier for a user profile on your website and you can use the examples from Flowbite to modify the styles and sizes of these components using the utility classes from Tailwind CSS.
|
|
20
|
+
|
|
21
|
+
## Setup
|
|
22
|
+
|
|
23
|
+
Import `Avatar`. If you are using the user dropdown, import `Dropdown`, `DropdownHeader`, `DropdownItem`, `DropdownDivider`. If you are using tooltip for avatar import `Tooltip`.
|
|
24
|
+
|
|
25
|
+
```svelte example hideOutput
|
|
26
|
+
<script>
|
|
27
|
+
import { Avatar, Dropdown, DropdownHeader, DropdownItem, DropdownDivider, Tooltip } from 'flowbite-svelte';
|
|
28
|
+
</script>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Default avatar
|
|
32
|
+
|
|
33
|
+
Use this example to create a circle and rounded avatar on an image element.
|
|
34
|
+
|
|
35
|
+
```svelte example class="flex justify-center gap-4" hideScript
|
|
36
|
+
<script>
|
|
37
|
+
import { Avatar } from 'flowbite-svelte';
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<div class="flex space-x-4">
|
|
41
|
+
<Avatar src="/images/profile-picture-2.webp" />
|
|
42
|
+
<Avatar src="/images/profile-picture-2.webp" rounded />
|
|
43
|
+
</div>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Bordered
|
|
47
|
+
|
|
48
|
+
You can apply a border around the avatar component.
|
|
49
|
+
|
|
50
|
+
If you can use the `ring-{color}` class from Tailwind CSS to modify ring color.
|
|
51
|
+
|
|
52
|
+
```svelte example class="flex justify-center gap-4" hideScript
|
|
53
|
+
<script>
|
|
54
|
+
import { Avatar } from 'flowbite-svelte';
|
|
55
|
+
</script>
|
|
56
|
+
|
|
57
|
+
<Avatar src="/images/profile-picture-2.webp" border />
|
|
58
|
+
<Avatar src="/images/profile-picture-2.webp" border class="ring-red-400 dark:ring-red-300" />
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Placeholder
|
|
62
|
+
|
|
63
|
+
When there is no custom image available a placeholder is displayed.
|
|
64
|
+
|
|
65
|
+
```svelte example class="flex justify-center gap-4" hideScript
|
|
66
|
+
<script>
|
|
67
|
+
import { Avatar } from 'flowbite-svelte';
|
|
68
|
+
</script>
|
|
69
|
+
|
|
70
|
+
<Avatar />
|
|
71
|
+
<Avatar rounded />
|
|
72
|
+
<Avatar border />
|
|
73
|
+
<Avatar rounded border />
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Placeholder initials
|
|
77
|
+
|
|
78
|
+
This example can be used to show the initials of the user’s first and last name as a placeholder when no profile picture is available.
|
|
79
|
+
|
|
80
|
+
```svelte example class="flex justify-center gap-4" hideScript
|
|
81
|
+
<script>
|
|
82
|
+
import { Avatar } from 'flowbite-svelte';
|
|
83
|
+
</script>
|
|
84
|
+
|
|
85
|
+
<Avatar>JL</Avatar>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Avatar tooltip
|
|
89
|
+
|
|
90
|
+
Use this example to show a tooltip when hovering over the avatar.
|
|
91
|
+
|
|
92
|
+
```svelte example class="flex justify-center gap-4"
|
|
93
|
+
<script>
|
|
94
|
+
import { Avatar, Tooltip } from 'flowbite-svelte';
|
|
95
|
+
</script>
|
|
96
|
+
|
|
97
|
+
<Avatar data-name="Jese Leos" rounded src="/images/profile-picture-1.webp" />
|
|
98
|
+
<Avatar data-name="Robert Gouth" rounded src="/images/profile-picture-2.webp" />
|
|
99
|
+
<Avatar data-name="Bonnie Green" rounded src="/images/profile-picture-3.webp" />
|
|
100
|
+
<Tooltip triggeredBy="[data-name]" on:show={(e) => (name = e.target.dataset.name)}>{name}</Tooltip>
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Dot indicator
|
|
104
|
+
|
|
105
|
+
Use a dot element relative to the avatar component as an indicator for the user (eg. online or offline status).
|
|
106
|
+
|
|
107
|
+
```svelte example class="flex justify-center gap-4"
|
|
108
|
+
<script>
|
|
109
|
+
import { Avatar, Indicator } from 'flowbite-svelte';
|
|
110
|
+
</script>
|
|
111
|
+
|
|
112
|
+
<Avatar src="/images/profile-picture-3.webp" dot={{ color: 'red' }} />
|
|
113
|
+
<Avatar src="/images/profile-picture-3.webp" dot={{ placement: 'top-right', color: 'red' }} rounded />
|
|
114
|
+
<Avatar src="/images/profile-picture-5.webp" dot={{ placement: 'bottom-right', color: 'green' }} />
|
|
115
|
+
<Avatar src="/images/profile-picture-5.webp" dot={{ placement: 'bottom-right' }} rounded />
|
|
116
|
+
|
|
117
|
+
<Avatar dot={{}} />
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Stacked
|
|
121
|
+
|
|
122
|
+
Use this example if you want to stack a group of users by overlapping the avatar components.
|
|
123
|
+
|
|
124
|
+
```svelte example class="flex flex-col justify-center gap-4" hideScript
|
|
125
|
+
<script>
|
|
126
|
+
import { Avatar } from 'flowbite-svelte';
|
|
127
|
+
</script>
|
|
128
|
+
|
|
129
|
+
<div class="flex mb-5">
|
|
130
|
+
<Avatar src="/images/profile-picture-1.webp" stacked />
|
|
131
|
+
<Avatar src="/images/profile-picture-2.webp" stacked />
|
|
132
|
+
<Avatar src="/images/profile-picture-3.webp" stacked />
|
|
133
|
+
<Avatar stacked />
|
|
134
|
+
</div>
|
|
135
|
+
<div class="flex">
|
|
136
|
+
<Avatar src="/images/profile-picture-1.webp" stacked />
|
|
137
|
+
<Avatar src="/images/profile-picture-2.webp" stacked />
|
|
138
|
+
<Avatar src="/images/profile-picture-3.webp" stacked />
|
|
139
|
+
<Avatar stacked href="/" class="bg-gray-700 text-white hover:bg-gray-600 text-sm">+99</Avatar>
|
|
140
|
+
</div>
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Avatar text
|
|
144
|
+
|
|
145
|
+
This example can be used if you want to show additional information in the form of text elements such as the user’s name and join date.
|
|
146
|
+
|
|
147
|
+
```svelte example class="flex justify-center gap-4" hideScript
|
|
148
|
+
<script>
|
|
149
|
+
import { Avatar } from 'flowbite-svelte';
|
|
150
|
+
</script>
|
|
151
|
+
|
|
152
|
+
<div class="flex items-center space-x-4">
|
|
153
|
+
<Avatar src="/images/profile-picture-1.webp" rounded />
|
|
154
|
+
<div class="space-y-1 font-medium dark:text-white">
|
|
155
|
+
<div>Jese Leos</div>
|
|
156
|
+
<div class="text-sm text-gray-500 dark:text-gray-400">Joined in August 2014</div>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## User dropdown
|
|
162
|
+
|
|
163
|
+
Use this example if you want to show a dropdown menu when clicking on the avatar component.
|
|
164
|
+
|
|
165
|
+
```svelte example class="flex justify-center h-96"
|
|
166
|
+
<script>
|
|
167
|
+
import { Avatar, Dropdown, DropdownHeader, DropdownItem, DropdownDivider } from 'flowbite-svelte';
|
|
168
|
+
</script>
|
|
169
|
+
|
|
170
|
+
<Avatar id="user-drop" src="/images/profile-picture-3.webp" class="cursor-pointer" dot={{ color: 'green' }} />
|
|
171
|
+
<Dropdown triggeredBy="#user-drop">
|
|
172
|
+
<DropdownHeader>
|
|
173
|
+
<span class="block text-sm">Bonnie Green</span>
|
|
174
|
+
<span class="block truncate text-sm font-medium">name@flowbite.com</span>
|
|
175
|
+
</DropdownHeader>
|
|
176
|
+
<DropdownItem>Dashboard</DropdownItem>
|
|
177
|
+
<DropdownItem>Settings</DropdownItem>
|
|
178
|
+
<DropdownItem>Earnings</DropdownItem>
|
|
179
|
+
<DropdownDivider />
|
|
180
|
+
<DropdownItem>Sign out</DropdownItem>
|
|
181
|
+
</Dropdown>
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
## Sizes
|
|
185
|
+
|
|
186
|
+
Select size from xs | sm | md | lg | xl.
|
|
187
|
+
|
|
188
|
+
```svelte example class="flex flex-col gap-4" hideScript
|
|
189
|
+
<script>
|
|
190
|
+
import { Avatar } from 'flowbite-svelte';
|
|
191
|
+
</script>
|
|
192
|
+
|
|
193
|
+
<div class=" flex flex-wrap justify-center space-x-4">
|
|
194
|
+
<Avatar src="/images/profile-picture-3.webp" rounded size="xs" />
|
|
195
|
+
<Avatar src="/images/profile-picture-3.webp" rounded size="sm" />
|
|
196
|
+
<Avatar src="/images/profile-picture-3.webp" rounded size="md" />
|
|
197
|
+
<Avatar src="/images/profile-picture-3.webp" rounded size="lg" />
|
|
198
|
+
<Avatar src="/images/profile-picture-3.webp" rounded size="xl" />
|
|
199
|
+
</div>
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
## Component data
|
|
203
|
+
|
|
204
|
+
The component has the following props, type, and default values. See [types page](/docs/pages/typescript) for type information.
|
|
205
|
+
|
|
206
|
+
### Avatar styling
|
|
207
|
+
|
|
208
|
+
- Use the `class` prop to overwrite the default class.
|
|
209
|
+
- Use the `classPlaceholder` prop to overwrite the placeholder class.
|
|
210
|
+
|
|
211
|
+
<CompoAttributesViewer {components}/>
|
|
212
|
+
|
|
213
|
+
## References
|
|
214
|
+
|
|
215
|
+
- [Flowbite Avatar](https://flowbite.com/docs/components/avatar/)
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: componentLayout
|
|
3
|
+
title: Svelte Badge - Flowbite
|
|
4
|
+
breadcrumb_title: Svelte Badge
|
|
5
|
+
component_title: Badge
|
|
6
|
+
dir: Components
|
|
7
|
+
description: Use Tailwind CSS badges as elements to show counts or labels separately or inside other components
|
|
8
|
+
thumnailSize: w-28
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
import { TableProp, TableDefaultRow, CompoAttributesViewer } from '../../utils'
|
|
13
|
+
import { P, A } from '$lib'
|
|
14
|
+
import componentData1 from '../../component-data/Badge.json'
|
|
15
|
+
const components = 'Badge'
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
The badge component can be used to complement other elements such as buttons or text elements as a label or to show the count of a given data, such as the number of comments for an article or how much time has passed by since a comment has been made.
|
|
19
|
+
|
|
20
|
+
Alternatively, badges can also be used as standalone elements that link to a certain page.
|
|
21
|
+
|
|
22
|
+
## Setup
|
|
23
|
+
|
|
24
|
+
Import a badge component in the script tag.
|
|
25
|
+
|
|
26
|
+
```svelte example hideOutput
|
|
27
|
+
<script>
|
|
28
|
+
import { Badge } from 'flowbite-svelte';
|
|
29
|
+
</script>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Default badge
|
|
33
|
+
|
|
34
|
+
Use the following badge elements to indicate counts or labels inside or outside components.
|
|
35
|
+
|
|
36
|
+
```svelte example class="flex flex-wrap gap-2" hideScript
|
|
37
|
+
<script>
|
|
38
|
+
import { Badge } from 'flowbite-svelte';
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<Badge>Default</Badge>
|
|
42
|
+
<Badge color="dark">Dark</Badge>
|
|
43
|
+
<Badge color="red">Red</Badge>
|
|
44
|
+
<Badge color="green">Green</Badge>
|
|
45
|
+
<Badge color="yellow">Yellow</Badge>
|
|
46
|
+
<Badge color="indigo">Indigo</Badge>
|
|
47
|
+
<Badge color="purple">Purple</Badge>
|
|
48
|
+
<Badge color="pink">Pink</Badge>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Large badges
|
|
52
|
+
|
|
53
|
+
Use the `large` prop to create a large variant of the badges.
|
|
54
|
+
|
|
55
|
+
```svelte example class="flex flex-wrap gap-2" hideScript
|
|
56
|
+
<script>
|
|
57
|
+
import { Badge } from 'flowbite-svelte';
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<Badge large>Default</Badge>
|
|
61
|
+
<Badge large color="dark">Dark</Badge>
|
|
62
|
+
<Badge large color="red">Red</Badge>
|
|
63
|
+
<Badge large color="green">Green</Badge>
|
|
64
|
+
<Badge large color="yellow">Yellow</Badge>
|
|
65
|
+
<Badge large color="indigo">Indigo</Badge>
|
|
66
|
+
<Badge large color="purple">Purple</Badge>
|
|
67
|
+
<Badge large color="pink">Pink</Badge>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Bordered badge
|
|
71
|
+
|
|
72
|
+
Use the `border` prop to add a border accent to the badge component.
|
|
73
|
+
|
|
74
|
+
```svelte example class="flex flex-wrap gap-2" hideScript
|
|
75
|
+
<script>
|
|
76
|
+
import { Badge } from 'flowbite-svelte';
|
|
77
|
+
</script>
|
|
78
|
+
|
|
79
|
+
<Badge border>Default</Badge>
|
|
80
|
+
<Badge border color="dark">Dark</Badge>
|
|
81
|
+
<Badge border color="red">Red</Badge>
|
|
82
|
+
<Badge border color="green">Green</Badge>
|
|
83
|
+
<Badge border color="yellow">Yellow</Badge>
|
|
84
|
+
<Badge border color="indigo">Indigo</Badge>
|
|
85
|
+
<Badge border color="purple">Purple</Badge>
|
|
86
|
+
<Badge border color="pink">Pink</Badge>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Pills badge
|
|
90
|
+
|
|
91
|
+
Use the `rounded` prop to make the corners even more rounded like pills for the badge component.
|
|
92
|
+
|
|
93
|
+
```svelte example class="flex flex-wrap gap-2" hideScript
|
|
94
|
+
<script>
|
|
95
|
+
import { Badge } from 'flowbite-svelte';
|
|
96
|
+
</script>
|
|
97
|
+
|
|
98
|
+
<Badge rounded>Default</Badge>
|
|
99
|
+
<Badge rounded color="dark">Dark</Badge>
|
|
100
|
+
<Badge rounded color="red">Red</Badge>
|
|
101
|
+
<Badge rounded color="green">Green</Badge>
|
|
102
|
+
<Badge rounded color="yellow">Yellow</Badge>
|
|
103
|
+
<Badge rounded color="indigo">Indigo</Badge>
|
|
104
|
+
<Badge rounded color="purple">Purple</Badge>
|
|
105
|
+
<Badge rounded color="pink">Pink</Badge>
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Badges as links
|
|
109
|
+
|
|
110
|
+
You can also use badges as anchor elements to link to another page.
|
|
111
|
+
|
|
112
|
+
```svelte example class="flex flex-wrap gap-2" hideScript
|
|
113
|
+
<script>
|
|
114
|
+
import { Badge } from 'flowbite-svelte';
|
|
115
|
+
</script>
|
|
116
|
+
|
|
117
|
+
<Badge href="/">Badge link</Badge>
|
|
118
|
+
<Badge href="/" large>Badge link</Badge>
|
|
119
|
+
<Badge href="/" border>Badge link</Badge>
|
|
120
|
+
<Badge href="/" rounded>Badge link</Badge>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Badges with icon
|
|
124
|
+
|
|
125
|
+
You can also use SVG icons inside the badge elements.
|
|
126
|
+
|
|
127
|
+
```svelte example class="flex flex-wrap gap-2"
|
|
128
|
+
<script>
|
|
129
|
+
import { Badge } from 'flowbite-svelte';
|
|
130
|
+
import { ClockSolid } from 'flowbite-svelte-icons';
|
|
131
|
+
</script>
|
|
132
|
+
|
|
133
|
+
<Badge color="dark" border>
|
|
134
|
+
<ClockSolid class="w-2.5 h-2.5 mr-1.5" />
|
|
135
|
+
3 days ago
|
|
136
|
+
</Badge>
|
|
137
|
+
<Badge border>
|
|
138
|
+
<ClockSolid class="text-primary-800 dark:text-primary-400 w-2.5 h-2.5 mr-1.5" />
|
|
139
|
+
2 minutes ago
|
|
140
|
+
</Badge>
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Notification badge
|
|
144
|
+
|
|
145
|
+
To achive the functionality of the notification badge, use the sibling [`Indicator`](/docs/components/indicators) component. Remember to add the `relative` class to parent element.
|
|
146
|
+
|
|
147
|
+
```svelte example class="flex flex-wrap gap-4"
|
|
148
|
+
<script>
|
|
149
|
+
import { Button, Indicator } from 'flowbite-svelte';
|
|
150
|
+
import { EnvelopeSolid } from 'flowbite-svelte-icons';
|
|
151
|
+
</script>
|
|
152
|
+
|
|
153
|
+
<Button class="relative" size="sm">
|
|
154
|
+
<EnvelopeSolid class="text-white dark:text-white" />
|
|
155
|
+
<span class="sr-only">Notifications</span>
|
|
156
|
+
<Indicator color="blue" border size="xl" placement="top-right" class="text-xs font-bold">18</Indicator>
|
|
157
|
+
</Button>
|
|
158
|
+
|
|
159
|
+
<Button class="relative" size="sm">
|
|
160
|
+
<EnvelopeSolid class="text-white dark:text-white" />
|
|
161
|
+
<span class="sr-only">Notifications</span>
|
|
162
|
+
<Indicator color="red" border size="xl" placement="top-right" class="text-xs font-bold">20</Indicator>
|
|
163
|
+
</Button>
|
|
164
|
+
|
|
165
|
+
<Button class="relative" size="sm">
|
|
166
|
+
<EnvelopeSolid class="text-white dark:text-white" />
|
|
167
|
+
<span class="sr-only">Notifications</span>
|
|
168
|
+
<Indicator color="dark" border size="xl" placement="bottom-right" class="text-xs font-bold">20</Indicator>
|
|
169
|
+
</Button>
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## Button with badge
|
|
173
|
+
|
|
174
|
+
Use this example to add a badge inside a button component for a count indicator.
|
|
175
|
+
|
|
176
|
+
```svelte example class="flex flex-wrap gap-4"
|
|
177
|
+
<script>
|
|
178
|
+
import { Badge, Button } from 'flowbite-svelte';
|
|
179
|
+
</script>
|
|
180
|
+
|
|
181
|
+
<Button>
|
|
182
|
+
Messages
|
|
183
|
+
<Badge rounded class="w-4 h-4 ml-2 p-0 font-semibold text-primary-800 bg-white dark:text-primary-800 dark:bg-white">2</Badge>
|
|
184
|
+
</Button>
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## Badge with icon only
|
|
188
|
+
|
|
189
|
+
Alternatively you can also use badges which indicate only a SVG icon.
|
|
190
|
+
|
|
191
|
+
```svelte example hideScript
|
|
192
|
+
<script>
|
|
193
|
+
import { Badge } from 'flowbite-svelte';
|
|
194
|
+
import { CheckOutline } from 'flowbite-svelte-icons';
|
|
195
|
+
</script>
|
|
196
|
+
|
|
197
|
+
<Badge color="dark" rounded large class="!p-1 !font-semibold">
|
|
198
|
+
<CheckOutline class="h-3 w-3" />
|
|
199
|
+
<span class="sr-only">Icon description</span>
|
|
200
|
+
</Badge>
|
|
201
|
+
<Badge rounded large class="!p-1 !font-semibold">
|
|
202
|
+
<CheckOutline class="h-3 w-3 text-primary-800 dark:text-primary-400" />
|
|
203
|
+
<span class="sr-only">Icon description</span>
|
|
204
|
+
</Badge>
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## Dismissable badges
|
|
208
|
+
|
|
209
|
+
Use the `dimissable` prop to dismiss the current badge.
|
|
210
|
+
|
|
211
|
+
```svelte example class="flex flex-wrap gap-4" hideScript
|
|
212
|
+
<script>
|
|
213
|
+
import { Badge } from 'flowbite-svelte';
|
|
214
|
+
</script>
|
|
215
|
+
|
|
216
|
+
<Badge dismissable large>Default</Badge>
|
|
217
|
+
<Badge dismissable large color="dark">Dark</Badge>
|
|
218
|
+
<Badge dismissable large color="red">Red</Badge>
|
|
219
|
+
<Badge dismissable large color="green">Green</Badge>
|
|
220
|
+
<Badge dismissable large color="yellow">Yellow</Badge>
|
|
221
|
+
<Badge dismissable large color="indigo">Indigo</Badge>
|
|
222
|
+
<Badge dismissable large color="purple">Purple</Badge>
|
|
223
|
+
<Badge dismissable large color="pink">Pink</Badge>
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
Use the `close-button` slot to add your desired button. Don't forget to use the slot prop `close` to dismiss your badge.
|
|
227
|
+
|
|
228
|
+
```svelte example class="gap-4"
|
|
229
|
+
<script>
|
|
230
|
+
import { Badge } from 'flowbite-svelte';
|
|
231
|
+
import { CloseCircleSolid } from 'flowbite-svelte-icons';
|
|
232
|
+
</script>
|
|
233
|
+
|
|
234
|
+
<Badge dismissable>
|
|
235
|
+
Default
|
|
236
|
+
<button slot="close-button" let:close on:click={close} type="button" class="inline-flex items-center rounded-full p-0.5 my-0.5 ml-1.5 -mr-1.5 text-sm bg-primary-500 dark:bg-primary-400 text-white dark:text-primary-800 hover:bg-primary-900 hover:text-white dark:hover:bg-red-900 dark:hover:text-yellow-300" aria-label="Remove">
|
|
237
|
+
<CloseCircleSolid class="h-4 w-4" />
|
|
238
|
+
<span class="sr-only">Remove badge</span>
|
|
239
|
+
</button>
|
|
240
|
+
</Badge>
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
A `dismiss` event will be dispatched during the dismissal, listen to it if needed.
|
|
244
|
+
|
|
245
|
+
```svelte example class="gap-4"
|
|
246
|
+
<script>
|
|
247
|
+
import { Badge } from 'flowbite-svelte';
|
|
248
|
+
|
|
249
|
+
function handleClose(event) {
|
|
250
|
+
alert('Badge dismissed');
|
|
251
|
+
}
|
|
252
|
+
</script>
|
|
253
|
+
|
|
254
|
+
<Badge dismissable large on:close={handleClose}>Default</Badge>
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
## Component data
|
|
258
|
+
|
|
259
|
+
The component has the following props, type, and default values. See [types page](/docs/pages/typescript) for type information.
|
|
260
|
+
|
|
261
|
+
### Badge styling
|
|
262
|
+
|
|
263
|
+
- Use the `class` prop to overwrite the default class.
|
|
264
|
+
|
|
265
|
+
<CompoAttributesViewer {components}/>
|
|
266
|
+
|
|
267
|
+
## References
|
|
268
|
+
|
|
269
|
+
- [Flowbite Badge](https://flowbite.com/docs/components/badge/)
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: componentLayout
|
|
3
|
+
title: Svelte Sticky Banner - Flowbite
|
|
4
|
+
breadcrumb_title: Svelte Sticky Banner
|
|
5
|
+
component_title: Banner
|
|
6
|
+
dir: Components
|
|
7
|
+
description: Use the banner component to show marketing messages and CTA buttons at the top or bottom side of your website based on the utility classes from Tailwind CSS
|
|
8
|
+
thumnailSize: w-64
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
import { TableProp, TableDefaultRow, CompoAttributesViewer } from '../../utils'
|
|
13
|
+
import { P, A } from '$lib'
|
|
14
|
+
const components = 'Banner'
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
Get started with the sticky banner component coded with Tailwind CSS and Flowbite to show marketing, informational and CTA messages to your website visitors fixed to the top or bottom part of the page as the user scroll down the main content area.
|
|
18
|
+
|
|
19
|
+
Explore the following examples based on various styles, sizes, and positionings to leverage the sticky banner component and increase marketing conversions with a responsive element supporting dark mode.
|
|
20
|
+
|
|
21
|
+
## Setup
|
|
22
|
+
|
|
23
|
+
```svelte example hideOutput
|
|
24
|
+
<script>
|
|
25
|
+
import { Banner } from 'flowbite-svelte';
|
|
26
|
+
</script>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Default sticky banner
|
|
30
|
+
|
|
31
|
+
Use this free example to show a text message for announcement with a CTA link, an icon element and a close button to dismiss the banner.
|
|
32
|
+
|
|
33
|
+
```svelte example class="flex flex-col relative"
|
|
34
|
+
<script>
|
|
35
|
+
import { Banner, Skeleton, ImagePlaceholder } from 'flowbite-svelte';
|
|
36
|
+
import { BullhornSolid } from 'flowbite-svelte-icons';
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<Skeleton class="py-4" />
|
|
40
|
+
<ImagePlaceholder class="py-4" />
|
|
41
|
+
|
|
42
|
+
<Banner id="default-banner" position="absolute">
|
|
43
|
+
<p class="flex items-center text-sm font-normal text-gray-500 dark:text-gray-400">
|
|
44
|
+
<span class="inline-flex p-1 mr-3 bg-gray-200 rounded-full dark:bg-gray-600">
|
|
45
|
+
<BullhornSolid class="w-3 h-3 text-gray-500 dark:text-gray-400" />
|
|
46
|
+
<span class="sr-only">Light bulb</span>
|
|
47
|
+
</span>
|
|
48
|
+
<span>
|
|
49
|
+
New brand identity has been launched for the <a href="https://flowbite.com" class="inline font-medium text-primary-600 underline dark:text-primary-500 underline-offset-2 decoration-600 dark:decoration-500 decoration-solid hover:no-underline"> Flowbite Library </a>
|
|
50
|
+
</span>
|
|
51
|
+
</p>
|
|
52
|
+
</Banner>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Bottom banner position
|
|
56
|
+
|
|
57
|
+
This example can be used to position the sticky banner to the bottom side of the page instead of the top side.
|
|
58
|
+
|
|
59
|
+
```svelte example class="flex flex-col relative"
|
|
60
|
+
<script>
|
|
61
|
+
import { Banner, Skeleton, ImagePlaceholder } from 'flowbite-svelte';
|
|
62
|
+
import { SalePercentSolid, ArrowRightSolid } from 'flowbite-svelte-icons';
|
|
63
|
+
</script>
|
|
64
|
+
|
|
65
|
+
<Skeleton class="py-4" />
|
|
66
|
+
<ImagePlaceholder class="py-4" />
|
|
67
|
+
|
|
68
|
+
<Banner id="bottom-banner" position="absolute" bannerType="bottom">
|
|
69
|
+
<p class="flex items-center text-sm font-normal text-gray-500 dark:text-gray-400">
|
|
70
|
+
<span class="inline-flex p-1 mr-3 bg-gray-200 rounded-full dark:bg-gray-600">
|
|
71
|
+
<SalePercentSolid class="w-4 h-4 text-gray-500 dark:text-gray-400" />
|
|
72
|
+
<span class="sr-only">Discount coupon</span>
|
|
73
|
+
</span>
|
|
74
|
+
<span>
|
|
75
|
+
Get 5% commission per sale <a href="https://flowbite.com" class="flex items-center ml-0 text-sm font-medium text-primary-600 md:ml-1 md:inline-flex dark:text-primary-500 hover:underline">
|
|
76
|
+
Become a partner <ArrowRightSolid class="w-3 h-3 ml-2" />
|
|
77
|
+
</a>
|
|
78
|
+
</span>
|
|
79
|
+
</p>
|
|
80
|
+
</Banner>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Marketing CTA banner
|
|
84
|
+
|
|
85
|
+
Use this free example to show a text message for announcement with a CTA link.
|
|
86
|
+
|
|
87
|
+
```svelte example class="flex flex-col relative"
|
|
88
|
+
<script>
|
|
89
|
+
import { Banner, Skeleton, ImagePlaceholder } from 'flowbite-svelte';
|
|
90
|
+
</script>
|
|
91
|
+
|
|
92
|
+
<Skeleton class="py-4" />
|
|
93
|
+
<ImagePlaceholder class="py-4" />
|
|
94
|
+
|
|
95
|
+
<Banner id="cta-banner" position="absolute" bannerType="cta">
|
|
96
|
+
<a href="https://flowbite-svelte.com/" class="flex items-center mb-2 border-gray-200 md:pr-4 md:mr-4 md:border-r md:mb-0 dark:border-gray-600">
|
|
97
|
+
<img src="https://flowbite-svelte.com/images/flowbite-svelte-icon-logo.svg" class="h-6 mr-2" alt="Flowbite Logo" />
|
|
98
|
+
<span class="self-center text-lg font-semibold whitespace-nowrap dark:text-white">Flowbite</span>
|
|
99
|
+
</a>
|
|
100
|
+
<p class="flex items-center text-sm font-normal text-gray-500 dark:text-gray-400">Build websites even faster with components on top of Tailwind CSS</p>
|
|
101
|
+
</Banner>
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Newsletter sign-up banner
|
|
105
|
+
|
|
106
|
+
This example can be used to encourage your website visitors to sign up to your email newsletter by showing an inline form inside the sticky banner on the top side of your page.
|
|
107
|
+
|
|
108
|
+
```svelte example class="flex flex-col relative"
|
|
109
|
+
<script>
|
|
110
|
+
import { Banner, Skeleton, ImagePlaceholder } from 'flowbite-svelte';
|
|
111
|
+
</script>
|
|
112
|
+
|
|
113
|
+
<Skeleton class="py-4" />
|
|
114
|
+
<ImagePlaceholder class="py-4" />
|
|
115
|
+
|
|
116
|
+
<Banner id="signup-banner" position="absolute" bannerType="signup">
|
|
117
|
+
<form action="/" class="flex flex-col items-center w-full md:flex-row">
|
|
118
|
+
<label for="email" class="flex-shrink-0 mb-2 mr-auto text-sm font-medium text-gray-500 md:mb-0 md:mr-4 dark:text-gray-400 md:m-0"> Sign up for our newsletter </label>
|
|
119
|
+
<input type="email" id="email" placeholder="Enter your email" class="bg-white border border-gray-300 text-gray-900 md:w-64 mb-2 md:mb-0 md:mr-4 text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500" required />
|
|
120
|
+
<button type="submit" class="text-white bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:outline-none focus:ring-primary-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800"> Subscribe </button>
|
|
121
|
+
</form>
|
|
122
|
+
</Banner>
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Informational banner
|
|
126
|
+
|
|
127
|
+
This example can be used to share important information with your website visitors by showing a heading and a paragraph inside the sticky banner and two CTA buttons with links.
|
|
128
|
+
|
|
129
|
+
```svelte example class="flex flex-col relative"
|
|
130
|
+
<script>
|
|
131
|
+
import { Banner, Skeleton, ImagePlaceholder } from 'flowbite-svelte';
|
|
132
|
+
import { OpenBookSolid, ArrowRightSolid } from 'flowbite-svelte-icons';
|
|
133
|
+
</script>
|
|
134
|
+
|
|
135
|
+
<Skeleton class="py-4" />
|
|
136
|
+
<ImagePlaceholder class="py-4" />
|
|
137
|
+
|
|
138
|
+
<Banner id="info-banner" position="absolute" bannerType="info">
|
|
139
|
+
<div slot="header" class="mb-4 md:mb-0 md:mr-4">
|
|
140
|
+
<h2 class="mb-1 text-base font-semibold text-gray-900 dark:text-white">Integration is the key</h2>
|
|
141
|
+
<p class="flex items-center text-sm font-normal text-gray-500 dark:text-gray-400">You can integrate Flowbite with many tools.</p>
|
|
142
|
+
</div>
|
|
143
|
+
<a href="/" class="inline-flex items-center px-3 py-2 mr-3 text-xs font-medium text-gray-900 bg-white border border-gray-200 rounded-lg focus:outline-none hover:bg-gray-100 hover:text-primary-700 focus:z-10 focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700">
|
|
144
|
+
<OpenBookSolid class="w-3 h-3 mr-2" />
|
|
145
|
+
Learn more
|
|
146
|
+
</a>
|
|
147
|
+
<a href="/" class="inline-flex px-3 py-2 mr-2 text-xs font-medium text-white bg-primary-700 rounded-lg hover:bg-primary-800 focus:ring-4 focus:ring-primary-300 dark:bg-primary-600 dark:hover:bg-primary-700 focus:outline-none dark:focus:ring-primary-800">
|
|
148
|
+
Get started <ArrowRightSolid class="w-3 h-3 ml-2" />
|
|
149
|
+
</a>
|
|
150
|
+
</Banner>
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Component data
|
|
154
|
+
|
|
155
|
+
The component has the following props, type, and default values. See [types page](/docs/pages/typescript) for type information.
|
|
156
|
+
|
|
157
|
+
### Banner styling
|
|
158
|
+
|
|
159
|
+
- Use the `classDiv` prop to overwrite `divClass`.
|
|
160
|
+
- Use the `classInner` prop to overwrite `innerClass`.
|
|
161
|
+
|
|
162
|
+
<CompoAttributesViewer {components}/>
|
|
163
|
+
|
|
164
|
+
## References
|
|
165
|
+
|
|
166
|
+
- [Flowbite Banner](https://flowbite.com/docs/components/banner/)
|