Soenneker.Quark.Gen.Presets 4.0.31

Prefix Reserved
dotnet add package Soenneker.Quark.Gen.Presets --version 4.0.31
                    
NuGet\Install-Package Soenneker.Quark.Gen.Presets -Version 4.0.31
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Quark.Gen.Presets" Version="4.0.31">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Quark.Gen.Presets" Version="4.0.31" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Quark.Gen.Presets">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Quark.Gen.Presets --version 4.0.31
                    
#r "nuget: Soenneker.Quark.Gen.Presets, 4.0.31"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Quark.Gen.Presets@4.0.31
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Quark.Gen.Presets&version=4.0.31
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Quark.Gen.Presets&version=4.0.31
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.Quark.Gen.Presets

Generates strongly typed QuarkPresets registry members from attributed preset classes.

Use this when authoring a preset registry. Applications using Quark's existing presets already receive those tokens with the suite; they do not need this generator just to set Preset="QuarkPresets.ContainerWrapper". For ordinary application styling, start with the Quark properties guide.

Install

dotnet add package Soenneker.Quark.Gen.Presets

Usage

Define a preset in a project that references the Quark preset APIs:

using Soenneker.Quark;

[QuarkPreset("card")]
public sealed class CardPreset : QuarkPreset
{
    public override void Apply(QuarkPresetContext context)
    {
        context.Padding = Padding.Is4;
        context.Rounded = Rounded.Lg;
        context.Class = "card";
    }
}

The generator adds a token named after the class with the Preset suffix removed:

<Div Preset="QuarkPresets.Card" />

The attribute value becomes the token’s runtime name (card in this example). The generated registry creates the preset lazily and reuses that instance whenever the token is applied.

QuarkPresets.ContainerWrapper is always generated as the built-in centered container preset.

Naming

CardPreset generates QuarkPresets.Card. Preset class names must produce unique registry member names and cannot produce the reserved name ContainerWrapper; the generator reports QGP001 when names collide.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.31 280 10/14/2026
4.0.29 110 10/14/2026
4.0.28 94 10/14/2026
4.0.23 95 10/12/2026
4.0.22 82 10/12/2026
4.0.21 127 10/11/2026
4.0.20 239 10/7/2026
4.0.19 87 10/6/2026
4.0.18 179 10/2/2026
4.0.17 741 9/15/2026
4.0.16 299 9/13/2026
4.0.15 112 9/12/2026
4.0.14 721 8/30/2026
4.0.13 141 8/29/2026
4.0.12 111 8/29/2026
4.0.11 584 8/18/2026
4.0.10 360 8/9/2026
4.0.9 622 7/27/2026
4.0.8 826 7/16/2026
4.0.7 580 7/2/2026
Loading failed

Updated Microsoft.CodeAnalysis.CSharp to 5.9.0