flowbite-svelte 0.44.8 → 0.44.10
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 +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -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 +225 -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 +19 -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,156 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: componentLayout
|
|
3
|
+
title: Svelte Tooltip - Flowbite
|
|
4
|
+
breadcrumb_title: Svelte Tooltip
|
|
5
|
+
component_title: Tooltip
|
|
6
|
+
dir: Components
|
|
7
|
+
description: Use the following Tailwind CSS powered tooltips to show extra content when hovering or focusing on an element
|
|
8
|
+
thumnailSize: w-24
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
import { TableProp, TableDefaultRow, CompoAttributesViewer } from '../../utils'
|
|
13
|
+
import { P, A } from '$lib'
|
|
14
|
+
|
|
15
|
+
const components = 'Tooltip, Frame'
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
Flowbite-Svelte allows you to show extra information when hovering or focusing over an element in multiple positions, styles, and animations.
|
|
19
|
+
|
|
20
|
+
## Setup
|
|
21
|
+
|
|
22
|
+
```svelte example hideOutput
|
|
23
|
+
<script>
|
|
24
|
+
import { Tooltip } from 'flowbite-svelte';
|
|
25
|
+
</script>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Default tooltip example
|
|
29
|
+
|
|
30
|
+
To get started with using tooltips all you need to do is set `triggeredBy` attribute of the tooltip component to any CSS query targeting trigger element(s). In the following example you can see the tooltip that will be trigger by the `tooltip-default` element to be shown when hovered or focused.
|
|
31
|
+
|
|
32
|
+
```svelte example class="flex items-end h-32"
|
|
33
|
+
<script>
|
|
34
|
+
import { Tooltip, Button } from 'flowbite-svelte';
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<Button>Default tooltip</Button>
|
|
38
|
+
<Tooltip>Tooltip content</Tooltip>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Tooltip types
|
|
42
|
+
|
|
43
|
+
You can use choose between dark and light version styles for the tooltip component by changing the utility classes from Tailwind CSS and by applying the `type={light|dark}` data attribute.
|
|
44
|
+
|
|
45
|
+
```svelte example class="flex items-end gap-2 h-32"
|
|
46
|
+
<script>
|
|
47
|
+
import { Tooltip, Button } from 'flowbite-svelte';
|
|
48
|
+
let type = 'dark';
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<Button id="type-light">Light tooltip</Button>
|
|
52
|
+
<Button id="type-auto">Default tooltip</Button>
|
|
53
|
+
<Button id="type-dark">Dark tooltip</Button>
|
|
54
|
+
<Tooltip {type} triggeredBy="[id^='type-']" on:show={(ev) => (type = ev.target.id.split('-')[1])}>Tooltip content</Tooltip>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Placement
|
|
58
|
+
|
|
59
|
+
The positioning of the tooltip element relative to the triggering element (eg. button, link) can be set using the `placement={top|right|bottom|left}` attribute.
|
|
60
|
+
|
|
61
|
+
**Note!** This examples shows you also how to share one tooltip between multiple triggering elements using advanced CSS query.
|
|
62
|
+
|
|
63
|
+
```svelte example class="flex items-center gap-2 h-36"
|
|
64
|
+
<script>
|
|
65
|
+
import { Tooltip, Button } from 'flowbite-svelte';
|
|
66
|
+
let placement = 'left';
|
|
67
|
+
</script>
|
|
68
|
+
|
|
69
|
+
<Button id="placement-left">Tooltip left</Button>
|
|
70
|
+
<Button id="placement-top">Tooltip top</Button>
|
|
71
|
+
<Button id="placement-bottom">Tooltip bottom</Button>
|
|
72
|
+
<Button id="placement-right">Tooltip right</Button>
|
|
73
|
+
<Tooltip triggeredBy="[id^='placement-']" {placement} on:show={(e) => ([, placement] = e.target.id.split('-'))}>
|
|
74
|
+
Tooltip content - {placement}
|
|
75
|
+
</Tooltip>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Triggering
|
|
79
|
+
|
|
80
|
+
```svelte example class="flex items-end gap-2 h-32"
|
|
81
|
+
<script>
|
|
82
|
+
import { Tooltip, Button } from 'flowbite-svelte';
|
|
83
|
+
</script>
|
|
84
|
+
|
|
85
|
+
<Button id="hover">Tooltip hover</Button>
|
|
86
|
+
<Button id="click">Tooltip click</Button>
|
|
87
|
+
<Tooltip triggeredBy="#hover">Hover tooltip content</Tooltip>
|
|
88
|
+
<Tooltip trigger="click" triggeredBy="#click">Click tooltip content</Tooltip>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Disable arrow
|
|
92
|
+
|
|
93
|
+
```svelte example class="flex items-end gap-2 h-32"
|
|
94
|
+
<script>
|
|
95
|
+
import { Tooltip, Button } from 'flowbite-svelte';
|
|
96
|
+
</script>
|
|
97
|
+
|
|
98
|
+
<Button id="disable-arrow">Default tooltip</Button>
|
|
99
|
+
<Tooltip arrow={false} triggeredBy="#disable-arrow">Tooltip content</Tooltip>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## External reference
|
|
103
|
+
|
|
104
|
+
If you need the tooltip to be attached to the other element then the tiggering one you can pass a CSS query to `reference` prop.
|
|
105
|
+
|
|
106
|
+
```svelte example class="flex gap-4 flex-col justify-center items-center h-72"
|
|
107
|
+
<script>
|
|
108
|
+
import { Tooltip, Button } from 'flowbite-svelte';
|
|
109
|
+
let placement = '';
|
|
110
|
+
</script>
|
|
111
|
+
|
|
112
|
+
<div id="ext-ref" class="p-2 rounded-lg border border-gray-200 dark:border-gray-600">External reference</div>
|
|
113
|
+
<div class="space-x-4">
|
|
114
|
+
<Button id="ref-left" on:mouseenter={() => (placement = 'left')}>Left</Button>
|
|
115
|
+
<Button id="ref-top" on:mouseenter={() => (placement = 'top')}>Top</Button>
|
|
116
|
+
<Button id="ref-right" on:mouseenter={() => (placement = 'right')}>Right</Button>
|
|
117
|
+
</div>
|
|
118
|
+
<Tooltip reference="#ext-ref" triggeredBy="[id^='ref-']" {placement} class="w-64 text-sm font-light">And here's some amazing content. It's very engaging. Right?</Tooltip>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Custom type
|
|
122
|
+
|
|
123
|
+
Various color palettes can be set for a tooltip by using the `color` property from the underlying `Frame` component. (Setting `color` prop sets the `type` to `custom` implicitly.)
|
|
124
|
+
|
|
125
|
+
When you want to add a fully custom styles, use `type="custom"`, `defaultClass`, and `class` to modify the tooltip styling.
|
|
126
|
+
|
|
127
|
+
```svelte example class="flex items-center h-64 gap-2"
|
|
128
|
+
<script>
|
|
129
|
+
import { Tooltip, Button } from 'flowbite-svelte';
|
|
130
|
+
</script>
|
|
131
|
+
|
|
132
|
+
<Button>Green tooltip</Button>
|
|
133
|
+
<Tooltip color="green">Tooltip content</Tooltip>
|
|
134
|
+
|
|
135
|
+
<Button>Yellow tooltip</Button>
|
|
136
|
+
<Tooltip color="yellow">Tooltip content</Tooltip>
|
|
137
|
+
|
|
138
|
+
<Button>Custom type</Button>
|
|
139
|
+
<Tooltip placement="right" type="custom" defaultClass="" class="p-4 text-lg font-medium bg-purple-500 text-gray-100" arrow={false}>Tooltip content</Tooltip>
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Component data
|
|
143
|
+
|
|
144
|
+
### Tooltip
|
|
145
|
+
|
|
146
|
+
The component has the following props, type, and default values. See [types page](/docs/pages/typescript) for type information.
|
|
147
|
+
|
|
148
|
+
### Frame styling
|
|
149
|
+
|
|
150
|
+
- Use the `class` prop to overwrite the default class.
|
|
151
|
+
|
|
152
|
+
<CompoAttributesViewer {components}/>
|
|
153
|
+
|
|
154
|
+
## References
|
|
155
|
+
|
|
156
|
+
- [Flowbite Tooltip](https://flowbite.com/docs/components/tooltips/)
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: componentLayout
|
|
3
|
+
title: Svelte Typography - Flowbite
|
|
4
|
+
breadcrumb_title: Svelte Typography
|
|
5
|
+
component_title: Typography
|
|
6
|
+
dir: Components
|
|
7
|
+
description: Use the typography and the utility classes from Tailwind CSS to style text with Flowbite
|
|
8
|
+
thumnailSize: w-36
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
import { TableProp, TableDefaultRow, CompoAttributesViewer } from '../../utils'
|
|
13
|
+
import { A } from '$lib';
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
The typography for FlowBite is completely based on the utility classes from Tailwind CSS.
|
|
17
|
+
|
|
18
|
+
We have listed some of the commonly used typography classes that we use throughout the FlowBite UI, however, you can also check out all of the utility classes on the <a class="link" href="https://tailwindcss.com/docs/font-family">Tailwind CSS documentation</a> directly.
|
|
19
|
+
|
|
20
|
+
## Font Size
|
|
21
|
+
|
|
22
|
+
Use the following text-size utility classes from Tailwind to set the font size for any text element.
|
|
23
|
+
|
|
24
|
+
```svelte example
|
|
25
|
+
<p class="text-xs dark:text-white">Flowbite</p>
|
|
26
|
+
|
|
27
|
+
<p class="text-sm dark:text-white">FlowBite</p>
|
|
28
|
+
|
|
29
|
+
<p class="text-base dark:text-white">FlowBite</p>
|
|
30
|
+
|
|
31
|
+
<p class="text-lg dark:text-white">FlowBite</p>
|
|
32
|
+
|
|
33
|
+
<p class="text-xl dark:text-white">FlowBite</p>
|
|
34
|
+
|
|
35
|
+
<p class="text-2xl dark:text-white">FlowBite</p>
|
|
36
|
+
|
|
37
|
+
<p class="text-3xl dark:text-white">FlowBite</p>
|
|
38
|
+
|
|
39
|
+
<p class="text-4xl dark:text-white">FlowBite</p>
|
|
40
|
+
|
|
41
|
+
<p class="text-5xl dark:text-white">FlowBite</p>
|
|
42
|
+
|
|
43
|
+
<p class="text-6xl dark:text-white">FlowBite</p>
|
|
44
|
+
|
|
45
|
+
<p class="text-7xl dark:text-white">FlowBite</p>
|
|
46
|
+
|
|
47
|
+
<p class="text-8xl dark:text-white">FlowBite</p>
|
|
48
|
+
|
|
49
|
+
<p class="text-9xl dark:text-white">FlowBite</p>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Font Weight
|
|
53
|
+
|
|
54
|
+
Use the following font-weight utility classes to set the font weight for any text element.
|
|
55
|
+
|
|
56
|
+
```svelte example
|
|
57
|
+
<p class="font-thin dark:text-white">FlowBite</p>
|
|
58
|
+
|
|
59
|
+
<p class="font-extralight dark:text-white">FlowBite</p>
|
|
60
|
+
|
|
61
|
+
<p class="font-light dark:text-white">FlowBite</p>
|
|
62
|
+
|
|
63
|
+
<p class="font-normal dark:text-white">FlowBite</p>
|
|
64
|
+
|
|
65
|
+
<p class="font-medium dark:text-white">FlowBite</p>
|
|
66
|
+
|
|
67
|
+
<p class="font-semibold dark:text-white">FlowBite</p>
|
|
68
|
+
|
|
69
|
+
<p class="font-bold dark:text-white">FlowBite</p>
|
|
70
|
+
|
|
71
|
+
<p class="font-extrabold dark:text-white">FlowBite</p>
|
|
72
|
+
|
|
73
|
+
<p class="font-black dark:text-white">FlowBite</p>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Line Height
|
|
77
|
+
|
|
78
|
+
Use the following leading-type utility classes to set the line height for any text element.
|
|
79
|
+
|
|
80
|
+
```svelte example
|
|
81
|
+
<p class="leading-none dark:text-gray-400">Themesberg was created to bring quality ...</p>
|
|
82
|
+
|
|
83
|
+
<p class="leading-tight dark:text-gray-400">Themesberg was created to bring quality ...</p>
|
|
84
|
+
|
|
85
|
+
<p class="leading-snug dark:text-gray-400">Themesberg was created to bring quality ...</p>
|
|
86
|
+
|
|
87
|
+
<p class="leading-normal dark:text-gray-400">Themesberg was created to bring quality ...</p>
|
|
88
|
+
|
|
89
|
+
<p class="leading-relaxed dark:text-gray-400">Themesberg was created to bring quality ...</p>
|
|
90
|
+
|
|
91
|
+
<p class="leading-loose dark:text-gray-400">Themesberg was created to bring quality ...</p>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Lists
|
|
95
|
+
|
|
96
|
+
Use the following code to create list items with ordered and unordered lists.
|
|
97
|
+
|
|
98
|
+
```svelte example
|
|
99
|
+
<script>
|
|
100
|
+
import { List, Li, Heading } from 'flowbite-svelte';
|
|
101
|
+
</script>
|
|
102
|
+
|
|
103
|
+
<Heading tag="h5">List disc</Heading>
|
|
104
|
+
<List list="disc">
|
|
105
|
+
<Li>Design</Li>
|
|
106
|
+
<Li>Develop</Li>
|
|
107
|
+
<Li>Test</Li>
|
|
108
|
+
</List>
|
|
109
|
+
<Heading tag="h5">List decimal</Heading>
|
|
110
|
+
<List list="decimal">
|
|
111
|
+
<Li>Design</Li>
|
|
112
|
+
<Li>Develop</Li>
|
|
113
|
+
<Li>Test</Li>
|
|
114
|
+
</List>
|
|
115
|
+
<Heading tag="h5">List none</Heading>
|
|
116
|
+
<List list="none">
|
|
117
|
+
<Li>Design</Li>
|
|
118
|
+
<Li>Develop</Li>
|
|
119
|
+
<Li>Test</Li>
|
|
120
|
+
</List>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## List position
|
|
124
|
+
|
|
125
|
+
Use the list-inside and list-outside classes to set the list item position inside a list component.
|
|
126
|
+
|
|
127
|
+
```svelte example
|
|
128
|
+
<script>
|
|
129
|
+
import { List, Li, Heading } from 'flowbite-svelte';
|
|
130
|
+
</script>
|
|
131
|
+
|
|
132
|
+
<Heading tag="h5">List inside</Heading>
|
|
133
|
+
<List position="inside">
|
|
134
|
+
<Li>Design</Li>
|
|
135
|
+
<Li>Develop</Li>
|
|
136
|
+
<Li>Test</Li>
|
|
137
|
+
</List>
|
|
138
|
+
<Heading tag="h5">List outside</Heading>
|
|
139
|
+
<List position="outside">
|
|
140
|
+
<Li>Design</Li>
|
|
141
|
+
<Li>Develop</Li>
|
|
142
|
+
<Li>Test</Li>
|
|
143
|
+
</List>
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## Text Decoration
|
|
147
|
+
|
|
148
|
+
You can use the following classes to set the text decoration for any inline text element.
|
|
149
|
+
|
|
150
|
+
```svelte example
|
|
151
|
+
<p class="underline dark:text-gray-400">please read our terms and services</p>
|
|
152
|
+
|
|
153
|
+
<p class="line-through dark:text-gray-400">please read our terms and services</p>
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## References
|
|
157
|
+
|
|
158
|
+
- [Flowbite Typography](https://flowbite.com/docs/components/typography/)
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: componentLayout
|
|
3
|
+
title: Svelte Video - Flowbite
|
|
4
|
+
breadcrumb_title: Svelte Video
|
|
5
|
+
component_title: Video
|
|
6
|
+
dir: Components
|
|
7
|
+
description: Use the video component to configure an embedded video player using native HTML 5 functionality 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 { Heading, P, A } from '$lib'
|
|
14
|
+
const components = 'Video'
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
## Setup
|
|
18
|
+
|
|
19
|
+
```svelte example hideOutput
|
|
20
|
+
<script>
|
|
21
|
+
import { Video } from 'flowbite-svelte';
|
|
22
|
+
</script>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Video player
|
|
26
|
+
|
|
27
|
+
Use this example to create a native browser video player and apply the w-full utility class from Tailwind CSS to span the full width of the parent container.
|
|
28
|
+
|
|
29
|
+
```svelte example hideScript
|
|
30
|
+
<script>
|
|
31
|
+
import { Video } from 'flowbite-svelte';
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<Video src="/videos/flowbite.mp4" controls trackSrc="flowbite.mp4" />
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Autoplay
|
|
38
|
+
|
|
39
|
+
Use the autoplay attribute on the video component to automatically start the video when the page has been loaded.
|
|
40
|
+
|
|
41
|
+
```svelte example hideScript
|
|
42
|
+
<script>
|
|
43
|
+
import { Video } from 'flowbite-svelte';
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<Video src="/videos/flowbite.mp4" autoplay controls trackSrc="flowbite.mp4" />
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Muted
|
|
50
|
+
|
|
51
|
+
Use the muted attribute together with the autoplay option to start the video while the sound is muted.
|
|
52
|
+
|
|
53
|
+
```svelte example hideScript
|
|
54
|
+
<script>
|
|
55
|
+
import { Video } from 'flowbite-svelte';
|
|
56
|
+
</script>
|
|
57
|
+
|
|
58
|
+
<Video src="/videos/flowbite.mp4" autoplay muted controls trackSrc="flowbite.mp4" />
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Sizes
|
|
62
|
+
|
|
63
|
+
Set the width and height of the video component using the `w-{size}` and `h-{size}` classes.
|
|
64
|
+
|
|
65
|
+
### Width
|
|
66
|
+
|
|
67
|
+
Use the `w-{size}` class to set the height of the video player.
|
|
68
|
+
|
|
69
|
+
```svelte example hideScript
|
|
70
|
+
<script>
|
|
71
|
+
import { Video } from 'flowbite-svelte';
|
|
72
|
+
</script>
|
|
73
|
+
|
|
74
|
+
<Video src="/videos/flowbite.mp4" controls class="w-96" trackSrc="flowbite.mp4" />
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Height
|
|
78
|
+
|
|
79
|
+
Use the `h-{size}` class to set the height of the video player.
|
|
80
|
+
|
|
81
|
+
```svelte example hideScript
|
|
82
|
+
<script>
|
|
83
|
+
import { Video } from 'flowbite-svelte';
|
|
84
|
+
</script>
|
|
85
|
+
|
|
86
|
+
<Video src="/videos/flowbite.mp4" controls class="h-80" trackSrc="flowbite.mp4" />
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Responsive
|
|
90
|
+
|
|
91
|
+
Use the following example to make the video responsive across all devices and viewports.
|
|
92
|
+
|
|
93
|
+
```svelte example hideScript
|
|
94
|
+
<script>
|
|
95
|
+
import { Video } from 'flowbite-svelte';
|
|
96
|
+
</script>
|
|
97
|
+
|
|
98
|
+
<Video src="/videos/flowbite.mp4" controls class="w-full max-w-full h-auto" trackSrc="flowbite.mp4" />
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Custom styles
|
|
102
|
+
|
|
103
|
+
Customize the video player appearance using the utility classes from Tailwind CSS such as `rounded-{size}` or border to set rounded corners and border.
|
|
104
|
+
|
|
105
|
+
```svelte example hideScript
|
|
106
|
+
<script>
|
|
107
|
+
import { Video } from 'flowbite-svelte';
|
|
108
|
+
</script>
|
|
109
|
+
|
|
110
|
+
<Video src="/videos/flowbite.mp4" controls class="w-full max-w-full h-auto rounded-lg border border-gray-200 dark:border-gray-700" trackSrc="flowbite.mp4" />
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Component data
|
|
114
|
+
|
|
115
|
+
The component has the following props, type, and default values. See [types page](/docs/pages/typescript) for type information.
|
|
116
|
+
|
|
117
|
+
### Video styling
|
|
118
|
+
|
|
119
|
+
- Use the `class` prop to overwrite the `video` tag class.
|
|
120
|
+
|
|
121
|
+
<CompoAttributesViewer {components}/>
|
|
122
|
+
|
|
123
|
+
## References
|
|
124
|
+
|
|
125
|
+
- [Flowbite Video](https://flowbite.com/docs/components/video/)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// src/routes/components/[slug]/+page.js
|
|
2
|
+
/** @type {import('./$types').PageLoad} */
|
|
3
|
+
export async function load({ params }) {
|
|
4
|
+
const post = await import(`../${params.slug}.md`);
|
|
5
|
+
const { title, dir } = post.metadata;
|
|
6
|
+
const content = post.default;
|
|
7
|
+
|
|
8
|
+
return {
|
|
9
|
+
content,
|
|
10
|
+
title,
|
|
11
|
+
dir
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: componentLayout
|
|
3
|
+
title: Responsive Sidebar Layout
|
|
4
|
+
dir: Examples
|
|
5
|
+
description: Flowbite Svelte Responsive sidebar layout
|
|
6
|
+
breadcrumb_title: Svelte Sidebar Layout
|
|
7
|
+
component_title: Sidebar Layout
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
|
|
12
|
+
import { Img, A, List, Li } from '$lib';
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<List tag="ul" class="space-y-1 my-4">
|
|
16
|
+
<Li><A href="https://github.com/shinokada/flowbite-sveltekit-responsive-sidebar-layout">GitHub Repo</A></Li>
|
|
17
|
+
<Li><A href="https://sveltekit-sidebar-layout.vercel.app/">Demo</A></Li>
|
|
18
|
+
</List>
|
|
19
|
+
|
|
20
|
+
<Img src="/images/sveltekit-sidebar-layout-optimized.png" alt="sveltekit sidebar layout" />
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: componentLayout
|
|
3
|
+
title: Svelte Snapshot - Flowbite
|
|
4
|
+
breadcrumb_title: Svelte Snapshot
|
|
5
|
+
component_title: Snapshot
|
|
6
|
+
dir: Examples
|
|
7
|
+
description: Svelte Snapshot with Flowbite Svete
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
|
|
12
|
+
import { Input, Label, A } from '$lib';
|
|
13
|
+
|
|
14
|
+
let formData = {
|
|
15
|
+
first_name: '',
|
|
16
|
+
last_name: '',
|
|
17
|
+
company: '',
|
|
18
|
+
website: '',
|
|
19
|
+
email: ''
|
|
20
|
+
};
|
|
21
|
+
export const snapshot = {
|
|
22
|
+
capture: () => formData,
|
|
23
|
+
restore: (value) => (formData = value)
|
|
24
|
+
};
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
Imagine a scenario where a user has filled out a form, but before submitting it, clicks on a link and then hits the back button on their browser. In such cases, the values they entered in the form will vanish into thin air. However, if it's important to retain this input, you can create a snapshot of the DOM state, which can be reinstated when the user returns to the previous page.
|
|
28
|
+
|
|
29
|
+
You can achieve this by using <A href="https://kit.svelte.dev/docs/snapshots">SvelteKit snapshots</A>, which enable you to preserve the state of the form input even if the user navigates away from the page and then returns or refreshes the page.
|
|
30
|
+
|
|
31
|
+
<form class="p-16">
|
|
32
|
+
<div class="grid gap-6 mb-6 md:grid-cols-2">
|
|
33
|
+
<div>
|
|
34
|
+
<Label for="first_name" class="mb-2">First name</Label>
|
|
35
|
+
<Input type="text" id="first_name" placeholder="John" required bind:value={formData.first_name} />
|
|
36
|
+
</div>
|
|
37
|
+
<div>
|
|
38
|
+
<Label for="last_name" class="mb-2">Last name</Label>
|
|
39
|
+
<Input type="text" id="last_name" placeholder="Doe" required bind:value={formData.last_name} />
|
|
40
|
+
</div>
|
|
41
|
+
<div>
|
|
42
|
+
<Label for="company" class="mb-2">Company</Label>
|
|
43
|
+
<Input type="text" id="company" placeholder="Flowbite" required bind:value={formData.company} />
|
|
44
|
+
</div>
|
|
45
|
+
<div>
|
|
46
|
+
<Label for="website" class="mb-2">Website URL</Label>
|
|
47
|
+
<Input type="url" id="website" placeholder="flowbite.com" bind:value={formData.website} />
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
<div class="mb-6">
|
|
51
|
+
<Label for="email" class="mb-2">Email address</Label>
|
|
52
|
+
<Input
|
|
53
|
+
type="email"
|
|
54
|
+
id="email"
|
|
55
|
+
placeholder="john.doe@company.com"
|
|
56
|
+
required
|
|
57
|
+
bind:value={formData.email} />
|
|
58
|
+
</div>
|
|
59
|
+
</form>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Input, Label, Button, Checkbox, A } from '$lib';
|
|
3
|
+
let formData = {
|
|
4
|
+
first_name: '',
|
|
5
|
+
last_name: '',
|
|
6
|
+
company: '',
|
|
7
|
+
website: '',
|
|
8
|
+
email: ''
|
|
9
|
+
};
|
|
10
|
+
export const snapshot = {
|
|
11
|
+
capture: () => formData,
|
|
12
|
+
restore: (value: typeof formData) => (formData = value)
|
|
13
|
+
};
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<form class="p-16">
|
|
17
|
+
<div class="grid gap-6 mb-6 md:grid-cols-2">
|
|
18
|
+
<div>
|
|
19
|
+
<Label for="first_name" class="mb-2">First name</Label>
|
|
20
|
+
<Input type="text" id="first_name" placeholder="John" required bind:value={formData.first_name} />
|
|
21
|
+
</div>
|
|
22
|
+
<div>
|
|
23
|
+
<Label for="last_name" class="mb-2">Last name</Label>
|
|
24
|
+
<Input type="text" id="last_name" placeholder="Doe" required bind:value={formData.last_name} />
|
|
25
|
+
</div>
|
|
26
|
+
<div>
|
|
27
|
+
<Label for="company" class="mb-2">Company</Label>
|
|
28
|
+
<Input type="text" id="company" placeholder="Flowbite" required bind:value={formData.company} />
|
|
29
|
+
</div>
|
|
30
|
+
<div>
|
|
31
|
+
<Label for="website" class="mb-2">Website URL</Label>
|
|
32
|
+
<Input type="url" id="website" placeholder="flowbite.com" bind:value={formData.website} />
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="mb-6">
|
|
36
|
+
<Label for="email" class="mb-2">Email address</Label>
|
|
37
|
+
<Input type="email" id="email" placeholder="john.doe@company.com" required bind:value={formData.email} />
|
|
38
|
+
</div>
|
|
39
|
+
<div class="mb-6">
|
|
40
|
+
<Label for="password" class="mb-2">Password</Label>
|
|
41
|
+
<Input type="password" id="password" placeholder="•••••••••" />
|
|
42
|
+
</div>
|
|
43
|
+
<div class="mb-6">
|
|
44
|
+
<Label for="confirm_password" class="mb-2">Confirm password</Label>
|
|
45
|
+
<Input type="password" id="confirm_password" placeholder="•••••••••" />
|
|
46
|
+
</div>
|
|
47
|
+
<Checkbox class="mb-6 space-x-1" required>I agree with the <A href="/">terms and conditions</A>.</Checkbox>
|
|
48
|
+
<Button type="submit">Submit</Button>
|
|
49
|
+
</form>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// src/routes/experimental/[slug]/+page.js
|
|
2
|
+
/** @type {import('./$types').PageLoad} */
|
|
3
|
+
export async function load({ params }) {
|
|
4
|
+
const post = await import(`../${params.slug}.md`);
|
|
5
|
+
const { title, dir } = post.metadata;
|
|
6
|
+
const content = post.default;
|
|
7
|
+
|
|
8
|
+
return {
|
|
9
|
+
content,
|
|
10
|
+
title,
|
|
11
|
+
dir
|
|
12
|
+
};
|
|
13
|
+
}
|