-
Notifications
You must be signed in to change notification settings - Fork 215
Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
In Visual Studio and other IDEs, when I type <div class="...">
, I get nice Intellisense for the class
attribute.
I'd love to see similar Intellisense support for CSS-style Razor component parameters like <QuickGrid Class="..." />
.
Describe the solution you'd like
Something like (+ corresponding support in IDE):
[StringSyntax(StringSyntax.CssClass)]
[Parameter] public string? Class { get; set; }
This approach is already used for XML, Regex, JSON, ...
Additional context
I'm the maintainer of HAVIT Blazor, and almost all our components have CssClass
parameters (and often additional ones like ItemCssClass
, HeaderCssClass
, BodyCssClass
, etc.).
It's a real pain point for our users that they don't get the same Intellisense for these parameters as they do for the standard HTML class
attribute.
And it's definitely not just us - most component libraries have similar parameters: FluentUI, MudBlazor, you name it.