Files
AdventureLog/.github/instructions/daisyui.instructions.md
Sean Morley c39ff2449e [v0.12.0 pre] Planning & Itinerary Overhaul, Recommendation Engine, OIDC Enhancements, and More (#931)
* Fixes [REQUEST] Email-based auto-linking for OIDC
Fixes #921

* Add ClusterMap integration for regions and cities with fit-to-bounds functionality

* Update COUNTRY_REGION_JSON_VERSION to v3.0 and modify state ID generation to use ISO2 code

* fix: handle email verification required case during signup

Updated the signup action to return a specific message when the backend responds with a 401 status, indicating that the signup succeeded but email verification is required. This allows the frontend to display the appropriate message using an i18n key.

* feat: add Advanced Configuration documentation with optional environment variables

* Fixes #511

* fix: update appVersion to v0.11.0-main-121425 and enhance socialProviders handling in settings page

* feat: implement social signup controls and update documentation for new environment variables

* fix: update LocationCard props and enhance restore data functionality

- Changed the user prop to null in LocationCard component on the dashboard page.
- Added isRestoring state to manage loading state during data restoration in settings.
- Updated the restore button to show a loading spinner when a restore operation is in progress.

* fix: update appVersion to v0.12.0-pre-dev-121625

* feat: implement itinerary planning feature with CollectionItineraryPlanner component and related updates

* feat: add overnight lodging indicator and functionality to CollectionItineraryPlanner

* feat: add compact display option to LocationCard and enhance lodging filtering in CollectionItineraryPlanner

* feat(itinerary): add itinerary management features and link modal

- Introduced ItineraryViewSet for managing itinerary items with create and reorder functionalities.
- Added itinerary linking capabilities in CollectionModal and CollectionItineraryPlanner components.
- Implemented new ItineraryLinkModal for linking existing items to specific dates.
- Enhanced the frontend with new modals for creating locations, lodging, transportation, notes, and checklists.
- Updated the backend to handle itinerary item creation and reordering with appropriate permissions.
- Improved data handling for unscheduled items and their association with the itinerary.
- Added new dependencies to the frontend for enhanced functionality.

* feat(itinerary): implement auto-generate functionality for itinerary items based on dated records

* feat(collection): enhance collection sharing logic and improve data handling on invite acceptance

* fix: update appVersion to correct pre-dev version

* feat(wikipedia): implement image selection from Wikipedia with enhanced results display

* Refactor code structure for improved readability and maintainability

* feat: add CollectionRecommendationView component for displaying location recommendations

- Implemented CollectionRecommendationView.svelte to handle location recommendations based on user input and selected categories.
- Added Recommendation and RecommendationResponse types to types.ts for better type safety and structure.
- Updated collections/[id]/+page.svelte to include a new view for recommendations, allowing users to switch between different views seamlessly.

* fix: update appVersion and improve button accessibility in collection views

* feat: add canModify prop to collection components for user permission handling

* feat: add itinerary removal functionality to various cards and update UI components

- Implemented `removeFromItinerary` function in `LodgingCard`, `NoteCard`, and `TransportationCard` to allow users to remove items from their itinerary.
- Replaced the trash icon with a calendar remove icon in `LocationCard`, `LodgingCard`, `NoteCard`, and `TransportationCard` for better visual representation.
- Updated the dropdown menus in `LodgingCard`, `NoteCard`, and `TransportationCard` to include the new remove from itinerary option.
- Enhanced `CollectionItineraryPlanner` to pass itinerary items to the respective cards.
- Removed `PointSelectionModal.svelte` as it is no longer needed.
- Refactored `LocationMedia.svelte` to integrate `ImageManagement` component and clean up unused code related to image handling.

* feat: enhance itinerary management with deduplication and initial visit date handling

* feat: add FullMap component for enhanced map functionality with clustering support

- Introduced FullMap.svelte to handle map rendering, clustering, and marker management.
- Updated map page to utilize FullMap component, replacing direct MapLibre usage.
- Implemented clustering options and marker properties handling in FullMap.
- Added utility functions for resolving theme colors and managing marker states.
- Enhanced user experience with hover popups and improved loading states for location details.
- Updated app version to v0.12.0-pre-dev-122225.

* feat: enhance map interaction for touch devices with custom popup handling

* feat: add progress tracker for folder views to display visited and planned locations

* feat: add map center and zoom state management with URL synchronization

* feat: add status and days until start fields to collections with filtering options

* Component folder structure changes

* feat: add LodgingMedia and LodgingModal components for managing lodging details and media attachments

feat: implement LocationSearchMap component for interactive location searching and mapping functionality

* fix: update contentType in ImageManagement component to 'lodging' for correct media handling

* feat: enhance lodging management with date validation and update messages

* feat: implement lodging detail page with server-side loading and image modal functionality

- Added a new server-side load function to fetch lodging details by ID.
- Created a new Svelte component for the lodging detail page, including image carousel and map integration.
- Implemented a modal for displaying images with navigation.
- Enhanced URL handling in the locations page to only read parameters.

* feat: add Transportation modal component and related routes

- Implemented TransportationModal component for creating and editing transportation entries.
- Added server-side loading for transportation details in the new route [id]/+page.server.ts.
- Created a new Svelte page for displaying transportation details with image and attachment handling.
- Integrated modal for editing transportation in the transportation details page.
- Updated lodging routes to include a modal for editing lodging entries.
- Removed unused delete action from lodging server-side logic.

* feat: add start_code and end_code fields to Transportation model and update related components

* feat: implement date validation for itinerary items and add day picker modal for scheduling

* Reorder town and county checks in geocoding.py

Fix detection if only town exists for a location but county is no city name

* Use address keys only if city is found

* Make sure reverse geocoding uses correct key for cities (#938)

* Reorder town and county checks in geocoding.py

Fix detection if only town exists for a location but county is no city name

* Use address keys only if city is found

* Refactor code structure for improved readability and maintainability

* Enhance collection management with modal updates and item handling

* feat: integrate CollectionMap component in collections page and update map titles in lodging and transportation pages

- Replaced inline map implementation with CollectionMap component in collections/[id]/+page.svelte for better modularity.
- Updated the map title in lodging/[id]/+page.svelte to reflect lodging context.
- Updated the map title in transportations/[id]/+page.svelte to reflect transportation context.
- Added functionality to collect and render GeoJSON data from transportation attachments in transportations/[id]/+page.svelte.

* chore: update copyright year to 2026 in various files

* feat: enhance backup export functionality with itinerary items and export IDs

* fix: improve dropdown close behavior by handling multiple event types

* fix: remove unnecessary cache decorator from globespin function

* feat: add initial visit date support in ChecklistModal and NoteModal, with UI suggestions for prefilled dates

* feat: add details view for checklist and note cards with edit functionality

* feat: add travel duration and GPX distance calculation to Transportation model and UI

* feat: add primary image support to Collection model, serializers, and UI components

* Refactor calendar components and enhance event detail handling

- Replaced direct calendar implementation with a reusable CalendarComponent in the calendar route.
- Introduced EventDetailsModal for displaying event details, improving modularity and readability.
- Added functionality to fetch event details asynchronously when an event is clicked.
- Implemented ICS calendar download functionality with loading state management.
- Enhanced collections page to support calendar view, integrating event handling and timezone management.
- Improved lodging and transportation pages to display local time for stays and trips, including timezone badges.
- Cleaned up unused code and comments for better maintainability.

* feat: enhance hero image handling in collection view by prioritizing primary image

* chore: update .env.example to include account email verification configuration

* feat: enhance LodgingCard and TransportationCard components with expandable details and improved layout

* feat: add price and currency fields to locations, lodging, and transportation components

- Introduced price and price_currency fields in LocationModal, LodgingDetails, LodgingModal, TransportationDetails, and TransportationModal components.
- Implemented MoneyInput and CurrencyDropdown components for handling monetary values and currency selection.
- Updated data structures and types to accommodate new price and currency fields across various models.
- Enhanced cost summary calculations in collections and routes to display total costs by currency.
- Added user preference for default currency in settings, affecting new item forms.
- Updated UI to display price information in relevant components, ensuring consistent formatting and user experience.

* feat: add Development Timeline link to overview and create timeline documentation

* feat: enhance map functionality with search and zoom features

- Updated availableViews in collection page to include map view based on lodging and transportation locations.
- Added search functionality to the map page, allowing users to filter pins by name and category.
- Implemented auto-zoom feature to adjust the map view based on filtered search results.
- Introduced a search bar with a clear button for better user experience.

* feat: enhance ISO code extraction and region matching logic in extractIsoCode function

* feat: enhance extractIsoCode function with normalization for locality matching

* feat: update extractIsoCode function to include additional ISO3166 levels for improved region matching

* feat: enhance extractIsoCode function to handle cases without city information and update CollectionMap to bind user data

* feat: add cron job for syncing visited regions and cities, enhance Docker and supervisord configurations

* feat: add CollectionItineraryDay model and related functionality for itinerary day metadata management

* feat: implement cleanup of out-of-range itinerary items and notify users of potential impacts on itinerary when dates change

* Refactor collection page for improved localization and code clarity

- Removed unused imports and consolidated cost category labels to be reactive.
- Updated cost summary function to accept localized labels.
- Enhanced localization for various UI elements, including buttons, headings, and statistics.
- Improved user feedback messages for better clarity and consistency.
- Ensured all relevant text is translatable using the i18n library.

* feat: add collaborator serialization and display in collections

- Implemented `_build_profile_pic_url` and `_serialize_collaborator` functions for user profile picture URLs and serialization.
- Updated `CollectionSerializer` and `UltraSlimCollectionSerializer` to include collaborators in the serialized output.
- Enhanced `CollectionViewSet` to prefetch shared_with users for optimized queries.
- Modified frontend components to display collaborators in collection details, including profile pictures and initials.
- Added new localization strings for collaborators.
- Refactored map and location components to improve usability and functionality.
- Updated app version to reflect new changes.

* feat: add dynamic lodging icons based on type in CollectionMap component

* feat: add CollectionStats component for detailed trip statistics

- Implemented CollectionStats.svelte to display various statistics related to the collection, including distances, activities, and locations visited.
- Enhanced CollectionMap.svelte to filter activities based on date range using new getActivityDate function.
- Updated LocationSearchMap.svelte to handle airport mode for start and end locations.
- Modified types.ts to include is_global property in CollectionItineraryItem for trip-wide items.
- Updated +page.svelte to integrate the new stats view and manage view state accordingly.

* feat: enhance itinerary management by removing old items on date change for notes and checklists; normalize date handling in CollectionMap

* feat: add functionality to change day and move items to trip-wide itinerary

- Implemented changeDay function in ChecklistCard, LocationCard, LodgingCard, NoteCard, and TransportationCard components to allow users to change the scheduled day of items.
- Added a button to move items to the global (trip-wide) itinerary in the aforementioned components, with appropriate dispatch events.
- Enhanced CollectionItineraryPlanner to handle moving items to the global itinerary and added UI elements for unscheduled items.
- Updated ItineraryDayPickModal to support the deletion of source visits when moving locations.
- Added new translations for "Change Day" and "Move Trip Wide" in the English locale.

* fix: specify full path for python3 in cron job and add shell and path variables

* fix: update appVersion to v0.12.0-pre-dev-010726

* feat: enhance CollectionItineraryPlanner and CollectionStats with dynamic links and transport type normalization

* Add Dev Container + WSL install docs and link in install guide (#944) (#951)

* feat: enhance internationalization support in CollectionMap and CollectionStats components

- Added translation support for various labels and messages in CollectionMap.svelte and CollectionStats.svelte using svelte-i18n.
- Updated English and Chinese locale files to include new translation keys for improved user experience.
- Simplified the rendering of recommendation views in the collections page.

* Refactor itinerary management and UI components

- Updated ItineraryViewSet to handle visit updates and creations more efficiently, preserving visit IDs when moving between days.
- Enhanced ChecklistCard, LodgingCard, TransportationCard, and NoteCard to include a new "Change Day" option in the actions menu.
- Improved user experience in CollectionItineraryPlanner by tracking specific itinerary items being moved and ensuring only the relevant entries are deleted.
- Added new location sharing options in LodgingCard and TransportationCard for Apple Maps, Google Maps, and OpenStreetMap.
- Updated translations in en.json for consistency and clarity.
- Minor UI adjustments for better accessibility and usability across various components.

* feat: implement action menus and close event handling in card components

* feat: refactor Dockerfile and supervisord configuration to remove cron and add periodic sync script

* feat: enhance LocationSearchMap and TransportationDetails components with initialization handling and airport mode logic

* feat: add airport and location search mode labels to localization file

* feat: enhance periodic sync logging and improve airport mode handling in LocationSearchMap

* feat: enhance unscheduled items display with improved card interactions and accessibility

* Add dev compose for hot reload and update WSL dev container docs (#958)

* feat: enhance localization for itinerary linking and transportation components

* Localization: update localization files with new keys and values

* fix: improve error messages for Overpass API responses

* chore: update dependencies in frontend package.json and pnpm-lock.yaml

- Updated @sveltejs/adapter-node from ^5.2.12 to ^5.4.0
- Updated @sveltejs/adapter-vercel from ^5.7.0 to ^6.3.0
- Updated tailwindcss from ^3.4.17 to ^3.4.19
- Updated typescript from ^5.8.3 to ^5.9.3
- Updated vite from ^5.4.19 to ^5.4.21

* chore: update dependencies in pnpm-lock.yaml to latest versions

* Refactor code structure for improved readability and maintainability

* Refactor code structure for improved readability and maintainability

* fix: update package dependencies to resolve compatibility issues

* Add "worldtravel" translations to multiple locale files

- Added "worldtravel" key with translations for Spanish, French, Hungarian, Italian, Japanese, Korean, Dutch, Norwegian, Polish, Brazilian Portuguese, Russian, Slovak, Swedish, Turkish, Ukrainian, and Chinese.
- Updated the navigation section in each locale file to include the new "worldtravel" entry.

* Add new screenshots and update email verification message in locale file

* feat: Implement data restoration functionality with file import

- Added a new action `restoreData` in `+page.server.ts` to handle file uploads for restoring collections.
- Enhanced the UI in `+page.svelte` to include an import button and a modal for import progress.
- Integrated file input handling to trigger form submission upon file selection.
- Removed unused GSAP animations from the login, profile, and signup pages for cleaner code.

* feat: Add modals for creating locations and lodging from recommendations, enhance image import functionality

* fix: Adjust styles to prevent horizontal scroll and enhance floating action button visibility

* feat: Enhance error handling and messaging for Google Maps and OpenStreetMap geocoding functions

* fix: Enhance error messaging for Google Maps access forbidden response

* feat: Add User-Agent header to Google Maps API requests and refine error messaging for access forbidden response

* fix: Update User-Agent header in Google Maps API requests for improved compatibility

* fix: Disable proxy settings in Google Maps API request to prevent connection issues

* fix: Update Trivy security scan configuration and add .trivyignore for known false positives

* fix: Refactor update method to handle is_public cascading for related items

* feat: Integrate django-invitations for user invitation management and update settings

* feat: Add Tailwind CSS and DaisyUI plugin for styling

* feat: Add Tailwind CSS and DaisyUI plugin for styling

* feat: Add "Invite a User" guide and update navigation links

* docs: Update "Invite a User" guide to include email configuration tip

* feat: Update email invitation template for improved styling and clarity

* fix: Remove trailing backslash from installation note in Unraid documentation

* feat: Add export/import messages and user email verification prompts in multiple languages

* Squashed commit of the following:

commit a993a15b93ebb7521ae2e5cc31596b98b29fcd6c
Author: Alex <div@alexe.at>
Date:   Mon Jan 12 20:44:47 2026 +0100

    Translated using Weblate (German)

    Currently translated at 100.0% (1048 of 1048 strings)

    Translation: AdventureLog/Web App
    Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/de/

commit fdc455d9424fbb0f6b72179d9eb1340411700773
Author: Ettore Atalan <atalanttore@googlemail.com>
Date:   Sat Jan 10 23:24:23 2026 +0100

    Translated using Weblate (German)

    Currently translated at 100.0% (1048 of 1048 strings)

    Translation: AdventureLog/Web App
    Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/de/

commit 5942129c55e89dd999a13d4df9c40e6e3189355c
Author: Orhun <orhunavcu@gmail.com>
Date:   Sun Jan 11 13:05:31 2026 +0100

    Translated using Weblate (Turkish)

    Currently translated at 100.0% (1048 of 1048 strings)

    Translation: AdventureLog/Web App
    Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/tr/

commit 8712e43d8ba4a7e7fe163fb454d6577187f9a375
Author: Henrique Fonseca Veloso <henriquefv@tutamail.com>
Date:   Fri Jan 9 22:53:11 2026 +0100

    Translated using Weblate (Portuguese (Brazil))

    Currently translated at 99.9% (1047 of 1048 strings)

    Translation: AdventureLog/Web App
    Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/pt_BR/

commit 18ee56653470413afe8d71ecd2b5028f6e4cf118
Author: Anonymous <noreply@weblate.org>
Date:   Fri Jan 9 22:52:57 2026 +0100

    Translated using Weblate (Dutch)

    Currently translated at 99.9% (1047 of 1048 strings)

    Translation: AdventureLog/Web App
    Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/nl/

commit 57783c544e583c035c8b57b5c10ca320f25f399e
Author: Anonymous <noreply@weblate.org>
Date:   Fri Jan 9 22:52:14 2026 +0100

    Translated using Weblate (Arabic)

    Currently translated at 99.9% (1047 of 1048 strings)

    Translation: AdventureLog/Web App
    Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/ar/

commit fb09edfd85bc85234b1c1ba7dd499f2915093fff
Author: Anonymous <noreply@weblate.org>
Date:   Fri Jan 9 22:52:26 2026 +0100

    Translated using Weblate (Spanish)

    Currently translated at 99.9% (1047 of 1048 strings)

    Translation: AdventureLog/Web App
    Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/es/

commit 554a207d8e454a1f7ae826e2a40d389b94be5512
Author: Anonymous <noreply@weblate.org>
Date:   Fri Jan 9 22:52:21 2026 +0100

    Translated using Weblate (German)

    Currently translated at 99.9% (1047 of 1048 strings)

    Translation: AdventureLog/Web App
    Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/de/

commit b70b9db27fb8607beefeb288185601c8f5eae28d
Author: Anonymous <noreply@weblate.org>
Date:   Fri Jan 9 22:53:02 2026 +0100

    Translated using Weblate (Norwegian Bokmål)

    Currently translated at 99.9% (1047 of 1048 strings)

    Translation: AdventureLog/Web App
    Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/nb_NO/

commit 3b467caa9007c553e4ae7de97f53b6e462161ea3
Author: Anonymous <noreply@weblate.org>
Date:   Fri Jan 9 22:53:07 2026 +0100

    Translated using Weblate (Polish)

    Currently translated at 99.9% (1047 of 1048 strings)

    Translation: AdventureLog/Web App
    Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/pl/

commit 30fbbfba3572c8f78ec7c7e1a231e363aca1ef10
Author: Anonymous <noreply@weblate.org>
Date:   Fri Jan 9 22:53:17 2026 +0100

    Translated using Weblate (Russian)

    Currently translated at 99.9% (1047 of 1048 strings)

    Translation: AdventureLog/Web App
    Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/ru/

commit 8cecb492cfcac0a1f93ee8919f7b41d978d331ee
Author: Anonymous <noreply@weblate.org>
Date:   Fri Jan 9 22:52:42 2026 +0100

    Translated using Weblate (Italian)

    Currently translated at 99.9% (1047 of 1048 strings)

    Translation: AdventureLog/Web App
    Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/it/

commit f0d3d41029c89bfa83d5891ee7af70241f27b7be
Author: Anonymous <noreply@weblate.org>
Date:   Fri Jan 9 22:52:38 2026 +0100

    Translated using Weblate (Hungarian)

    Currently translated at 99.9% (1047 of 1048 strings)

    Translation: AdventureLog/Web App
    Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/hu/

commit 102e0f1912d010d38755a1713abb2a7f7564aafb
Author: Anonymous <noreply@weblate.org>
Date:   Fri Jan 9 22:53:21 2026 +0100

    Translated using Weblate (Slovak)

    Currently translated at 99.9% (1047 of 1048 strings)

    Translation: AdventureLog/Web App
    Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/sk/

commit 428b8f18cf6195a96b55109e0221413d82415a2f
Author: Максим Горпиніч <gorpinicmaksim0@gmail.com>
Date:   Sat Jan 10 08:55:28 2026 +0100

    Translated using Weblate (Ukrainian)

    Currently translated at 100.0% (1048 of 1048 strings)

    Translation: AdventureLog/Web App
    Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/uk/

commit 1a71aaf279ecab26c0c1fede05025732e6dcfa5e
Author: Anonymous <noreply@weblate.org>
Date:   Fri Jan 9 22:53:27 2026 +0100

    Translated using Weblate (Swedish)

    Currently translated at 99.9% (1047 of 1048 strings)

    Translation: AdventureLog/Web App
    Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/sv/

commit 36ec3701f3a1a904e7c42ac4ffbe6a050dc6d1ed
Author: Anonymous <noreply@weblate.org>
Date:   Fri Jan 9 22:53:43 2026 +0100

    Translated using Weblate (Chinese (Simplified Han script))

    Currently translated at 99.9% (1047 of 1048 strings)

    Translation: AdventureLog/Web App
    Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/zh_Hans/

commit 65d8b74b340c877cad2028b7142c783a1b568d49
Author: Anonymous <noreply@weblate.org>
Date:   Fri Jan 9 22:52:48 2026 +0100

    Translated using Weblate (Japanese)

    Currently translated at 99.9% (1047 of 1048 strings)

    Translation: AdventureLog/Web App
    Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/ja/

commit 4d11d1d31022583657e93aee70301a8ffcde1340
Author: Anonymous <noreply@weblate.org>
Date:   Fri Jan 9 22:52:52 2026 +0100

    Translated using Weblate (Korean)

    Currently translated at 99.9% (1047 of 1048 strings)

    Translation: AdventureLog/Web App
    Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/ko/

commit bd1135bcb965ad73cf493771b15081cc97cf513a
Author: Orhun <orhunavcu@gmail.com>
Date:   Fri Jan 9 22:53:33 2026 +0100

    Translated using Weblate (Turkish)

    Currently translated at 99.9% (1047 of 1048 strings)

    Translation: AdventureLog/Web App
    Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/tr/

commit 2c3d814119f4cf2dabd20933699f5b991f20f3e6
Author: Anonymous <noreply@weblate.org>
Date:   Fri Jan 9 22:52:32 2026 +0100

    Translated using Weblate (French)

    Currently translated at 99.9% (1047 of 1048 strings)

    Translation: AdventureLog/Web App
    Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/fr/

* Refactor code structure and remove redundant code blocks for improved readability and maintainability

* fix: Correct appVersion to match the latest pre-release version

* fix: Add missing vulnerability reference for jaraco.context in .trivyignore

---------

Co-authored-by: Lars Lehmann <33843261+larsl-net@users.noreply.github.com>
Co-authored-by: Lars Lehmann <lars@lmail.eu>
Co-authored-by: Nick Petrushin <n.a.petrushin@gmail.com>
2026-01-14 10:22:14 -05:00

61 KiB
Raw Blame History

description, alwaysApply, applyTo, downloadedFrom, version
description alwaysApply applyTo downloadedFrom version
daisyUI 5 true ** https://daisyui.com/llms.txt 5.5.x

daisyUI 5

daisyUI 5 is a CSS library for Tailwind CSS 4 daisyUI 5 provides class names for common UI components

daisyUI 5 install notes

install guide

  1. daisyUI 5 requires Tailwind CSS 4
  2. tailwind.config.js file is deprecated in Tailwind CSS v4. do not use tailwind.config.js. Tailwind CSS v4 only needs @import "tailwindcss"; in the CSS file if it's a node dependency.
  3. daisyUI 5 can be installed using npm i -D daisyui@latest and then adding @plugin "daisyui"; to the CSS file
  4. daisyUI is suggested to be installed as a dependency but if you really want to use it from CDN, you can use Tailwind CSS and daisyUI CDN files:
<link href="https://cdn.jsdelivr.net/npm/daisyui@5" rel="stylesheet" type="text/css" />
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
  1. A CSS file with Tailwind CSS and daisyUI looks like this (if it's a node dependency)
@import "tailwindcss";
@plugin "daisyui";

daisyUI 5 usage rules

  1. We can give styles to a HTML element by adding daisyUI class names to it. By adding a component class name, part class names (if there's any available for that component), and modifier class names (if there's any available for that component)
  2. Components can be customized using Tailwind CSS utility classes if the customization is not possible using the existing daisyUI classes. For example btn px-10 sets a custom horizontal padding to a btn
  3. If customization of daisyUI styles using Tailwind CSS utility classes didn't work because of CSS specificity issues, you can use the ! at the end of the Tailwind CSS utility class to override the existing styles. For example btn bg-red-500! sets a custom background color to a btn forcefully. This is a last resort solution and should be used sparingly
  4. If a specific component or something similar to it doesn't exist in daisyUI, you can create your own component using Tailwind CSS utility
  5. when using Tailwind CSS flex and grid for layout, it should be responsive using Tailwind CSS responsive utility prefixes.
  6. Only allowed class names are existing daisyUI class names or Tailwind CSS utility classes.
  7. Ideally, you won't need to write any custom CSS. Using daisyUI class names or Tailwind CSS utility classes is preferred.
  8. suggested - if you need placeholder images, use https://picsum.photos/200/300 with the size you want
  9. suggested - when designing , don't add a custom font unless it's necessary
  10. don't add bg-base-100 text-base-content to body unless it's necessary
  11. For design decisions, use Refactoring UI book best practices

daisyUI 5 class names are one of the following categories. These type names are only for reference and are not used in the actual code

  • component: the required component class
  • part: a child part of a component
  • style: sets a specific style to component or part
  • behavior: changes the behavior of component or part
  • color: sets a specific color to component or part
  • size: sets a specific size to component or part
  • placement: sets a specific placement to component or part
  • direction: sets a specific direction to component or part
  • modifier: modifies the component or part in a specific way
  • variant: prefixes for utility classes that conditionally apply styles. syntax is variant:utility-class

Config

daisyUI 5 config docs: https://daisyui.com/docs/config/ daisyUI without config:

@plugin "daisyui";

daisyUI config with light theme only:

@plugin "daisyui" {
  themes: light --default;
}

daisyUI with all the default configs:

@plugin "daisyui" {
  themes: light --default, dark --prefersdark;
  root: ":root";
  include: ;
  exclude: ;
  prefix: ;
  logs: true;
}

An example config: In below config, all the built-in themes are enabled while bumblebee is the default theme and synthwave is the prefersdark theme (default dark mode) All the other themes are enabled and can be used by adding data-theme="THEME_NAME" to the <html> element root scrollbar gutter is excluded. daisy- prefix is used for all daisyUI classes and console.log is disabled

@plugin "daisyui" {
  themes: light, dark, cupcake, bumblebee --default, emerald, corporate, synthwave --prefersdark, retro, cyberpunk, valentine, halloween, garden, forest, aqua, lofi, pastel, fantasy, wireframe, black, luxury, dracula, cmyk, autumn, business, acid, lemonade, night, coffee, winter, dim, nord, sunset, caramellatte, abyss, silk;
  root: ":root";
  include: ;
  exclude: rootscrollgutter, checkbox;
  prefix: daisy-;
  logs: false;
}

daisyUI 5 colors

daisyUI color names

  • primary: Primary brand color, The main color of your brand
  • primary-content: Foreground content color to use on primary color
  • secondary: Secondary brand color, The optional, secondary color of your brand
  • secondary-content: Foreground content color to use on secondary color
  • accent: Accent brand color, The optional, accent color of your brand
  • accent-content: Foreground content color to use on accent color
  • neutral: Neutral dark color, For not-saturated parts of UI
  • neutral-content: Foreground content color to use on neutral color
  • base-100:-100 Base surface color of page, used for blank backgrounds
  • base-200:-200 Base color, darker shade, to create elevations
  • base-300:-300 Base color, even more darker shade, to create elevations
  • base-content: Foreground content color to use on base color
  • info: Info color, For informative/helpful messages
  • info-content: Foreground content color to use on info color
  • success: Success color, For success/safe messages
  • success-content: Foreground content color to use on success color
  • warning: Warning color, For warning/caution messages
  • warning-content: Foreground content color to use on warning color
  • error: Error color, For error/danger/destructive messages
  • error-content: Foreground content color to use on error color

daisyUI color rules

  1. daisyUI adds semantic color names to Tailwind CSS colors
  2. daisyUI color names can be used in utility classes, like other Tailwind CSS color names. for example, bg-primary will use the primary color for the background
  3. daisyUI color names include variables as value so they can change based the theme
  4. There's no need to use dark: for daisyUI color names
  5. Ideally only daisyUI color names should be used for colors so the colors can change automatically based on the theme
  6. If a Tailwind CSS color name (like red-500) is used, it will be same red color on all themes
  7. If a daisyUI color name (like primary) is used, it will change color based on the theme
  8. Using Tailwind CSS color names for text colors should be avoided because Tailwind CSS color text-gray-800 on bg-base-100 would be unreadable on a dark theme - because on dark theme, bg-base-100 is a dark color
  9. *-content colors should have a good contrast compared to their associated colors
  10. suggestion - when designing a page use base-* colors for majority of the page. use primary color for important elements

daisyUI custom theme with custom colors

A CSS file with Tailwind CSS, daisyUI and a custom daisyUI theme looks like this:

@import "tailwindcss";
@plugin "daisyui";
@plugin "daisyui/theme" {
  name: "mytheme";
  default: true; /* set as default */
  prefersdark: false; /* set as default dark mode (prefers-color-scheme:dark) */
  color-scheme: light; /* color of browser-provided UI */

  --color-base-100: oklch(98% 0.02 240);
  --color-base-200: oklch(95% 0.03 240);
  --color-base-300: oklch(92% 0.04 240);
  --color-base-content: oklch(20% 0.05 240);
  --color-primary: oklch(55% 0.3 240);
  --color-primary-content: oklch(98% 0.01 240);
  --color-secondary: oklch(70% 0.25 200);
  --color-secondary-content: oklch(98% 0.01 200);
  --color-accent: oklch(65% 0.25 160);
  --color-accent-content: oklch(98% 0.01 160);
  --color-neutral: oklch(50% 0.05 240);
  --color-neutral-content: oklch(98% 0.01 240);
  --color-info: oklch(70% 0.2 220);
  --color-info-content: oklch(98% 0.01 220);
  --color-success: oklch(65% 0.25 140);
  --color-success-content: oklch(98% 0.01 140);
  --color-warning: oklch(80% 0.25 80);
  --color-warning-content: oklch(20% 0.05 80);
  --color-error: oklch(65% 0.3 30);
  --color-error-content: oklch(98% 0.01 30);

  --radius-selector: 1rem; /* border radius of selectors (checkbox, toggle, badge) */
  --radius-field: 0.25rem; /* border radius of fields (button, input, select, tab) */
  --radius-box: 0.5rem; /* border radius of boxes (card, modal, alert) */
  /* preferred values for --radius-* : 0rem, 0.25rem, 0.5rem, 1rem, 2rem */

  --size-selector: 0.25rem; /* base size of selectors (checkbox, toggle, badge). Value must be 0.25rem unless we intentionally want bigger selectors. In so it can be 0.28125 or 0.3125. If we intentionally want smaller selectors, it can be 0.21875 or 0.1875 */
  --size-field: 0.25rem; /* base size of fields (button, input, select, tab). Value must be 0.25rem unless we intentionally want bigger fields. In so it can be 0.28125 or 0.3125. If we intentionally want smaller fields, it can be 0.21875 or 0.1875 */

  --border: 1px; /* border size. Value must be 1px unless we intentionally want thicker borders. In so it can be 1.5px or 2px. If we intentionally want thinner borders, it can be 0.5px */

  --depth: 1; /* only 0 or 1  Adds a shadow and subtle 3D depth effect to components */
  --noise: 0; /* only 0 or 1 - Adds a subtle noise (grain) effect to components */
}

Rules

  • All CSS variables above are required
  • Colors can be OKLCH or hex or other formats
  • If you're generating a custom theme, do not include the comments from the example above. Just provide the code.

People can use https://daisyui.com/theme-generator/ visual tool to create their own theme.

daisyUI 5 components

accordion

Accordion is used for showing and hiding content but only one item can stay open at a time

accordion docs

Class names

  • component: collapse
  • part: collapse-title, collapse-content
  • modifier: collapse-arrow, collapse-plus, collapse-open, collapse-close

Syntax

<div class="collapse {MODIFIER}">{CONTENT}</div>

where content is:

<input type="radio" name="{name}" checked="{checked}" />
<div class="collapse-title">{title}</div>
<div class="collapse-content">{CONTENT}</div>

Rules

  • {MODIFIER} is optional and can have one of the modifier class names
  • Accordion uses radio inputs. All radio inputs with the same name work together and only one of them can be open at a time
  • If you have more than one set of accordion items on a page, use different names for the radio inputs on each set
  • Replace {name} with a unique name for the accordion group
  • replace {checked} with checked="checked" if you want the accordion to be open by default

alert

Alert informs users about important events

alert docs

Class names

  • component: alert
  • style: alert-outline, alert-dash, alert-soft
  • color: alert-info, alert-success, alert-warning, alert-error
  • direction: alert-vertical, alert-horizontal

Syntax

<div role="alert" class="alert {MODIFIER}">{CONTENT}</div>

Rules

  • {MODIFIER} is optional and can have one of each style/color/direction class names
  • Add sm:alert-horizontal for responsive layouts

avatar

Avatars are used to show a thumbnail

avatar docs

Class names

  • component: avatar, avatar-group
  • modifier: avatar-online, avatar-offline, avatar-placeholder

Syntax

<div class="avatar {MODIFIER}">
  <div>
    <img src="{image-url}" />
  </div>
</div>

Rules

  • {MODIFIER} is optional and can have one of the modifier class names
  • Use avatar-group for containing multiple avatars
  • You can set custom sizes using w-* and h-*
  • You can use mask classes such as mask-squircle, mask-hexagon, mask-triangle

badge

Badges are used to inform the user of the status of specific data

badge docs

Class names

  • component: badge
  • style: badge-outline, badge-dash, badge-soft, badge-ghost
  • color: badge-neutral, badge-primary, badge-secondary, badge-accent, badge-info, badge-success, badge-warning, badge-error
  • size: badge-xs, badge-sm, badge-md, badge-lg, badge-xl

Syntax

<span class="badge {MODIFIER}">Badge</span>

Rules

  • {MODIFIER} is optional and can have one of each style/color/size class names
  • Can be used inside text or buttons
  • To create an empty badge, just remove the text between the span tags

breadcrumbs

Breadcrumbs helps users to navigate

breadcrumbs docs

Class names

  • component: breadcrumbs

Syntax

<div class="breadcrumbs">
  <ul><li><a>Link</a></li></ul>
</div>

Rules

  • breadcrumbs only has one main class name
  • Can contain icons inside the links
  • If you set max-width or the list gets larger than the container it will scroll

button

Buttons allow the user to take actions

button docs

Class names

  • component: btn
  • color: btn-neutral, btn-primary, btn-secondary, btn-accent, btn-info, btn-success, btn-warning, btn-error
  • style: btn-outline, btn-dash, btn-soft, btn-ghost, btn-link
  • behavior: btn-active, btn-disabled
  • size: btn-xs, btn-sm, btn-md, btn-lg, btn-xl
  • modifier: btn-wide, btn-block, btn-square, btn-circle

Syntax

<button class="btn {MODIFIER}">Button</button>

Rules

  • {MODIFIER} is optional and can have one of each color/style/behavior/size/modifier class names
  • btn can be used on any html tags such as <button>, <a>, <input>
  • btn can have an icon before or after the text
  • set tabindex="-1" role="button" aria-disabled="true" if you want to disable the button using a class name

calendar

Calendar includes styles for different calendar libraries

calendar docs

Class names

  • component
    • cally (for Cally web component)
    • pika-single (for the input field that opens Pikaday calendar)
    • react-day-picker (for the DayPicker component)

Syntax

For Cally:

<calendar-date class="cally">{CONTENT}</calendar-date>

For Pikaday:

<input type="text" class="input pika-single">

For React Day Picker:

<DayPicker className="react-day-picker">

Rules

  • daisyUI supports Cally, Pikaday, React Day Picker

card

Cards are used to group and display content

card docs

Class names

  • component: card
  • part: card-title, card-body, card-actions
  • style: card-border, card-dash
  • modifier: card-side, image-full
  • size: card-xs, card-sm, card-md, card-lg, card-xl

Syntax

<div class="card {MODIFIER}">
  <figure><img src="{image-url}" alt="{alt-text}" /></figure>
  <div class="card-body">
    <h2 class="card-title">{title}</h2>
    <p>{CONTENT}</p>
    <div class="card-actions">{actions}</div>
  </div>
</div>

Rules

  • {MODIFIER} is optional and can have one of the modifier class names and one of the size class names
  • <figure> and <div class="card-body"> are optional
  • can use sm:card-horizontal for responsive layouts
  • If image is placed after card-body, the image will be placed at the bottom

Carousel show images or content in a scrollable area

carousel docs

Class names

  • component: carousel
  • part: carousel-item
  • modifier: carousel-start, carousel-center, carousel-end
  • direction: carousel-horizontal, carousel-vertical

Syntax

<div class="carousel {MODIFIER}">{CONTENT}</div>

Rules

  • {MODIFIER} is optional and can have one of the modifier/direction class names
  • Content is a list of carousel-item divs: <div class="carousel-item"></div>
  • To create a full-width carousel, add w-full to each carousel item

chat

Chat bubbles are used to show one line of conversation and all its data, including the author image, author name, time, etc

chat docs

Class names

  • component: chat
  • part: chat-image, chat-header, chat-footer, chat-bubble
  • placement: chat-start, chat-end
  • color: chat-bubble-neutral, chat-bubble-primary, chat-bubble-secondary, chat-bubble-accent, chat-bubble-info, chat-bubble-success, chat-bubble-warning, chat-bubble-error

Syntax

<div class="chat {PLACEMENT}">
  <div class="chat-image"></div>
  <div class="chat-header"></div>
  <div class="chat-bubble {COLOR}">Message text</div>
  <div class="chat-footer"></div>
</div>

Rules

  • {PLACEMENT} is required and must be either chat-start or chat-end
  • {COLOR} is optional and can have one of the color class names
  • To add an avatar, use <div class="chat-image avatar"> and nest the avatar content inside

checkbox

Checkboxes are used to select or deselect a value

checkbox docs

Class names

  • component: checkbox
  • color: checkbox-primary, checkbox-secondary, checkbox-accent, checkbox-neutral, checkbox-success, checkbox-warning, checkbox-info, checkbox-error
  • size: checkbox-xs, checkbox-sm, checkbox-md, checkbox-lg, checkbox-xl

Syntax

<input type="checkbox" class="checkbox {MODIFIER}" />

Rules

  • {MODIFIER} is optional and can have one of each color/size class names

collapse

Collapse is used for showing and hiding content

collapse docs

Class names

  • component: collapse
  • part: collapse-title, collapse-content
  • modifier: collapse-arrow, collapse-plus, collapse-open, collapse-close

Syntax

<div tabindex="0" class="collapse {MODIFIER}">
  <div class="collapse-title">{title}</div>
  <div class="collapse-content">{CONTENT}</div>
</div>

Rules

  • {MODIFIER} is optional and can have one of the modifier class names
  • instead of tabindex="0", you can use <input type="checkbox"> as a first child
  • Can also be a details/summary tag

countdown

Countdown gives you a transition effect when you change a number between 0 to 999

countdown docs

Class names

  • component: countdown

Syntax

<span class="countdown">
  <span style="--value:{number};">number</span>
</span>

Rules

  • The --value CSS variable and text must be a number between 0 and 999
  • you need to change the span text and the --value CSS variable using JS
  • you need to add aria-live="polite" and aria-label="{number}" so screen readers can properly read changes

diff

Diff component shows a side-by-side comparison of two items

diff docs

Class names

  • component: diff
  • part: diff-item-1, diff-item-2, diff-resizer

Syntax

<figure class="diff">
  <div class="diff-item-1">{item1}</div>
  <div class="diff-item-2">{item2}</div>
  <div class="diff-resizer"></div>
</figure>

Rules

  • To maintain aspect ratio, add aspect-16/9 or other aspect ratio classes to <figure class="diff"> element

divider

Divider will be used to separate content vertically or horizontally

divider docs

Class names

  • component: divider
  • color: divider-neutral, divider-primary, divider-secondary, divider-accent, divider-success, divider-warning, divider-info, divider-error
  • direction: divider-vertical, divider-horizontal
  • placement: divider-start, divider-end

Syntax

<div class="divider {MODIFIER}">{text}</div>

Rules

  • {MODIFIER} is optional and can have one of each direction/color/placement class names
  • Omit text for a blank divider

dock

Dock (also know as Bottom navigation or Bottom bar) is a UI element that provides navigation options to the user. Dock sticks to the bottom of the screen

dock docs

Class names

  • component: dock
  • part: dock-label
  • modifier: dock-active
  • size: dock-xs, dock-sm, dock-md, dock-lg, dock-xl

Syntax

<div class="dock {MODIFIER}">{CONTENT}</div>

where content is a list of buttons:

<button>
    <svg>{icon}</svg>
    <span class="dock-label">Text</span>
</button>

Rules

  • {MODIFIER} is optional and can have one of the size class names
  • To make a button active, add dock-active class to the button
  • add <meta name="viewport" content="viewport-fit=cover"> is required for responsivness of the dock in iOS

drawer

Drawer is a grid layout that can show/hide a sidebar on the left or right side of the page

drawer docs

Class names

  • component: drawer
  • part: drawer-toggle, drawer-content, drawer-side, drawer-overlay
  • placement: drawer-end
  • modifier: drawer-open
  • variant: is-drawer-open:, is-drawer-close:

Syntax

<div class="drawer {MODIFIER}">
  <input id="my-drawer" type="checkbox" class="drawer-toggle" />
  <div class="drawer-content">{CONTENT}</div>
  <div class="drawer-side">{SIDEBAR}</div>
</div>

where {CONTENT} can be navbar, site content, footer, etc and {SIDEBAR} can be a menu like:

<ul class="menu p-4 w-80 min-h-full bg-base-100 text-base-content">
  <li><a>Item 1</a></li>
  <li><a>Item 2</a></li>
</ul>

To open/close the drawer, use a label that points to the drawer-toggle input:

<label for="my-drawer" class="btn drawer-button">Open/close drawer</label>

Example: This sidebar is always visible on large screen, can be toggled on small screen:

<div class="drawer lg:drawer-open">
  <input id="my-drawer-3" type="checkbox" class="drawer-toggle" />
  <div class="drawer-content flex flex-col items-center justify-center">
    <!-- Page content here -->
    <label for="my-drawer-3" class="btn drawer-button lg:hidden">
      Open drawer
    </label>
  </div>
  <div class="drawer-side">
    <label for="my-drawer-3" aria-label="close sidebar" class="drawer-overlay"></label>
    <ul class="menu bg-base-200 min-h-full w-80 p-4">
      <!-- Sidebar content here -->
      <li><button>Sidebar Item 1</button></li>
      <li><button>Sidebar Item 2</button></li>
    </ul>
  </div>
</div>

Example: This sidebar is always visible. When it's close we only see iocns, when it's open we see icons and text

<div class="drawer lg:drawer-open">
  <input id="my-drawer-4" type="checkbox" class="drawer-toggle" />
  <div class="drawer-content">
    <!-- Page content here -->
  </div>
  <div class="drawer-side is-drawer-close:overflow-visible">
    <label for="my-drawer-4" aria-label="close sidebar" class="drawer-overlay"></label>
    <div class="is-drawer-close:w-14 is-drawer-open:w-64 bg-base-200 flex flex-col items-start min-h-full">
      <!-- Sidebar content here -->
      <ul class="menu w-full grow">
        <!-- list item -->
        <li>
          <button class="is-drawer-close:tooltip is-drawer-close:tooltip-right" data-tip="Homepage">
            🏠
            <span class="is-drawer-close:hidden">Homepage</span>
          </button>
        </li>
        <!-- list item -->
        <li>
          <button class="is-drawer-close:tooltip is-drawer-close:tooltip-right" data-tip="Settings">
            ⚙️
            <span class="is-drawer-close:hidden">Settings</span>
          </button>
        </li>
      </ul>
      <!-- button to open/close drawer -->
      <div class="m-2 is-drawer-close:tooltip is-drawer-close:tooltip-right" data-tip="Open">
        <label for="my-drawer-4" class="btn btn-ghost btn-circle drawer-button is-drawer-open:rotate-y-180">
          ↔️
        </label>
      </div>
    </div>
  </div>
</div>

Rules

  • {MODIFIER} is optional and can have one of the modifier/placement class names
  • id is required for the drawer-toggle input. change my-drawer to a unique id according to your needs
  • lg:drawer-open can be used to make sidebar visible on larger screens
  • drawer-toggle is a hidden checkbox. Use label with "for" attribute to toggle state
  • if you want to open the drawer when a button is clicked, use <label for="my-drawer" class="btn drawer-button">Open drawer</label> where my-drawer is the id of the drawer-toggle input
  • when using drawer, every page content must be inside drawer-content element. for example navbar, footer, etc should not be outside of drawer

dropdown

Dropdown can open a menu or any other element when the button is clicked

dropdown docs

Class names

  • component: dropdown
  • part: dropdown-content
  • placement: dropdown-start, dropdown-center, dropdown-end, dropdown-top, dropdown-bottom, dropdown-left, dropdown-right
  • modifier: dropdown-hover, dropdown-open, dropdown-close

Syntax

Using details and summary

<details class="dropdown">
  <summary>Button</summary>
  <ul class="dropdown-content">{CONTENT}</ul>
</details>

Using popover API

<button popovertarget="{id}" style="anchor-name:--{anchor}">{button}</button>
<ul class="dropdown-content" popover id="{id}" style="position-anchor:--{anchor}">{CONTENT}</ul>

Using CSS focus

<div class="dropdown">
  <div tabindex="0" role="button">Button</div>
  <ul tabindex="-1" class="dropdown-content">{CONTENT}</ul>
</div>

Rules

  • {MODIFIER} is optional and can have one of the modifier/placement class names
  • replace {id} and {anchor} with a unique name
  • For CSS focus dropdowns, use tabindex="0" and role="button" on the button
  • The content can be any HTML element (not just <ul>)

fab

FAB (Floating Action Button) stays in the bottom corner of screen. It includes a focusable and accessible element with button role. Clicking or focusing it shows additional buttons (known as Speed Dial buttons) in a vertical arrangement or a flower shape (quarter circle)

fab docs

Class names

  • component: fab
  • part: fab-close, fab-main-action
  • modifier: fab-flower

Syntax

A single FAB in the corder of screen

<div class="fab">
  <button class="btn btn-lg btn-circle">{IconOriginal}</button>
</div>

A FAB that opens a 3 other buttons in the corner of page vertically

<div class="fab">
  <div tabindex="0" role="button" class="btn btn-lg btn-circle btn-primary">{IconOriginal}</div>
  <button class="btn btn-lg btn-circle">{Icon1}</button>
  <button class="btn btn-lg btn-circle">{Icon2}</button>
  <button class="btn btn-lg btn-circle">{Icon3}</button>
</div>

A FAB that opens a 3 other buttons in the corner of page vertically and they have label text

<div class="fab">
  <div tabindex="0" role="button" class="btn btn-lg btn-circle btn-primary">{IconOriginal}</div>
  <div>{Label1}<button class="btn btn-lg btn-circle">{Icon1}</button></div>
  <div>{Label2}<button class="btn btn-lg btn-circle">{Icon2}</button></div>
  <div>{Label3}<button class="btn btn-lg btn-circle">{Icon3}</button></div>
</div>

FAB with rectangle buttons. These are not circular buttons so they can have more content.

<div class="fab">
  <div tabindex="0" role="button" class="btn btn-lg btn-circle btn-primary">{IconOriginal}</div>
  <button class="btn btn-lg">{Label1}</button>
  <button class="btn btn-lg">{Label2}</button>
  <button class="btn btn-lg">{Label3}</button>
</div>

FAB with close button. When FAB is open, the original button is replaced with a close button

<div class="fab">
  <div tabindex="0" role="button" class="btn btn-lg btn-circle btn-primary">{IconOriginal}</div>
  <div class="fab-close">Close <span class="btn btn-circle btn-lg btn-error"></span></div>
  <div>{Label1}<button class="btn btn-lg btn-circle">{Icon1}</button></div>
  <div>{Label2}<button class="btn btn-lg btn-circle">{Icon2}</button></div>
  <div>{Label3}<button class="btn btn-lg btn-circle">{Icon3}</button></div>
</div>

FAB with Main Action button. When FAB is open, the original button is replaced with a main action button

<div class="fab">
  <div tabindex="0" role="button" class="btn btn-lg btn-circle btn-primary">{IconOriginal}</div>
  <div class="fab-main-action">
    {LabelMainAction}<button class="btn btn-circle btn-secondary btn-lg">{IconMainAction}</button>
  </div>
  <div>{Label1}<button class="btn btn-lg btn-circle">{Icon1}</button></div>
  <div>{Label2}<button class="btn btn-lg btn-circle">{Icon2}</button></div>
  <div>{Label3}<button class="btn btn-lg btn-circle">{Icon3}</button></div>
</div>

FAB Flower. It opens the buttons in a flower shape (quarter circle) arrangement instead of vertical

<div class="fab fab-flower">
  <div tabindex="0" role="button" class="btn btn-lg btn-circle btn-primary">{IconOriginal}</div>
  <button class="fab-main-action btn btn-circle btn-lg">{IconMainAction}</button>
  <button class="btn btn-lg btn-circle">{Icon1}</button>
  <button class="btn btn-lg btn-circle">{Icon2}</button>
  <button class="btn btn-lg btn-circle">{Icon3}</button>
</div>

FAB Flower with tooltips. There's no space for a text label in a quarter circle, so tooltips are used to indicate the button's function

<div class="fab fab-flower">
  <div tabindex="0" role="button" class="btn btn-lg btn-circle btn-primary">{IconOriginal}</div>
  <button class="fab-main-action btn btn-circle btn-lg">{IconMainAction}</button>
  <div class="tooltip tooltip-left" data-tip="{Label1}">
    <button class="btn btn-lg btn-circle">{Icon1}</button>
  </div>
  <div class="tooltip tooltip-left" data-tip="{Label2}">
    <button class="btn btn-lg btn-circle">{Icon2}</button>
  </div>
  <div class="tooltip tooltip-left" data-tip="{Label3}">
    <button class="btn btn-lg btn-circle">{Icon3}</button>
  </div>
</div>

Rules

  • {Icon*} should be replaced with the appropriate icon for each button. SVG icons are recommended
  • {IconOriginal} is the icon that we see before opening the FAB
  • {IconMainAction} is the icon we see after opening the FAB
  • {Icon1}, {Icon2}, {Icon3} are the icons for the additional buttons
  • {Label*} is the label text for each button

fieldset

Fieldset is a container for grouping related form elements. It includes fieldset-legend as a title and label as a description

fieldset docs

Class names

  • Component: fieldset, label
  • Parts: fieldset-legend

Syntax

<fieldset class="fieldset">
  <legend class="fieldset-legend">{title}</legend>
  {CONTENT}
  <p class="label">{description}</p>
</fieldset>

Rules

  • You can use any element as a direct child of fieldset to add form elements

file-input

File Input is a an input field for uploading files

file-input docs

Class Names:

  • Component: file-input
  • Style: file-input-ghost
  • Color: file-input-neutral, file-input-primary, file-input-secondary, file-input-accent, file-input-info, file-input-success, file-input-warning, file-input-error
  • Size: file-input-xs, file-input-sm, file-input-md, file-input-lg, file-input-xl

Syntax

<input type="file" class="file-input {MODIFIER}" />

Rules

  • {MODIFIER} is optional and can have one of each style/color/size class names

filter

Filter is a group of radio buttons. Choosing one of the options will hide the others and shows a reset button next to the chosen option

filter docs

Class names

  • component: filter
  • part: filter-reset

Syntax

Using HTML form

<form class="filter">
  <input class="btn btn-square" type="reset" value="×"/>
  <input class="btn" type="radio" name="{NAME}" aria-label="Tab 1 title"/>
  <input class="btn" type="radio" name="{NAME}" aria-label="Tab 2 title"/>
</form>

Without HTML form

<div class="filter">
  <input class="btn filter-reset" type="radio" name="{NAME}" aria-label="×"/>
  <input class="btn" type="radio" name="{NAME}" aria-label="Tab 1 title"/>
  <input class="btn" type="radio" name="{NAME}" aria-label="Tab 2 title"/>
</div>

Rules

  • replace {NAME} with proper value, according to the context of the filter
  • Each set of radio inputs must have unique name attributes to avoid conflicts
  • Use <form> tag when possible and only use <div> if you can't use a HTML form for some reason
  • Use filter-reset class for the reset button

Footer can contain logo, copyright notice, and links to other pages

footer docs

Class names

  • component: footer
  • part: footer-title
  • placement: footer-center
  • direction: footer-horizontal, footer-vertical

Syntax

<footer class="footer {MODIFIER}">{CONTENT}</footer>

where content can contain several <nav> tags with footer-title and links inside

Rules

  • {MODIFIER} is optional and can have one of each placement/direction class names
  • try to use sm:footer-horizontal to make footer responsive
  • suggestion - use base-200 for background color

hero

Hero is a component for displaying a large box or image with a title and description

hero docs

Class names

  • component: hero
  • part: hero-content, hero-overlay

Syntax

<div class="hero {MODIFIER}">{CONTENT}</div>

Rules

  • {MODIFIER} is optional
  • Use hero-content for the text content
  • Use hero-overlay inside the hero to overlay the background image with a color
  • Content can contain a figure

hover-3d

Hover 3D is a wrapper component that adds a 3D hover effect to its content. When we hover over the component, it tilts and rotates based on the mouse position, creating an interactive 3D effect.

hover-3d works by placing 8 hover zones on top of the content. Each zone detects mouse movement and applies a slight rotation to the content based on the mouse position within that zone. The combined effect of all 8 zones creates a smooth and responsive 3D tilt effect as the user moves their mouse over the component.

Only use non-interactive content inside the hover-3d wrapper. If you want to make the entire card clickable, use a link for the whole hover-3d component instead of putting interactive elements like buttons or links inside it.

hover-3d docs

Class names

  • component: hover-3d

Syntax

<div class="hover-3d my-12 mx-2">
  <figure class="max-w-100 rounded-2xl">
    <img src="https://img.daisyui.com/images/stock/creditcard.webp" alt="Tailwind CSS 3D card" />
  </figure>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
</div>

Rules

  • hover-3d can be a <div> or a <a>
  • hover-3d must have exactly 9 direct children where the first child is the main content and the other 8 children are empty <div>s for hover zones
  • content inside hover-3d should be non-interactive (no buttons, links, inputs, etc)

Hover Gallery is container of images. The first image is visible be default and when we hover it horizontally, other images show up. Hover Gallery is useful for product cards in ecommerce sites, portfoilios or in image galleries. Hover Gallery can include up to 10 images.

hover-gallery docs

Class names

  • component: hover-gallery

Syntax

<figure class="hover-gallery max-w-60">
  <img src="https://img.daisyui.com/images/stock/daisyui-hat-1.webp" />
  <img src="https://img.daisyui.com/images/stock/daisyui-hat-2.webp" />
  <img src="https://img.daisyui.com/images/stock/daisyui-hat-3.webp" />
  <img src="https://img.daisyui.com/images/stock/daisyui-hat-4.webp" />
</figure>

Rules

  • hover-gallery can be a <div> or a <figure>
  • hover-gallery can include up to 10 images
  • hover-gallery needs a max width otherwise if fills the container width
  • images must be same dimensions for a proper alignment

indicator

Indicators are used to place an element on the corner of another element

indicator docs

Class names

  • component: indicator
  • part: indicator-item
  • placement: indicator-start, indicator-center, indicator-end, indicator-top, indicator-middle, indicator-bottom

Syntax

<div class="indicator">
  <span class="indicator-item">{indicator content}</span>
  <div>{main content}</div>
</div>

Rules

  • Add all indicator elements (with indicator-item class) before the main content
  • {placement} is optional and can have one of each horizontal/vertical class names. default is indicator-end indicator-top

input

Text Input is a simple input field

input docs

Class names

  • component: input
  • style: input-ghost
  • color: input-neutral, input-primary, input-secondary, input-accent, input-info, input-success, input-warning, input-error
  • size: input-xs, input-sm, input-md, input-lg, input-xl

Syntax

<input type="{type}" placeholder="Type here" class="input {MODIFIER}" />

Rules

  • {MODIFIER} is optional and can have one of each style/color/size class names
  • Can be used with any input field type (text, password, email, etc.)
  • Use input class for the parent when you have more than one element inside input

join

Join is a container for grouping multiple items, it can be used to group buttons, inputs, etc. Join applies border radius to the first and last item. Join can be used to create a horizontal or vertical list of items

join docs

Class names

  • component: join, join-item
  • direction: join-vertical, join-horizontal

Syntax

<div class="join {MODIFIER}">{CONTENT}</div>

Rules

  • {MODIFIER} is optional and can have one of the direction class names
  • Any direct child of the join element will get joined together
  • Any element with join-item will be affected
  • Use lg:join-horizontal for responsive layouts

kbd

Kbd is used to display keyboard shortcuts

kbd docs

Class names

  • component: kbd
  • size: kbd-xs, kbd-sm, kbd-md, kbd-lg, kbd-xl

Syntax

<kbd class="kbd {MODIFIER}">K</kbd>

Rules

  • {MODIFIER} is optional and can have one of the size class names

label

Label is used to provide a name or title for an input field. Label can be placed before or after the field

label docs

Class names

  • component: label, floating-label

Syntax

For regular label:

<label class="input">
  <span class="label">{label text}</span>
  <input type="text" placeholder="Type here" />
</label>

For floating label:

<label class="floating-label">
  <input type="text" placeholder="Type here" class="input" />
  <span>{label text}</span>
</label>

Rules

  • The input class is for styling the parent element which contains the input field and label, so the label does not have the 'input' class
  • Use floating-label for the parent of an input field and a span that floats above the input field when the field is focused

Link adds the missing underline style to links

link docs

Class names

  • component: link
  • style: link-hover
  • color: link-neutral, link-primary, link-secondary, link-accent, link-success, link-info, link-warning, link-error

Syntax

<a class="link {MODIFIER}">Click me</a>

Rules

  • {MODIFIER} is optional and can have one of the modifier class names

list

List is a vertical layout to display information in rows

list docs

Class Names:

  • Component: list, list-row
  • Modifier: list-col-wrap, list-col-grow

Syntax

<ul class="list">
  <li class="list-row">{CONTENT}</li>
</ul>

Rules

  • Use list-row for each item inside the list
  • By default, the second child of the list-row will fill the remaining space. You can use list-col-grow on another child to make it fill the remaining space instead
  • Use list-col-wrap to force an item to wrap to the next line

loading

Loading shows an animation to indicate that something is loading

loading docs

Class names

  • component: loading
  • style: loading-spinner, loading-dots, loading-ring, loading-ball, loading-bars, loading-infinity
  • size: loading-xs, loading-sm, loading-md, loading-lg, loading-xl

Syntax

<span class="loading {MODIFIER}"></span>

Rules

  • {MODIFIER} is optional and can have one of the style/size class names

mask

Mask crops the content of the element to common shapes

mask docs

Class names

  • component: mask
  • style: mask-squircle, mask-heart, mask-hexagon, mask-hexagon-2, mask-decagon, mask-pentagon, mask-diamond, mask-square, mask-circle, mask-star, mask-star-2, mask-triangle, mask-triangle-2, mask-triangle-3, mask-triangle-4
  • modifier: mask-half-1, mask-half-2

Syntax

<img class="mask {MODIFIER}" src="{image-url}" />

Rules

  • {MODIFIER} is required and can have one of the style/modifier class names
  • You can change the shape of any element using mask class names
  • You can set custom sizes using w-* and h-*

menu

Menu is used to display a list of links vertically or horizontally

menu docs

Class names

  • component: menu
  • part: menu-title, menu-dropdown, menu-dropdown-toggle
  • modifier: menu-disabled, menu-active, menu-focus, menu-dropdown-show
  • size: menu-xs, menu-sm, menu-md, menu-lg, menu-xl
  • direction: menu-vertical, menu-horizontal

Syntax

Vertical menu:

<ul class="menu">
  <li><button>Item</button></li>
</ul>

Horizontal menu:

<ul class="menu menu-horizontal">
  <li><button>Item</button></li>
</ul>

Rules

  • {MODIFIER} is optional and can have one of the modifier/size/direction class names
  • Use lg:menu-horizontal for responsive layouts
  • Use menu-title for list item title
  • Use <details> tag to make submenus collapsible
  • Use menu-dropdown and menu-dropdown-toggle to toggle the dropdown using JS

mockup-browser

Browser mockup shows a box that looks like a browser window

mockup-browser docs

Class names

  • component: mockup-browser
  • part: mockup-browser-toolbar

Syntax

<div class="mockup-browser">
  <div class="mockup-browser-toolbar">
    {toolbar content}
  </div>
  <div>{CONTENT}</div>
</div>

Rules

  • For a default mockup, use just mockup-browser class name
  • To set a URL in toolbar, add a div with input class

mockup-code

Code mockup is used to show a block of code in a box that looks like a code editor

mockup-code docs

Class names

  • component: mockup-code

Syntax

<div class="mockup-code">
  <pre data-prefix="$"><code>npm i daisyui</code></pre>
</div>

Rules

  • Use <pre data-prefix="{prefix}"> to show a prefix before each line
  • Use <code> tag to add code syntax highlighting (requires additional library)
  • To highlight a line, add background/text color

mockup-phone

Phone mockup shows a mockup of an iPhone

mockup-phone docs

Class names

  • component: mockup-phone
  • part: mockup-phone-camera, mockup-phone-display

Syntax

<div class="mockup-phone">
  <div class="mockup-phone-camera"></div>
  <div class="mockup-phone-display">{CONTENT}</div>
</div>

Rules

  • Inside mockup-phone-display you can add anything

mockup-window

Window mockup shows a box that looks like an operating system window

mockup-window docs

Class names

  • component: mockup-window

Syntax

<div class="mockup-window">
  <div>{CONTENT}</div>
</div>

modal

Modal is used to show a dialog or a box when you click a button

modal docs

Class names

  • component: modal
  • part: modal-box, modal-action, modal-backdrop, modal-toggle
  • modifier: modal-open
  • placement: modal-top, modal-middle, modal-bottom, modal-start, modal-end

Syntax

Using HTML dialog element

<button onclick="my_modal.showModal()">Open modal</button>
<dialog id="my_modal" class="modal">
  <div class="modal-box">{CONTENT}</div>
  <form method="dialog" class="modal-backdrop"><button>close</button></form>
</dialog>

Using checkbox (legacy)

<label for="my-modal" class="btn">Open modal</label>
<input type="checkbox" id="my-modal" class="modal-toggle" />
<div class="modal">
  <div class="modal-box">{CONTENT}</div>
  <label class="modal-backdrop" for="my-modal">Close</label>
</div>

Using anchor links (legacy)

<a href="#my-modal" class="btn">Open modal</a>
<div class="modal" id="my-modal">
  <div class="modal-box">{CONTENT}</div>
</div>

Rules

  • {MODIFIER} is optional and can have one of the modifier/placement class names
  • Add tabindex="0" to make modal focusable
  • Use unique IDs for each modal
  • For HTML dialog element modals, add <form method="dialog"> for closing the modal with submit

navbar

Navbar is used to show a navigation bar on the top of the page

navbar docs

Class names

  • component: navbar
  • part: navbar-start, navbar-center, navbar-end

Syntax

<div class="navbar">{CONTENT}</div>

Rules

  • use navbar-start, navbar-center, navbar-end to position content horizontally
  • put anything inside each section
  • suggestion - use base-200 for background color

pagination

Pagination is a group of buttons

pagination docs

Class names

  • component: join
  • part: join-item
  • direction: join-vertical, join-horizontal

Syntax

<div class="join">{CONTENT}</div>

Rules

  • Use join-item for each button or link inside the pagination
  • Use btn class for styling pagination items

progress

Progress bar can be used to show the progress of a task or to show the passing of time

progress docs

Class names

  • component: progress
  • color: progress-neutral, progress-primary, progress-secondary, progress-accent, progress-info, progress-success, progress-warning, progress-error

Syntax

<progress class="progress {MODIFIER}" value="50" max="100"></progress>

Rules

  • {MODIFIER} is optional and can have one of the color class names
  • You must specify value and max attributes

radial-progress

Radial progress can be used to show the progress of a task or to show the passing of time

radial-progress docs

Class names

  • component: radial-progress

Syntax

<div class="radial-progress" style="--value:70;" aria-valuenow="70" role="progressbar">70%</div>

Rules

  • The --value CSS variable and text must be a number between 0 and 100
  • you need to add aria-valuenow="{value}", aria-valuenow={value} so screen readers can properly read value and also show that its a progress element to them
  • Use div instead of progress because browsers can't show text inside progress tag
  • Use --size for setting size (default 5rem) and --thickness to set how thick the indicator is

radio

Radio buttons allow the user to select one option

radio docs

Class names

  • component: radio
  • color: radio-neutral, radio-primary, radio-secondary, radio-accent, radio-success, radio-warning, radio-info, radio-error
  • size: radio-xs, radio-sm, radio-md, radio-lg, radio-xl

Syntax

<input type="radio" name="{name}" class="radio {MODIFIER}" />

Rules

  • {MODIFIER} is optional and can have one of the size/color class names
  • Replace {name} with a unique name for the radio group
  • Each set of radio inputs should have unique name attributes to avoid conflicts with other sets of radio inputs on the same page

range

Range slider is used to select a value by sliding a handle

range docs

Class names

  • component: range
  • color: range-neutral, range-primary, range-secondary, range-accent, range-success, range-warning, range-info, range-error
  • size: range-xs, range-sm, range-md, range-lg, range-xl

Syntax

<input type="range" min="0" max="100" value="40" class="range {MODIFIER}" />

Rules

  • {MODIFIER} is optional and can have one of each color/size class names
  • You must specify min and max attributes

rating

Rating is a set of radio buttons that allow the user to rate something

rating docs

Class names

  • component: rating
  • modifier: rating-half, rating-hidden
  • size: rating-xs, rating-sm, rating-md, rating-lg, rating-xl

Syntax

<div class="rating {MODIFIER}">
  <input type="radio" name="rating-1" class="mask mask-star" />
</div>

Rules

  • {MODIFIER} is optional and can have one of the modifier/size class names
  • Each set of rating inputs should have unique name attributes to avoid conflicts with other ratings on the same page
  • Add rating-hidden for the first radio to make it hidden so user can clear the rating

select

Select is used to pick a value from a list of options

select docs

Class names

  • component: select
  • style: select-ghost
  • color: select-neutral, select-primary, select-secondary, select-accent, select-info, select-success, select-warning, select-error
  • size: select-xs, select-sm, select-md, select-lg, select-xl

Syntax

<select class="select {MODIFIER}">
  <option>Option</option>
</select>

Rules

  • {MODIFIER} is optional and can have one of each style/color/size class names

skeleton

Skeleton is a component that can be used to show a loading state

skeleton docs

Class names

  • component: skeleton
  • modifier: skeleton-text

Syntax

<div class="skeleton"></div>

Example with text skeleton:

<div class="skeleton skeleton-text">Loading data...</div>

Rules

  • Add h-* and w-* utility classes to set height and width

stack

Stack visually puts elements on top of each other

stack docs

Class Names:

  • Component: stack
  • Modifier: stack-top, stack-bottom, stack-start, stack-end

Syntax

<div class="stack {MODIFIER}">{CONTENT}</div>

Rules

  • {MODIFIER} is optional and can have one of the modifier class names
  • You can use w-* and h-* classes to set the width and height of the stack, making all items the same size

stat

Stat is used to show numbers and data in a block

stat docs

Class names

  • Component: stats
  • Part: stat, stat-title, stat-value, stat-desc, stat-figure, stat-actions
  • Direction: stats-horizontal, stats-vertical

Syntax

<div class="stats {MODIFIER}">
  <div class="stat">{CONTENT}</div>
</div>

Rules

  • {MODIFIER} is optional and can have one of the direction class names
  • It's horizontal by default but you can make it vertical with the stats-vertical class
  • Content includes stat-title, stat-value, stat-desc inside a stat

status

Status is a really small icon to visually show the current status of an element, like online, offline, error, etc

status docs

Class Names:

  • Component: status
  • Color: status-neutral, status-primary, status-secondary, status-accent, status-info, status-success, status-warning, status-error
  • Size: status-xs, status-sm, status-md, status-lg, status-xl

Syntax

<span class="status {MODIFIER}"></span>

Rules

  • {MODIFIER} is optional and can have one of the color/size class names
  • This component does not render anything visible

steps

Steps can be used to show a list of steps in a process

steps docs

Class Names:

  • Component: steps
  • Part: step, step-icon
  • Color: step-neutral, step-primary, step-secondary, step-accent, step-info, step-success, step-warning, step-error
  • Direction: steps-vertical, steps-horizontal

Syntax

<ul class="steps {MODIFIER}">
  <li class="step">{step content}</li>
</ul>

Rules

  • {MODIFIER} is optional and can have one of each direction/color class names
  • To make a step active, add the step-primary class
  • You can add an icon in each step using step-icon class
  • To display data in data-content ,use data-content="{value}" at the <li>

swap

Swap allows you to toggle the visibility of two elements using a checkbox or a class name

swap docs

Class Names:

  • Component: swap
  • Part: swap-on, swap-off, swap-indeterminate
  • Modifier: swap-active
  • Style: swap-rotate, swap-flip

Syntax

Using checkbox

<label class="swap {MODIFIER}">
  <input type="checkbox" />
  <div class="swap-on">{content when active}</div>
  <div class="swap-off">{content when inactive}</div>
</label>

Using class name

<div class="swap {MODIFIER}">
  <div class="swap-on">{content when active}</div>
  <div class="swap-off">{content when inactive}</div>
</div>

Rules

  • {MODIFIER} is optional and can have one of the modifier/style class names
  • Use only a hidden checkbox to control swap state or add/remove the swap-active class using JS to control state
  • To show something when the checkbox is indeterminate, use swap-indeterminate class

tab

Tabs can be used to show a list of links in a tabbed format

tab docs

Class Names:

  • Component: tabs
  • Part: tab, tab-content
  • Style: tabs-box, tabs-border, tabs-lift
  • Modifier: tab-active, tab-disabled
  • Placement: tabs-top, tabs-bottom

Syntax

Using buttons:

<div role="tablist" class="tabs {MODIFIER}">
  <button role="tab" class="tab">Tab</button>
</div>

Using radio inputs:

<div role="tablist" class="tabs tabs-box">
  <input type="radio" name="my_tabs" class="tab" aria-label="Tab" />
</div>

Rules

  • {MODIFIER} is optional and can have one of the style/size class names
  • Radio inputs are needed for tab content to work with tab click
  • If tabs gets a background then every tab inside it becomes rounded from both top corners

table

Table can be used to show a list of data in a table format

table docs

Class Names:

  • Component: table
  • Modifier: table-zebra, table-pin-rows, table-pin-cols
  • Size: table-xs, table-sm, table-md, table-lg, table-xl

Syntax

<div class="overflow-x-auto">
  <table class="table {MODIFIER}">
    <thead>
      <tr>
        <th></th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <th></th>
      </tr>
    </tbody>
  </table>
</div>

Rules

  • {MODIFIER} is optional and can have one of each modifier/size class names
  • The overflow-x-auto class is added to the wrapper div to make the table horizontally scrollable on smaller screens

text-rotate

Text Rotate can show up to 6 lines of text, one at a time, with a an infinite loop animation. Duration is 10 seconds by default. The animation will pause on hover.

textarea docs

Class Names:

  • Component: text-rotate

Syntax

<span class="text-rotate">
  <span>
    <span>Word 1</span>
    <span>Word 2</span>
    <span>Word 3</span>
    <span>Word 4</span>
    <span>Word 5</span>
    <span>Word 6</span>
  </span>
</span>

Example: Big font size, horizontally centered

<span class="text-rotate max-md:text-3xl text-7xl font-title">
  <span class="justify-items-center">
    <span>DESIGN</span>
    <span>DEVELOP</span>
    <span>DEPLOY</span>
    <span>SCALE</span>
    <span>MAINTAIN</span>
    <span>REPEAT</span>
  </span>
</span>

Rotating words in a sentence, different colors for each word

<span>
  Providing AI Agents for 
  <span class="text-rotate">
    <span>
      <span class="bg-teal-400 text-teal-800 px-2">Designers</span>
      <span class="bg-red-400 text-red-800 px-2">Developers</span>
      <span class="bg-blue-400 text-blue-800 px-2">Managers</span>
    </span>
  </span>
</span>

Custom line height in case you have a tall font or need more vertical spacing between lines

<span class="text-rotate max-md:text-3xl text-7xl font-title leading-[2]">
  <span class="justify-items-center">
    <span>📐 DESIGN</span>
    <span>⌨️ DEVELOP</span>
    <span>🌎 DEPLOY</span>
    <span>🌱 SCALE</span>
    <span>🔧 MAINTAIN</span>
    <span>♻️ REPEAT</span>
  </span>
</span>

Rules

  • text-rotate must have one span or div inside it that contains 2 to 6 spans/divs for each line of text
  • Total duration of the loop is 10000 milliseconds by default
  • You can set custom duration using duration-{value} utility class, where value is in milliseconds (e.g. duration-12000 for 12 seconds)

textarea

Textarea allows users to enter text in multiple lines

textarea docs

Class Names:

  • Component: textarea
  • Style: textarea-ghost
  • Color: textarea-neutral, textarea-primary, textarea-secondary, textarea-accent, textarea-info, textarea-success, textarea-warning, textarea-error
  • Size: textarea-xs, textarea-sm, textarea-md, textarea-lg, textarea-xl

Syntax

<textarea class="textarea {MODIFIER}" placeholder="Bio"></textarea>

Rules

  • {MODIFIER} is optional and can have one of each style/color/size class names

theme-controller

If a checked checkbox input or a checked radio input with theme-controller class exists in the page, The page will have the same theme as that input's value

theme-controller docs

Class names

  • component: theme-controller

Syntax

<input type="checkbox" value="{theme-name}" class="theme-controller" />

Rules

  • The value attribute of the input element should be a valid daisyUI theme name

timeline

Timeline component shows a list of events in chronological order

timeline docs

Class Names:

  • Component: timeline
  • Part: timeline-start, timeline-middle, timeline-end
  • Modifier: timeline-snap-icon, timeline-box, timeline-compact
  • Direction: timeline-vertical, timeline-horizontal

Syntax

<ul class="timeline {MODIFIER}">
  <li>
    <div class="timeline-start">{start}</div>
    <div class="timeline-middle">{icon}</div>
    <div class="timeline-end">{end}</div>
  </li>
</ul>

Rules

  • {MODIFIER} is optional and can have one of the modifier/direction class names
  • To make a vertical timeline, add the timeline-vertical class to the ul element or just do nothing (because its the default style.)
  • Add timeline-snap-icon to snap the icon to the start instead of middle
  • Add the timeline-compact class to force all items on one side

toast

Toast is a wrapper to stack elements, positioned on the corner of page

toast docs

Class Names:

  • Component: toast
  • Placement: toast-start, toast-center, toast-end, toast-top, toast-middle, toast-bottom

Syntax

<div class="toast {MODIFIER}">{CONTENT}</div>

Rules

  • {MODIFIER} is optional and can have one of the placement class names

toggle

Toggle is a checkbox that is styled to look like a switch button

toggle docs

Class Names:

  • Component: toggle
  • Color: toggle-primary, toggle-secondary, toggle-accent, toggle-neutral, toggle-success, toggle-warning, toggle-info, toggle-error
  • Size: toggle-xs, toggle-sm, toggle-md, toggle-lg, toggle-xl

Syntax

<input type="checkbox" class="toggle {MODIFIER}" />

Rules

  • {MODIFIER} is optional and can have one of each color/size class names

validator

Validator class changes the color of form elements to error or success based on input's validation rules

validator docs

Class names

  • component: validator
  • part: validator-hint

Syntax

<input type="{type}" class="input validator" required />
<p class="validator-hint">Error message</p>

Rules

  • Use with input, select, textarea