# Flowbite Svelte Documentation - Full Context # Generated on 2025-09-03T12:48:59.651Z # This file contains all documentation concatenated in logical order # ===== PAGES ===== # AI and LLM Integration with Flowbite Svelte Flowbite Svelte provides powerful, built-in support for AI and Large Language Model (LLM) integration through specialized routes that expose documentation in machine-readable formats. These features enable seamless integration with ChatGPT, Claude, and other AI assistants. ## Compliance Flowbite Svelte follows the [llms.txt standard](https://llmstxt.org/), a community-driven proposal initiated by Jeremy Howard that standardizes how websites provide LLM-friendly information. Our implementation helps address the fundamental challenge that language models face: context windows are too small to process entire websites, and HTML content with navigation, ads, and JavaScript is difficult to convert to LLM-friendly formats. By adopting this standard, Flowbite Svelte ensures that AI assistants can efficiently access our documentation without struggling with complex HTML or excessive content. ## Machine-Readable Routes ### llms.txt The `llms.txt` file is a **manifest** that tells large language models (LLMs) where to find your AI-friendly Markdown documentation. It works like a `robots.txt` or `sitemap.xml`, but is specifically designed for LLMs to efficiently discover and consume your docs. You can access it at [https://flowbite-svelte.com/llms.txt](https://flowbite-svelte.com/llms.txt). ### context-full.txt The `context-full.txt` file is a **complete bundle** of all your documentation, combined into one large text file. It includes full explanations, code examples, and details, making it ideal for LLMs with large context windows. You can access the full text at [https://flowbite-svelte.com/llm/context-full.txt](https://flowbite-svelte.com/llm/context-full.txt). ### Markdown API Access All documentation pages can be accessed in pure markdown format by simply replacing `docs` with `llm` and appending `.md` to their URLs. For example: - [https://flowbite-svelte.com/llm/pages/introduction.md](https://flowbite-svelte.com/llm/pages/introduction.md) - [https://flowbite-svelte.com/llm/components/buttons.md](https://flowbite-svelte.com/llm/components/buttons.md) - [https://flowbite-svelte.com/llm/extend/progressradial.md](https://flowbite-svelte.com/llm/extend/progressradial.md) ## Implementation Examples Here's how you might leverage these features in your AI integration: ```ts // Accessing component documentation in markdown format const buttonDocs = await fetch("https://flowbite-svelte.com/docs/components/buttons.md").then((res) => res.text()); // Using markdown documentation in a ChatGPT prompt const chatGptPrompt = `Based on this Flowbite Svelte Button component documentation: ${buttonDocs} Generate a code example for a primary button with a link to '/about'.`; ``` These features make it easy to integrate Flowbite Svelte's documentation with modern AI systems, creating powerful, intelligent tools to enhance developer experience and productivity. ## LLM Link --- # Colors - Flowbite Svelte ## Primary and secondary colors In the provided code, you can customize the primary and secondary color by modifying the appropriate color values. ```css @import "tailwindcss"; @plugin 'flowbite/plugin'; @custom-variant dark (&:where(.dark, .dark *)); @theme { --color-primary-50: #fff5f2; --color-primary-100: #fff1ee; --color-primary-200: #ffe4de; --color-primary-300: #ffd5cc; --color-primary-400: #ffbcad; --color-primary-500: #fe795d; --color-primary-600: #ef562f; --color-primary-700: #eb4f27; --color-primary-800: #cc4522; --color-primary-900: #a5371b; --color-secondary-50: #f0f9ff; --color-secondary-100: #e0f2fe; --color-secondary-200: #bae6fd; --color-secondary-300: #7dd3fc; --color-secondary-400: #38bdf8; --color-secondary-500: #0ea5e9; --color-secondary-600: #0284c7; --color-secondary-700: #0369a1; --color-secondary-800: #075985; --color-secondary-900: #0c4a6e; } @source "../node_modules/flowbite-svelte/dist"; @source "../node_modules/flowbite-svelte-icons/dist"; ``` ## Examples ```svelte Secondary
Noteworthy technology acquisitions 2021

Here are the biggest enterprise technology acquisitions of 2021 so far, in reverse chronological order.

Flowbite Logo Flowbite Home About Services Pricing Contact {#snippet icon()} {/snippet} Dismissable user notification. ``` ## LLM Link --- # Compiler Speed - Flowbite Svelte If your Svelte app only requires a few components, it's recommended that you import them directly. Doing so can help optimize compilation speed and improve performance by reducing the amount of code that needs to be processed during compilation. ```js import Alert from "flowbite-svelte/Alert.svelte"; ``` ## Speed comparisons Files Time Avg 1 3.3ms 3.3ms 2 9.0ms 4.5ms 7 20.7ms 3.0ms 7 60.6ms 8.7ms
The above table shows examples from using `import Alert from 'flowbite-svelte/Alert.svelte'`. Compare these numbers to the following table where using normal import. Files Time Avg 151 1.10s 7.3ms 154 0.40s 2.6ms 151 1.04s 6.9ms 154 1.32s 8.8ms
## LLM Link --- # Customization - Flowbite Svelte When working with components, you may want to customize their default or specific classes. Here's a guide on how to achieve that. Starting from version 0.38.0, we have transitioned from using classnames to tailwind-merge, which allows us to easily overwrite classes and avoid style conflicts. This update brings enhanced flexibility and simplifies the process of customizing component styles. ## Understanding Props Each component has a props section where you can find information on how to customize classes. For example, let's refer to the [Alert component data section](https://next.flowbite-svelte.com/docs/components/alert#component-data). In this case, you can overwrite the outer div class by adding the `class` prop. Here's an example: ```svelte Add a class to overwrite the default class! ``` Thanks to tailwind-merge, you can efficiently merge Tailwind CSS classes without style conflicts. One of its features is that the last conflicting class wins. Please read more details about [Merging behavior](https://github.com/dcastil/tailwind-merge/blob/v1.13.1/docs/features.md) ## Importance of ! for Some Components In Tailwind CSS, you can make any utility class important by adding a `!` character at the beginning of the class name. Certain components may require this approach to successfully overwrite styles. Here's an example: ```svelte ``` ## Overwriting Specific Classes While the `class` prop can be used for most components, some components with a complex structure may require multiple props. For instance, let's consider [the Banner component](https://next.flowbite-svelte.com/docs/components/banner#component-data) has two relevant props: `class` for `div` and `classInner` for `innerClass`. To overwrite the `div`, you can use the `classDiv` prop: ```svelte

Overwriting divClass and innerClass

``` You can observe the background color change to green. ### New way of customization Instead of intrducing multiple props for component's internal element classes new prop `classes` has been introduced: an object of internal element names and desired new classes. The above example will therefore change to: ```svelte

Overwriting divClass and innerClass

``` The `classes` prop becomes the default way of customization and the multiple props mentioned above are marked as deprecated. We hope these instructions help you confidently customize component classes. Feel free to reach out if you have any further questions! ## Global customization To customize the flowbite-svelte component globally, follow these steps: Start by creating your own component based on flowbite-svelte. Create a new file for your button component in the lib directory: ```svelte ``` Once you have created your button component, you can use it in your project. In your project, import your custom button component: ```js ``` Use the custom button component in your project by adding the following code: ```html My New Button ``` With these steps, you can customize and use your own button component globally based on flowbite-svelte. Feel free to modify the styles and properties of the component according to your requirements. ## LLM Link --- # FAQ and Tips - Flowbite Svelte ## Svelte key blocks Svelte key blocks destroy and recreate their contents when the value of an expression changes. This can be useful when you are using SvelteKit (group) routing. For example, if you have a following group routing: ``` ├── (app) │ ├── +layout.svelte │ ├── +page.svelte │ ├── about │ │ └── +page.svelte │ ├── contact │ │ └── +page.svelte │ ├── orders │ │ └── +page.svelte │ └── profile │ └── +page.svelte └── +layout.svelte ``` The following example shows how to add navigation using the key blocks: ```svelte // src/routes/(app)/+layout.svelte {#key activeUrl} Home About Contact Orders Profile {/key} {@render children()} ``` ## My compiled CSS size is more than 120K. How can I make it smaller? First build the current setting and check the CSS size. ```sh pnpm build ``` Then run the following command to see your compiled CSS sizes. ```sh find .svelte-kit/output/client/_app/immutable -type f -name "*.css" -exec du -h {} + ``` To purge the CSS files, you can use `vite-plugin-tailwind-purgecss`. ### Installation ```sh pnpm i -D vite-plugin-tailwind-purgecss ``` ### vite.config.ts ```js import { sveltekit } from "@sveltejs/kit/vite"; import { defineConfig } from "vitest/config"; import { purgeCss } from "vite-plugin-tailwind-purgecss"; export default defineConfig({ plugins: [sveltekit(), purgeCss()], test: { include: ["src/**/*.{test,spec}.{js,ts}"] } }); ``` Run `pnpm build` and run the same command to see the compiled CSS size. ```sh find .svelte-kit/output/client/_app/immutable -type f -name "*.css" -exec du -h {} + ``` ## LLM Link --- # How to Contribute - Flowbite Svelte Here are some guidelines we'd like you to follow before submitting a PR. ## Create a fork - Create a fork from [flowbite-svelte](https://github.com/themesberg/flowbite-svelte) to your repository first. - Change `.env.example` file name to `.env`. - Run `pnpm build and pnpm check`. ## Please use pnpm to install The repo uses `pnpm`, so using `pnpm` is desirable when you fork and install dependencies to avoid unseen problems. When there is a change in `package.json`, remove `pnpm-lock.yml` and `node_modules` directory and run `pnpm i`. ## Tailwind CSS [Tailwind warns](https://tailwindcss.com/docs/content-configuration#dynamic-class-names) that you don't construct class names dynamically. Instead of this: ```html
``` Always use complete class names: ```html
``` ## Types and Props Please run the following to update prop files. ```sh pnpm svelte-helpers ``` This command is to generate component documentation for all Svelte files within the src/lib directory and generate JSON files containing props information from all Svelte files in the src/lib directory, placing them in the routes/component-data directory. ## Format and check Please run the following to format the code. ```sh pnpm format && pnpm check ``` ## Conventional commit When making a commit, we recommend using [the Conventional commits](https://www.conventionalcommits.org/en/v1.0.0/). Some examples are: ```sh feat: add rating component fix: add if statement to Button component chore: clean up About page docs: add timeline page style: update home page test: add modal test ``` Use `!` for a minor bump. ```sh feat!: add drawer component and page ``` When you have a breaking change: ```sh git commit -a "feat: change btnClass name to bClass" -m "BREAKING CHANGE: change the Button component attributes" ``` ## Playwright Test Before submitting a PR, please run a test: ```sh pnpm test:e2e ``` If you want to run an single test file, `tests/typography.spec.ts`: ```sh npx playwright test tests/typography.spec.ts ``` ## A11y Test We recommend to test a page with [Nu Html Checker](https://validator.unl.edu/) relating to your change. Test a page. ```sh axe http://localhost:3000/dropdowns/image ``` ## LLM Link --- # IDE Support - Flowbite Svelte ## IDE support If you are using an LSP-compatible editor, such as VSCode, Atom, Sublime Text, or Neovim, hovering over a component name will display a documentation link, type link, and props information. component document demo ## LLM Link --- # Flowbite Svelte - UI Component Library [Flowbite Svelte](https://github.com/themesberg/flowbite-svelte) is a free and open-source UI component library based on the core Flowbite components and built with native Svelte components and interactivity handling. This library features hundreds of interactive elements such as navbars, dropdowns, modals, and sidebars all handled by Svelte and based on the utility classes from Tailwind CSS. ## Getting started Learn how to get started with Flowbite Svelte by following the quickstart guide and start leveraging the interactive Svelte components coupled with Flowbite and Tailwind CSS. ### Using SvelteKit You can install SvelteKit or Svelte to start your app. For SvelteKit: ```bash example // install tailwindcss as well npx sv create my-app cd my-app pnpm install ``` ### Using Svelte If you want to get started with Svelte: ```bash npm create vite@latest myapp -- --template svelte cd myapp pnpm install ``` #### Install Tailwind CSS If your svelte project doesn't have `tailwindcss` installed, install it using NPM: ```bash npx sv add tailwindcss pnpm install ``` Run a local development server by running: ```bash pnpm dev ``` ### Install Flowbite Svelte Run the following command to install all Flowbite dependencies and libraries: ```sh pnpm i -D flowbite-svelte flowbite ``` ### Optional Install `flowbite-svelte-icons` for the examples to work properly: ```sh pnpm i -D flowbite-svelte-icons ``` ### Configuration Update your main `css` file to support Tailwindcss and Flowbite plugin. You can as well customize the primary color by modifying the appropriate color values. If you use SvelteKit the main css file is `src/app.css`. ```css @import "tailwindcss"; @plugin 'flowbite/plugin'; @custom-variant dark (&:where(.dark, .dark *)); @theme { --color-primary-50: #fff5f2; --color-primary-100: #fff1ee; --color-primary-200: #ffe4de; --color-primary-300: #ffd5cc; --color-primary-400: #ffbcad; --color-primary-500: #fe795d; --color-primary-600: #ef562f; --color-primary-700: #eb4f27; --color-primary-800: #cc4522; --color-primary-900: #a5371b; --color-secondary-50: #f0f9ff; --color-secondary-100: #e0f2fe; --color-secondary-200: #bae6fd; --color-secondary-300: #7dd3fc; --color-secondary-400: #38bdf8; --color-secondary-500: #0ea5e9; --color-secondary-600: #0284c7; --color-secondary-700: #0369a1; --color-secondary-800: #075985; --color-secondary-900: #0c4a6e; } @source "../node_modules/flowbite-svelte/dist"; @source "../node_modules/flowbite-svelte-icons/dist"; @layer base { /* disable chrome cancel button */ input[type="search"]::-webkit-search-cancel-button { display: none; } } ``` Now you should be able to work with the Flowbite Svelte library and import components such as the navbar, dropdown, modal, and more. ## Svelte Svelte is a modern and growing front-end compiler. Developers build boilerplate-free components using languages HTML, CSS and JavaScript. Svelte compiles your code to tiny, framework-less vanilla JS. ## Tailwind CSS Flowbite Svelte leverages the utility classes from the popular [Tailwind CSS](https://tailwindcss.com) framework allowing greater customization capabilities directly from a component level in Svelte. ## Flowbite Ecosystem [Flowbite](https://flowbite.com) is also available in other frameworks such as vanilla JS with HTML, React, Vue, Angular, and even integration possibilities with back-end frameworks such as Laravel, Django, Flask, and Phoenix. Check out the main [GitHub repository](https://github.com/themesberg/flowbite) to explore other libraries too as well as the [Figma design system](https://flowbite.com/figma/). ## UI Components Flowbite Svelte has a rich collection of commonly used components coded with Svelte that leverage the utility classes from Tailwind CSS and you can check out the full list of components by navigating through the components section in the sidebar on the left side of the page. ## Contributing Flowbite Svelte is a free and open-source UI component library built with Svelte native components and based on the Flowbite ecosystem and contributions are more than welcome. Check out [contributing guide](/docs/pages/how-to-contribute) to learn how you can be a part of the open-source community. ## License Flowbite Svelte is a free and open-source UI component library licensed under the [MIT License](https://github.com/themesberg/flowbite-svelte/blob/main/LICENSE). ## LLM Link --- # License - Flowbite Svelte ## MIT License #### Copyright (c) 2022 Flowbite Svelte Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ## LLM Link --- # Quickstart - Flowbite Svelte You can install Flowbite Svelte by using the flowbite-svelte-start or from scratch. ## Getting started Learn how to get started with Flowbite Svelte by following the quickstart guide and start leveraging the interactive Svelte components coupled with Flowbite and Tailwind CSS. ### Using SvelteKit You can install SvelteKit or Svelte to start your app. For SvelteKit: ```bash example // install tailwindcss also npx sv create my-app cd my-app pnpm install ``` ### Using Svelte If you want to get started with Svelte: ```bash npm create vite@latest myapp -- --template svelte cd myapp pnpm install ``` #### Install Tailwind CSS If your svelte project doesn't have `tailwindcss` installed, install it using NPM: ```bash npx sv add tailwindcss pnpm install ``` Run a local development server by running: ```bash pnpm dev ``` ### Install Flowbite Svelte Run the following command to install all Flowbite dependencies and libraries: ```sh pnpm i -D flowbite-svelte flowbite ``` ### Optional Install `flowbite-svelte-icons` for the examples to work properly: ```sh pnpm i -D flowbite-svelte-icons ``` ### Configuration Update your main `css` file to support Tailwindcss and Flowbite plugin. You can as well customize the primary color by modifying the appropriate color values. If you use SvelteKit the main css file is `src/app.css`. ```css @import "tailwindcss"; @plugin 'flowbite/plugin'; @custom-variant dark (&:where(.dark, .dark *)); @theme { --color-primary-50: #fff5f2; --color-primary-100: #fff1ee; --color-primary-200: #ffe4de; --color-primary-300: #ffd5cc; --color-primary-400: #ffbcad; --color-primary-500: #fe795d; --color-primary-600: #ef562f; --color-primary-700: #eb4f27; --color-primary-800: #cc4522; --color-primary-900: #a5371b; --color-secondary-50: #f0f9ff; --color-secondary-100: #e0f2fe; --color-secondary-200: #bae6fd; --color-secondary-300: #7dd3fc; --color-secondary-400: #38bdf8; --color-secondary-500: #0ea5e9; --color-secondary-600: #0284c7; --color-secondary-700: #0369a1; --color-secondary-800: #075985; --color-secondary-900: #0c4a6e; } @source "../node_modules/flowbite-svelte/dist"; @source "../node_modules/flowbite-svelte-icons/dist"; @layer base { /* disable chrome cancel button */ input[type="search"]::-webkit-search-cancel-button { display: none; } } ``` Now you should be able to work with the Flowbite Svelte library and import components such as the navbar, dropdown, modal, and more.
Now you are ready to go! Add the following to `src/routes/+page.svelte` and if you see the following image, then your setting is complete. ```svelte
Info alert! Change a few things up and try submitting again.
``` ## Starters You can use one of starter repo for a quick start.
  • Flowbite-SvelteKit starter
  • Laravel, Inertia, Svelte, Typescript with Flowbite starter
  • ## LLM Link --- # ThemeProvider - Flowbite Svelte ## Basic Usage Wrap your components with ThemeProvider and pass a theme configuration object: ```svelte
    Noteworthy technology

    Here are the biggest enterprise technology acquisitions of 2021 so far, in reverse chronological order.

    ``` ## Theme Configuration The theme configuration object allows you to customize individual components. Each component key corresponds to a Flowbite-Svelte component, and the value defines the styling overrides. ## Component Theme Structure Different components have different theme structures. Here are some examples: ### Simple String Themes Some components accept a simple string for their theme: ```js const theme = { accordion: "w-96 text-green-500", alert: "bg-green-500 text-white", avatar: "bg-blue-50 text-green-700" }; ``` ### Object-Based Themes More complex components use object-based themes with multiple properties: ```js const theme = { button: { base: "w-48", outline: "border-2 border-purple-500", shadow: "shadow-lg" }, card: { base: "bg-red-50 w-72", image: "rounded-t-lg" }, badge: { base: "bg-purple-400 text-white" } }; ``` ## Naming Convention The ThemeProvider follows a consistent naming convention for theme objects and types: ### Theme Object Names Theme object names use the component name with the first letter in lowercase: ```md Accordion.svelte → accordion AccordionItem.svelte → accordionItem BottomNav.svelte → bottomNav BottomNavItem.svelte → bottomNavItem BreadcrumbItem.svelte → breadcrumbItem ButtonGroup.svelte → buttonGroup GradientButton.svelte → gradientButton ``` ### Type Names Type names use the component name followed by "Theme": ```md Accordion.svelte → AccordionTheme AccordionItem.svelte → AccordionItemTheme BottomNav.svelte → BottomNavTheme BottomNavItem.svelte → BottomNavItemTheme BreadcrumbItem.svelte → BreadcrumbItemTheme ButtonGroup.svelte → ButtonGroupTheme GradientButton.svelte → GradientButtonTheme ``` ## Theme Types Import and use the specific theme types for better development experience and error catching. ```js import type { ThemeConfig, AccordionTheme, ButtonTheme, CardTheme. // ... } from "flowbite-svelte"; ``` ## Nested ThemeProvider and Component Classes You can nest ThemeProvider components to apply different themes to different sections of your application. Child ThemeProviders will override the parent themes for their specific scope. Component classes, when defined directly on a component, will always take precedence over any styles provided by ThemeProviders, whether from parent or nested providers. This allows for granular control and specific styling adjustments at the component level, even when a global or scoped theme is in effect. ```svelte Blue Heading

    Card example

    Purple Heading Green heading

    Here are the biggest enterprise technology acquisitions of 2021 so far, in reverse chronological order.

    ``` This allows for granular control over theming in different parts of your component tree. ## Notes - If no theme is provided, the component will log a message to the console but won't break functionality. - The theme configuration is passed through Svelte's context system, making it available to all child components. - Each component will fall back to its default styling if no theme is provided for that specific component. - Theme configurations are merged with default component styles, allowing for partial customization. - Use nested ThemeProviders for section-specific styling while maintaining global themes. ## LLM Link --- # TypeScript Types - Flowbite Svelte ## Typescript types Enhance the reliability and scalability of your user interface code by leveraging data types. The following excerpt shows you the full list of TypeScript types and interfaces that are being used with the Flowbite Svelte library.
    {@html TypeList}
    ## LLM Link --- # ===== COMPONENTS ===== # Svelte Accordion - Flowbite The accordion component is a collection of vertically collapsing header and body elements that can be used to show and hide information based on the Tailwind CSS utility classes and JavaScript from Flowbite. A popular use case would be the “Frequently Asked Questions” section of a website or page when you can show questions and answers for each child element. ## Setup ```svelte ``` ## Default accordion Accordion uses the single selection mode by default i.e. it collapses every other child element when expanding a one. To prevent that behavior set `multiple` property to `true`. ```svelte {#snippet header()}My Header 1{/snippet}

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illo ab necessitatibus sint explicabo ...

    Check out this guide to learn how to get started and start developing websites even faster with components on top of Tailwind CSS.

    {#snippet header()}My Header 2{/snippet}

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illo ab necessitatibus sint explicabo ...

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illo ab necessitatibus sint explicabo ...

    Learn more about these technologies:

    ``` ## Always open Use the `open` prop to make an item open on mount. ```svelte {#snippet header()}Header 2-1{/snippet}

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illo ab necessitatibus sint explicabo ...

    {#snippet header()}Header 2-2{/snippet}

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illo ab necessitatibus sint explicabo ...

    ``` ## Color option You can control the look and feel of `AccordionItems` by overwriting the `activeClass` and `inactiveClass` properties. You can define them in `Accordion` so that they will apply to all children or set them individually on each `AccordionItem`. ```svelte {#snippet header()}Header 2-1{/snippet}

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illo ab necessitatibus sint explicabo ...

    {#snippet header()}Header 2-2{/snippet}

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illo ab necessitatibus sint explicabo ...

    ``` ## Flush accordion Use `flush` prop to remove the rounded borders. ```svelte {#snippet header()}Header 2-1{/snippet}

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illo ab necessitatibus sint explicabo ...

    {#snippet header()}Header 2-2{/snippet}

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illo ab necessitatibus sint explicabo ...

    ``` ## Arrow style Use the `arrowup` and `arrowdown` snippets to set up and down icons. ```svelte {#snippet header()}Header 2-1{/snippet} {#snippet arrowup()} {/snippet} {#snippet arrowdown()} {/snippet}

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illo ab necessitatibus sint explicabo ...

    {#snippet header()}Header 2-2{/snippet} {#snippet arrowup()} {/snippet} {#snippet arrowdown()} {/snippet}

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illo ab necessitatibus sint explicabo ...

    ``` ## Icon Accordion Use `header` snippet to add your icon and title. ```svelte {#snippet header()}
    My Header 1
    {/snippet}

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illo ab necessitatibus sint explicabo...

    Check out this guide to learn how to get started and start websites even faster with components on top of Tailwind CSS.

    {#snippet header()}
    My Header 2
    {/snippet}

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illo ab necessitatibus sintexplicabo...

    ``` ## Multiple mode Use `multiple` to open all accordion items. ```svelte {#snippet header()} Header 1-1 {/snippet}

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illo ab necessitatibus sint explicabo ...

    {#snippet header()} Header 1-2 {/snippet}

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illo ab necessitatibus sint explicabo ...

    ``` Another example how to use the `multiple` option together with expand all behavior. ```svelte {#snippet header()}My Header 1{/snippet}

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illo ab necessitatibus sint explicabo ...

    Check out this guide to learn how to get started and start developing websites even faster with components on top of Tailwind CSS.

    {#snippet header()}My Header 2{/snippet}

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illo ab necessitatibus sint explicabo ...

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illo ab necessitatibus sint explicabo ...

    Learn more about these technologies:

    {#snippet header()}My Header 3{/snippet}

    Something more

    ``` ## Custom transitions The default transition of `AccordionItem`s is slide. Use the `transitionType` and `transitionParams` prop to make custom transitions. ```svelte {#snippet header()}Slide duration:1000{/snippet}

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illo ab necessitatibus sint explicabo ...

    {#snippet header()}Blur duration:300{/snippet}

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illo ab necessitatibus sint explicabo ...

    {#snippet header()}Fade duration:300{/snippet}

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illo ab necessitatibus sint explicabo ...

    ``` ## Nesting accordions Accordions can be nested. All of the mentioned options are supported. ```svelte {#snippet header()}My Header 1{/snippet} {#snippet header()}My Header 1{/snippet}

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illo ab necessitatibus sint explicabo ...

    Check out this guide to learn how to get started and start developing websites even faster with components on top of Tailwind CSS.

    {#snippet header()}My Header 2{/snippet}

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illo ab necessitatibus sint explicabo ...

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illo ab necessitatibus sint explicabo ...

    Learn more about these technologies:

    {#snippet header()}My Header 2{/snippet}

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illo ab necessitatibus sint explicabo ...

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illo ab necessitatibus sint explicabo ...

    Learn more about these technologies:

    ``` ## Using Svelte’s snapshot to preserve the input Use the following example to preserve the input value. First fill out the form, navigate to a different page, and then use your browser’s back button. You’ll notice that your input is preserved automatically. ```svelte Go home {#snippet header()}My Header 1{/snippet}
    ``` ## Copy contact details This example can be used to copy the text content (ie. contact details) inside of the `
    ` field by clicking on the copy to clipboard button positioned inside of the address card. Make sure that you set the `id` to the trigger element to specify the source of the content that is to be copied. ```svelte

    Contact details

    Bonnie Green
    name@flowbite.com
    + 12 345 67890
    {#snippet children(success)} {success ? "Copied" : "Copy to clipboard"} {#if success}{:else}{/if} {/snippet}
    ``` ## Copy button with modal Use this example to show an input field where you can copy the URL of the current page and also show a modal with the copied URL when the copy button is clicked. ```svelte {#snippet right()} {#snippet children(success)} {success ? "Copied" : "Copy to clipboard"} {#if success}{:else}{/if} {/snippet} {/snippet} {#snippet footer()} {/snippet} ``` ## Component data ### Clipboard #### Types [ClipboardProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L431) #### Props - children - embedded: false - value: $bindable("") - success: $bindable(false) - onclick - class: className: "" ## References - [Flowbite Clipboard](https://flowbite.com/docs/components/clipboard/) ## GitHub Links ## LLM Link --- # Svelte Dark Mode - Flowbite In flowbite-svelte, the `class` strategy is used to support toggling dark mode manually, so you should explicitly configure it in Tailwind CSS: ```js example // app.css @custom-variant dark (&:where(.dark, .dark *)); ``` Then you can use `dark:` prefixed classes to configure the styles applied when dark mode is enabled. For example, if you want to change the body background color from `bg-white` when dark mode is disabled to `bg-gray-800` when dark mode is enabled: ```svelte
    %svelte.body%
    ``` Finally, use the dark mode component to display a switcher (that is a button) for users to toggle dark mode manually. The best place to put this component is in the root layout: ```svelte ``` ## Initial theme Use `class="dark"` to set the initial theme to the dark mode. The default mode is `light`. ```html ``` ## Switcher style Use `class` attribute to append classes to the default classes: ```svelte ``` ## Mode icon Use the `lightIcon` and `darkIcon` slots to change icons: ```svelte {#snippet lightIcon()} {/snippet} {#snippet darkIcon()} {/snippet} ``` ## Component data ### DarkMode #### Types [DarkmodeProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L440) #### Props - class: className - lightIcon - darkIcon - size: "md" - ariaLabel: "Dark mode" ## References - [Flowbite Dark Mode](https://flowbite.com/docs/customize/dark-mode/) ## GitHub Links ## LLM Link --- # Svelte Datepicker - Flowbite The Datepicker component provides an interactive calendar interface for selecting single dates or date ranges. It's fully integrated with flowbite-svelte's design system and offers various customization options. ## Setup ```svelte ``` ## Default Datepicker Use the Datepicker for single date selection. The selected date is bound to the `value` prop. ```svelte

    Selected date: {selectedDate ? selectedDate.toLocaleDateString() : "None"}

    ``` ## Date Range Selection Enable date range selection using the `range` prop. The start and end dates are bound to `rangeFrom` and `rangeTo` respectively. ```svelte

    Selected range: {dateRange.from ? dateRange.from.toLocaleDateString() : "None"} - {dateRange.to ? dateRange.to.toLocaleDateString() : "None"}

    ``` ## Inline Datepicker Use the `inline` prop to display the calendar without a popup. ```svelte

    Selected date: {selectedDate ? selectedDate.toLocaleDateString() : "None"}

    ``` ## Color and classes Select one of the following colors for the `color` prop: `primary`(default), `blue`, `red`, `green`, `yellow`, `purple`, `dark`, `light`, `alternative`, `secondary`, `gray`, `orange`, `amber`, `lime`, `emerald`, `teal`, `cyan`, `sky`, `indigo`, `violet`, `fuchsia`, `pink`, `rose`. The `classes` prop has the following `class` for disposal: `base`, `input`, `titleVariant`, `polite`, `button`,`actionButtons`, `columnHeader`, `grid`, `nav`, `dayButton`, `monthButton`. ```svelte
    ``` ## Localization Set a specific locale for date formatting using the `locale` prop. ```svelte
    ``` ## Custom Date Format Specify a custom date format using the `dateFormat` prop. ```svelte
    ``` ## Action Buttons Add action buttons (Today, Clear, Apply) using the `showActionButtons` prop. You can also listen for the `clear` and `apply` events to perform specific actions when these buttons are clicked. ```svelte

    Selected date: {selectedDate ? selectedDate.toLocaleDateString() : "None"}

    Last action: {lastAction}

    ``` ## Custom Title Add a custom title to the Datepicker using the `title` prop. ```svelte
    ``` ## Disabled State Use the `disabled` prop to disable the Datepicker. ```svelte
    ``` ## Required Field Mark the Datepicker as a required field using the `required` prop. ```svelte
    ``` ## Custom First Day of Week Set a custom first day of the week using the `firstDayOfWeek` prop. ```svelte
    ``` ## Event Handling Listen for date selection events using the `onselect` event. ```svelte
    ``` ## Restricting the selectable date range Use `availableFrom` and/or `availableTo` props to restrict the selectable date range. ```svelte

    Available from: {formatDate(availableFrom)} to: {formatDate(availableTo)}

    Selected date: {selectedDate ? formatDate(selectedDate) : "None selected"}

    Today: {formatDate(today)}
    Range: 10 days before today to 10 days after today

    ``` ## Local translation Set `translationLocale` to change translation. The following example shows German date format (DD.MM.YYYY) but English text. ```svelte
    ``` ## Accessing Datepicker Element with elementRef ```svelte
    ``` ## Usage & Localization ```svelte

    Datepicker Locale Test

    ``` ## Comment box Most often the textarea component is used as the main text field input element in comment sections. Use this example to also apply a helper text and buttons below the textarea itself. ```svelte

    Remember, contributions to this topic should follow our Community Guidelines .

    ``` ## Chatroom input If you want to build a chatroom component you will usually want to use a textarea element to allow users to write multi-line chunks of text. ```svelte
    Upload image Add emoji ``` ## Comment box Most often the textarea component is used as the main text field input element in comment sections. Use this example to also apply a helper text and buttons below the textarea itself. ```svelte

    Remember, contributions to this topic should follow our Community Guidelines .

    ``` ## Component data ### Toolbar #### Types [ToolbarProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1124) #### Props - children - end - color - embedded - class: className - classes ### ToolbarButton #### Types [ToolbarButtonProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1130) #### Props - children - color - name - "aria-label": ariaLabel - size - class: className ### ToolbarGroup #### Types [ToolbarGroupProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1128) #### Props - children - spacing - padding - position: "middle" - class: className ### Toolbar styling - Use the `class` prop to overwrite the `div` tag class. ### ToolbarButton styling - Use the `class` prop to overwrite the `button` tag class. ### ToolbarGroup styling - Use the `class` prop to overwrite `divClass`. ## Component data ## References ## GitHub Links ## LLM Link --- # ===== EXAMPLES ===== # Svelte Snapshot - Flowbite 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. You can achieve this by using SvelteKit snapshots, 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.
    --- # ===== PLUGINS ===== # Svelte Charts - Flowbite

    Info Circle Flowbite-Svelte Chart component will be deprecated in the next version. Please use @flowbite-svelte-plugins/chart.

    ## Installation ```svelte pnpm i -D @flowbite-svelte-plugins/chart ``` Update `app.css`: ```svelte @source "../node_modules/@flowbite-svelte-plugins/chart/dist"; ``` ## Area chart Use this example to show a basic area chart. ```svelte
    32.4k

    Users this week

    12%
    Yesterday Today Last 7 days Last 30 days Last 90 days Users Report
    ``` ## Line chart To create a double line chart check the example below. ```svelte
    Clicks

    Clicks growth - Incremental

    Report helps navigate cumulative growth of community activities. Ideally, the chart should have a growing trend, as stagnating chart signifies a significant decrease of community activity.

    Calculation

    For each date bucket, the all-time volume of activities is calculated. This means that activities in period n contain all activities up to period n, plus the activities generated by your community in period.

    Read more

    42,3k

    CPC

    CPC growth - Incremental

    Report helps navigate cumulative growth of community activities. Ideally, the chart should have a growing trend, as stagnating chart signifies a significant decrease of community activity.

    Calculation

    For each date bucket, the all-time volume of activities is calculated. This means that activities in period n contain all activities up to period n, plus the activities generated by your community in period.

    Read more

    $5.40

    Yesterday Today Last 7 days Last 30 days Last 90 days
    ``` ## Column chart You can represent multiple data entries using columns by setting the type: "bar" option ```svelte
    3.4k

    Leads generated per week

    42.5%
    Money spent:
    $3,232
    Conversion rate:
    1.2%
    Yesterday Today Last 7 days Last 30 days Last 90 days Leads Report
    ``` ## Bar chart Create a horizontal bar chart with as many data series as you like by setting the type: "bar" chart type. ```svelte
    Profit
    $5,405
    Profit rate 23.5%
    Income
    $23,635
    Expense
    -$18,230
    Yesterday Today Last 7 days Last 30 days Last 90 days Leads Report
    ``` ## Pie chart Create a pie chart with multiple data series by setting the type: "pie" chart type option. ```svelte
    Website traffic

    Activity growth - Incremental

    Report helps navigate cumulative growth of community activities. Ideally, the chart should have a growing trend, as stagnating chart signifies a significant decrease of community activity.

    Calculation

    For each date bucket, the all-time volume of activities is calculated. This means that activities in period n contain all activities up to period n, plus the activities generated by your community in period.

    Read more
    Edit widget Dropdown data Add to repository Delete widget
    Yesterday Today Last 7 days Last 30 days Last 90 days Traffic analysis
    ``` ## Donut chart Set the chart type: "donut" to create a donut chart and copy the options from the example below to style the elements such as the data series, legends and labels for the X and Y axis. ```svelte
    Website traffic

    Activity growth - Incremental

    Report helps navigate cumulative growth of community activities. Ideally, the chart should have a growing trend, as stagnating chart signifies a significant decrease of community activity.

    Calculation

    For each date bucket, the all-time volume of activities is calculated. This means that activities in period n contain all activities up to period n, plus the activities generated by your community in period.

    Read more
    Download CSV
    Yesterday Today Last 7 days Last 30 days Last 90 days Traffic analysis
    ``` ## Radial chart To create a radial chart with multiple data entries you need to set the type: "radialBar". ```svelte
    Your team's progress

    Activity growth - Incremental

    Report helps navigate cumulative growth of community activities. Ideally, the chart should have a growing trend, as stagnating chart signifies a significant decrease of community activity.

    Calculation

    For each date bucket, the all-time volume of activities is calculated. This means that activities in period n contain all activities up to period n, plus the activities generated by your community in period.

    Read more
    Download CSV
    12
    To do
    23
    In progress
    64
    Done
    {#if isOpen}
    Average task completion rate:
    57%
    Days until sprint ends:
    13 days
    Next meeting:
    Thursday
    {/if}
    Yesterday Today Last 7 days Last 30 days Last 90 days PROGRESS REPORT
    ``` ## Binding chart ```svelte ``` ## Component data The component has the following props, type, and default values. See [types page](https://github.com/shinokada/flowbite-svelte-plugins/blob/main/apps/flowbite-svelte-chart/src/lib/types.ts) for type information. ## References - [@flowbite-svelte-plugins/chart](https://github.com/shinokada/flowbite-svelte-plugins/blob/main/apps/flowbite-svelte-chart/src/lib/Chart.svelte) ## LLM Link --- # Svelte DataTables - Flowbite The datatable component examples from Flowbite are open-source under the MIT License and they are based on the [simple-datatables repository](https://github.com/fiduswriter/simple-datatables) from GitHub. This page provides multiple examples of datatable components where you can search, sort, filter, and paginate table data up to thousands of entries. All examples are responsive, dark mode and RTL support included and by installing the Flowbite-Svelte-DataTable plugin the custom styles will automatically be applied to the datatable components using Tailwind CSS. ## Installation ```svelte pnpm i -D @flowbite-svelte-plugins/datatable ``` ### app.d.ts Update `app.d.ts` as the following: ```ts declare global { namespace App {} } declare module "simple-datatables" { export { DataTable } from "simple-datatables/dist/dts/datatable"; export { convertCSV, convertJSON } from "simple-datatables/dist/dts/convert"; export { exportCSV, exportJSON, exportSQL, exportTXT } from "simple-datatables/dist/dts/export"; export { createElement, isJson, isObject } from "simple-datatables/dist/dts/helpers"; export { makeEditable } from "simple-datatables/dist/dts/editing"; export { addColumnFilter } from "simple-datatables/dist/dts/column_filter"; export type { DataTableOptions, DataTableConfiguration, ColumnOption, cellType, inputCellType, dataRowType, inputRowType, headerCellType, inputHeaderCellType, TableDataType, DataOption, renderType, nodeType, elementNodeType, textNodeType, cellDataType } from "simple-datatables/dist/dts/datatable"; export interface SelectableDataRow { selected?: boolean; [key: string]: any; } } export {}; ``` ### app.css ```css @source "../node_modules/simple-datatables/dist"; @source "../node_modules/@flowbite-svelte-plugins/datatable/dist"; .datatable-pagination .datatable-active a, .datatable-pagination .datatable-active a:focus, .datatable-pagination .datatable-active a:hover, .datatable-pagination .datatable-active button, .datatable-pagination .datatable-active button:focus, .datatable-pagination .datatable-active button:hover { background-color: #ffe4de; cursor: default; } .datatable-wrapper .datatable-table tbody tr.selected { background-color: #fff1ee !important; } ``` ## Default datatable Use this example to show table data with default sorting and pagination functionalities. ```svelte
    ``` ## Snippets Use `captionSlot` and `footerSlot` `snippet`s.
    {#snippet captionSlot()} Caption

    Browse a list of Flowbite products designed to help you work and play, stay organized, get answers, keep in touch, grow your business, and more.

    {/snippet} {#snippet footerSlot()} {/snippet}
    footerSlot: Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestias laboriosam placeat eum facilis aliquam, adipisci consequuntur excepturi rerum distinctio illum quibusdam neque magni quaerat dolorum hic labore repellat omnis? Quisquam?
    ```svelte {#snippet captionSlot()} Caption

    Browse a list of Flowbite products designed to help you work and play, stay organized, get answers, keep in touch, grow your business, and more.

    {/snippet} {#snippet footerSlot()} {/snippet}
    footerSlot: Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestias laboriosam placeat eum facilis aliquam, adipisci consequuntur excepturi rerum distinctio illum quibusdam neque magni quaerat dolorum hic labore repellat omnis? Quisquam?
    ``` ## searchable and sortable `searchable` and `sortable` options are `true` as default. You can disable it as the following example. ```svelte
    ``` ## Filtering data Use the following example to enable filtering data based on a search query for each column. Enabling search for each individual data column is an advanced way of letting users browse complex data.
    ```svelte
    ``` ## Table pagination Pagination is enabled by default for all datatables, however, you can disable it by setting the option paging to false. Use the perPage option to specify how many data rows to show by default. You can also set the perPageSelect option to set the selection options of the table.
    ```svelte
    ``` ## Selecting rows Use this example to enable the selection of rows by clicking anywhere one of the table row elements. Use `selectable` true and `rowRender` option to enable multi selection. Use `multiSelect` false to make single selection.
    ```svelte
    ``` ## Custom Cell Renderer
    ```svelte
    ``` ## Export
    ```svelte
    ``` ## Scroll Y
    ```svelte
    ``` ## AND Search Try to search for "blossom 2014" in the two boxes. The OR-search will give you results that contain "2014" OR "Blossom", while the AND-search will only return results including both "2014" and "Blossom". The search item separator for the extension column is ";" so that searching for "3147;5018" will return no results, but searching for "3147" or "5018" will return the row that contains that value.
    ```svelte
    ``` ## DataTable Event Callbacks The DataTable component exposes callback props that allow you to hook into the underlying simple-datatables library events. These callbacks provide access to the table lifecycle and user interactions. ### Initialization Events #### `onInitStart` Called when table initialization begins. Useful for showing loading indicators. ```ts typescriptonInitStart?: () => void ``` #### `onInitComplete` Called when the table is fully initialized and ready for interaction. ```ts typescriptonInitComplete?: (dataTable: DataTable) => void ``` #### `onInitError` Called if table initialization fails. ```ts typescriptonInitError?: (error: Error) => void ``` ### Data Events #### `onRefresh` Called when the table data is refreshed. ```ts typescriptonRefresh?: (dataTable: DataTable) => void ``` #### `onUpdate` Called when the table is updated (e.g., after sorting or filtering). ```ts typescriptonUpdate?: (dataTable: DataTable) => void ``` ### User Interaction Events #### `onSort` Called when a column is sorted. ```ts typescriptonSort?: (column: number, direction: string, dataTable: DataTable) => void ``` #### `onSearch` Called when a search is performed. ```ts typescriptonSearch?: (query: string, matched: any[], dataTable: DataTable) => void ``` #### `onPage` Called when pagination changes. ```ts typescriptonPage?: (page: number, dataTable: DataTable) => void ``` ### Selection Events (when selectable=true) #### `onSelectRow` Called when a row is selected. ```ts typescriptonSelectRow?: (rowIndex: number, event: Event, dataTable: DataTable) => void ``` #### `onSelectAll` Called when all rows are selected. ```ts typescriptonSelectAll?: (dataTable: DataTable) => void ``` #### `onDeselectRow` Called when a row is deselected. ```ts typescriptonDeselectRow?: (rowIndex: number, dataTable: DataTable) => void ``` #### `onDeselectAll` Called when all rows are deselected. ```ts typescriptonDeselectAll?: (dataTable: DataTable) => void ``` ```svelte {#if isTableLoading}
    Loading table...
    {/if}
    ``` ## Component data The component has the following props, type, and default values. See [types page](https://github.com/shinokada/flowbite-svelte-plugins/blob/main/apps/flowbite-svelte-chart/src/lib/types.ts) for type information. ## References - [@flowbite-svelte-plugins/datatable](https://github.com/shinokada/flowbite-svelte-plugins/blob/main/apps/flowbite-svelte-datatable/src/lib/Table.svelte) ## LLM Link --- # Svelte WYSIWYG Text Editor - Flowbite The WYSIWYG text editor from Flowbite-Svelte is open-source under the MIT license based on the Tip Tap library and allows you to easily edit complex text data with typography styles, links, images, videos, and more. The markup and styles provided by Flowbite-Svelte are all built with the utility classes from Tailwind CSS and the styles for the content inside the WYSIWYG text editor are based on the Flowbite Typography plugin. All examples provided on this page have support for dark mode, RTL (right-to-left) styles, responsiveness on mobile devices and you can easily add your own functionality using JavaScript. ## Installation

    UPDATE: @flowbite-svelte-plugins/texteditor@{textEditor} uses @tiptap{tiptapVersion}.

    ### app.css Use the following example or create your own. {#snippet header()}Example style{/snippet} ### Code Block Styling To add syntax highlighting styles to your code blocks, include a highlight.js theme. You can browse available themes at cdnjs.com/libraries/highlight.js or preview them at https://highlightjs.org/demo. ```svelte ``` ## Full-featured Text Editor Use this example of a WYSIWYG text editor to enable basic typography styling and formatting, adding lists, links, images, videos, code blocks, aligning text, blockquotes, setting headers and paragraphs and more. ## Text Formatting Use `FormatButtonGroup` to enable typography styling, formatting and marking such as bold, code, highlight, italic, link, remove link, underline, strikethrough, subscript, seperscript, and line break. ## Emoji Type `:` to open the autocomplete. The default value is `emoji={true}`, and you can disable it by adding `emoji={false}` to `TextEditor`. ## Mention Trigger a mention popup by typing `@`. Provide a `mentions` array of name strings to display filtered suggestions as you type. ## Bubble Menu The bubble menu displays a contextual toolbar near selected text. Disable features like `underline` and `highlight` using `underline={false}`. Configure which menu items are displayed using the following examples: ## Math Render mathematical formulas and equations by adding the `math` prop. ## Invisible Characters The `InvisibleButtonGroup` component provides toggle, show, and hide controls for invisible elements in a text editor. Each button can be individually shown or hidden using boolean props. ## Character Count The `CharacterCount` component limits the number of allowed characters to a specific length and is able to return the number of characters and words. ## Drag Handle The `dragHandle` prop allows you to easily handle dragging nodes around in the editor. ## File Handler The `file` prop allows you to easily handle file drops and pastes in the editor. ## Floating Menu Use the `floatingMenu` prop in `TextEditor` to make a menu appear on an empty line. Configure which menu items are displayed using the following examples: ## Text Alignment `AlignmentButtonGroup` component enables text alignment to the left, center, right, and justify for the content inside of the WYSIWYG component. ## Layout Elements `LayoutButtonGroup` creates typography elements like blockquotes, horizontal rules, code blocks. ## Images `ImageButtonGroup` adds images inside of the WYSIWYG text editor and configure settings such as the image URL, image alt attribute which is important for SEO and accessibility and the image title. ## Lists Use this example to create typography elements like bullet lists, ordered lists, blockquotes, horizontal rules, paragraphs, headings, code blocks based on Tailwind CSS utility classees and the Flowbite API. ## Fonts ## Adding Youtube Videos Use `YoutubeButtonGroup` to embed videos inside the WYSIWYG text editor based on a YouTube URL source and set the width and height of the video by using the advanced video component. ## Editing Tables Use `TableButtonGroup`s to edit table data inside the WYSIWYG text editor by adding and removing table column, rows, and cells and use other features to navigate through the table data for a convenient editing process. ## Undo and Redo Use the `UndoRedoButtonGroup` component to integrate undo and redo actions. ## Exporting Data Use `ExportButtonGroup.svelte` to export the text content inside of the WYSIWYG text editor in JSON or raw HTML format to persist into your database or API structure. ## TaskList ## Details Use `summary` and `detailsPlaceholder` props to change placeholders. ## Source and HTML Use the following example to view/edit source code and insert HTML code. ## Table of Contents Use the following example to display Table of Contents.

    See an example at this page.

    ## Placeholder Use the `placeholder` prop to customize the text shown in empty editor content (default: "Write something ..."). ## Heading ## Editable Button Use the `EditableButton` to enable or disable editing mode. ## Autofocus Position `autofocusPosition` prop controls the initial cursor position when the editor loads. Set to 'start' to focus at the beginning, 'end' to focus at the end, 'all' to select all content, or a number for a specific character position. Use false or null to disable autofocus entirely. ```md Default: false Type: 'start' | 'end' | 'all' | number | boolean | null ```

    See an example at this page.

    ## Getting and Setting Content Use the following example to get and set text editor content. ## Customizing Group components You can control display of buttons by adding `false` to a button group component as the following example. ## Customizing texteditor Either using the above example or use button components to create your custom texteditor. ## LLM Link ---