Skip to content

Feature: Add CssPath parameter to RadzenTheme #2354

@franklupo

Description

@franklupo

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

When using <RadzenTheme> with custom themes in Razor Class Library (RCL) scenarios, there's no way to specify where the CSS files are located. The component hardcodes the CSS path to /css/ for non-embedded themes, causing 404 errors when CSS files are served from a different location (e.g., _content/MyPackage/css/).

Describe the solution you'd like

Add a CssPath parameter to the RadzenTheme component to allow specifying a custom CSS directory for custom themes:

<RadzenTheme Theme="mytheme" 
             Wcag="true" 
             CssPath="_content/MyPackage/css" />

This would allow RCL authors to bundle custom theme CSS files in their package and specify where they're located.

[Parameter] public string? CssPath { get; set; }

private string Path => Embedded 
    ? "_content/Radzen.Blazor/css" 
    : (!string.IsNullOrEmpty(CssPath) ? CssPath : "css");

Best regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions