GitHub

Details

Collapsible disclosure widget with htmx lazy loading.

<rhx-details>

Examples

Basic

What is htmxRazor?

htmxRazor is an ASP.NET Core component library built with Razor Tag Helpers and first-class htmx integration.

Open by Default

System Requirements
  • .NET 9.0 or later
  • ASP.NET Core Razor Pages or MVC
  • Any modern browser

Multiple (FAQ)

How do I install htmxRazor?

Add the NuGet package to your project and register the tag helpers in _ViewImports.cshtml.

Does it work with htmx?

Yes! Every component supports hx-get, hx-post, hx-trigger, hx-target, and hx-swap attributes.

Is it accessible?

htmxRazor uses semantic HTML, ARIA attributes, and keyboard navigation throughout all components.

Disabled

Locked Section

This content cannot be accessed.

htmx Lazy Load

Load Order History

Properties

Property Type Default Description
rhx-summary string - The text shown in the clickable summary/header
rhx-open bool false Whether the details starts expanded
rhx-disabled bool false Prevents toggling

Accessibility

  • Uses native <details> and <summary> elements for built-in browser accessibility.
  • Keyboard users can toggle with Enter or Space when the summary is focused.
  • Disabled state prevents keyboard and pointer interaction.
  • Screen readers announce the expanded/collapsed state automatically.