Class HtmxV1Config
- Namespace
- Ramstack.HtmxToolkit.Configuration
- Assembly
- Ramstack.HtmxToolkit.dll
Represents the configuration for HTMX 1.9.x.
public sealed class HtmxV1Config : HtmxConfig
- Inheritance
-
HtmxV1Config
- Inherited Members
Properties
AddedClass
Gets or sets the class added to new content before it is swapped in
and removed after the content settles.
The HTMX default is htmx-added.
public string? AddedClass { get; set; }
Property Value
AllowEval
Gets or sets a value indicating whether the use of eval is allowed.
The HTMX default is true.
public bool? AllowEval { get; set; }
Property Value
- bool?
AllowScriptTags
Gets or sets a value indicating whether <script> tags should be processed in new content.
The HTMX default is true.
public bool? AllowScriptTags { get; set; }
Property Value
- bool?
AttributesToSettle
Gets or sets the attributes to settle during the settling phase.
The HTMX default is ["class", "style", "width", "height"].
public IReadOnlyList<string>? AttributesToSettle { get; set; }
Property Value
DefaultFocusScroll
Gets or sets a value indicating whether the focused element should be scrolled into view. The HTMX default is false.
public bool? DefaultFocusScroll { get; set; }
Property Value
- bool?
Remarks
The focus-scroll swap modifier overrides this setting.
DefaultSettleDelay
Gets or sets the default settle delay in milliseconds.
The HTMX default is 20.
public int? DefaultSettleDelay { get; set; }
Property Value
- int?
DefaultSwapDelay
Gets or sets the default swap delay in milliseconds.
The HTMX default is 0.
public int? DefaultSwapDelay { get; set; }
Property Value
- int?
DefaultSwapStyle
Gets or sets the default swap style. The HTMX default is InnerHtml.
[JsonConverter(typeof(HtmxSwapJsonConverter))]
public HtmxSwap? DefaultSwapStyle { get; set; }
Property Value
DisableSelector
Gets or sets the selector for elements that HTMX must not process.
The HTMX default is [hx-disable], [data-hx-disable].
public string? DisableSelector { get; set; }
Property Value
GetCacheBusterParam
Gets or sets a value indicating whether GET requests use a cache-busting parameter.
The HTMX default is false.
public bool? GetCacheBusterParam { get; set; }
Property Value
- bool?
GlobalViewTransitions
Gets or sets a value indicating whether the View Transition API should be used for swaps. The HTMX default is false.
public bool? GlobalViewTransitions { get; set; }
Property Value
- bool?
HistoryCacheSize
Gets or sets the size of the history cache.
The HTMX default is 10.
public int? HistoryCacheSize { get; set; }
Property Value
- int?
HistoryEnabled
Gets or sets a value indicating whether HTMX history support is enabled. The HTMX default is true.
public bool? HistoryEnabled { get; set; }
Property Value
- bool?
IgnoreTitle
Gets or sets a value indicating whether document titles found in new content are ignored. The HTMX default is false.
public bool? IgnoreTitle { get; set; }
Property Value
- bool?
IncludeIndicatorStyles
Gets or sets a value indicating whether the indicator styles are loaded. The HTMX default is true.
public bool? IncludeIndicatorStyles { get; set; }
Property Value
- bool?
IndicatorClass
Gets or sets the class that marks request indicators.
The HTMX default is htmx-indicator.
public string? IndicatorClass { get; set; }
Property Value
Remarks
The indicator styles show these elements only while they or one of their ancestors have the class specified by RequestClass.
InlineScriptNonce
Gets or sets the nonce added to inline scripts. The HTMX default is an empty string.
public string? InlineScriptNonce { get; set; }
Property Value
MethodsThatUseUrlParams
Gets or sets the HTTP methods that use URL parameters.
The HTMX default is ["get"].
[JsonConverter(typeof(HtmxHttpVerbListJsonConverter))]
public IReadOnlyList<HtmxHttpVerb>? MethodsThatUseUrlParams { get; set; }
Property Value
RefreshOnHistoryMiss
Gets or sets a value indicating whether a history miss causes a full-page refresh instead of an AJAX request. The HTMX default is false.
public bool? RefreshOnHistoryMiss { get; set; }
Property Value
- bool?
RequestClass
Gets or sets the class added to the elements specified by hx-indicator,
or to the requesting element itself, while a request is in flight.
The HTMX default is htmx-request.
public string? RequestClass { get; set; }
Property Value
ScrollBehavior
Gets or sets the scrolling behavior used by the show modifier of hx-swap.
The HTMX default is Smooth.
[JsonConverter(typeof(HtmxScrollBehaviorJsonConverter))]
public HtmxScrollBehavior? ScrollBehavior { get; set; }
Property Value
ScrollIntoViewOnBoost
Gets or sets a value indicating whether boosted targets are scrolled into the viewport. The HTMX default is true.
public bool? ScrollIntoViewOnBoost { get; set; }
Property Value
- bool?
SelfRequestsOnly
Gets or sets a value indicating whether requests are restricted to the current origin. The HTMX default is false.
public bool? SelfRequestsOnly { get; set; }
Property Value
- bool?
SettlingClass
Gets or sets the class added to the target after content is swapped
and removed after the content settles.
The HTMX default is htmx-settling.
public string? SettlingClass { get; set; }
Property Value
SwappingClass
Gets or sets the class added to the target before content is swapped
and removed after the swap.
The HTMX default is htmx-swapping.
public string? SwappingClass { get; set; }
Property Value
Timeout
Gets or sets the request timeout in milliseconds.
The HTMX default is 0.
public int? Timeout { get; set; }
Property Value
- int?
TriggerSpecsCacheEnabled
Gets or sets a value indicating whether parsed trigger specifications use a never-clearing cache. The HTMX default is false.
[JsonPropertyName("triggerSpecsCache")]
[JsonConverter(typeof(HtmxTriggerSpecsCacheJsonConverter))]
public bool? TriggerSpecsCacheEnabled { get; set; }
Property Value
- bool?
UseTemplateFragments
Gets or sets a value indicating whether HTML <template> tags are used to parse content.
The HTMX default is false.
public bool? UseTemplateFragments { get; set; }
Property Value
- bool?
WithCredentials
Gets or sets a value indicating whether credentials are included in cross-origin requests. The HTMX default is false.
public bool? WithCredentials { get; set; }
Property Value
- bool?
WsBinaryType
Gets or sets the type of binary data received over WebSocket connections. The HTMX default is Blob.
[JsonConverter(typeof(HtmxBinaryTypeJsonConverter))]
public HtmxBinaryType? WsBinaryType { get; set; }
Property Value
Remarks
Used by the HTMX WebSocket extension and the legacy hx-ws attribute.