Skip to content

Allow setting prefix/suffix for the value added to the element's dataset similarly to the class #324

@nash403

Description

@nash403

Is your feature request related to a problem? Please describe.

I have a custom name for my daisyUI light theme and dark theme hnzelight & hnzedark, but the injected data-theme="..." is either dark or light. This prevents daisyUI to detect the appropriate theme. If I could add hnze as prefix, that would fix my problem. My alternative is to rename my light and dark themes to light and dark.

Describe the solution you'd like

Add a dataValuePrefix and dataValueSuffix as an configuration option and concatenate those with the value of the detected theme.

Allowing to pass a function could also add even more flexibility but that may be overkill.

Describe alternatives you've considered

My alternative is to rename my light and dark themes to light and dark for daisyUI.

Additional context

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions