diff --git a/docs/README.md b/docs/README.md index a935133..56c1cf1 100644 --- a/docs/README.md +++ b/docs/README.md @@ -63,6 +63,14 @@ Complete card system for organizing content. - Modular components (header, body, footer, etc.) - Support for images and icons +#### [Dropdown](components/dropdown.md) +Collapsible dropdown menu anchored to an activator button. +- Four opening directions (down, up, start, end) +- Dark menu color theme and full-width mode +- Custom activator template with full keyboard accessibility +- Active, disabled, and large-size item variants +- No JavaScript interop required + #### [Modal](components/modal.md) Modal dialog component for displaying content in an overlay. - Accessible dialog overlay diff --git a/docs/components/dropdown.md b/docs/components/dropdown.md new file mode 100644 index 0000000..faa570a --- /dev/null +++ b/docs/components/dropdown.md @@ -0,0 +1,325 @@ +# BitDropdown + +The `BitDropdown` component provides a [dropdown menu using Bootstrap Italia styles](https://italia.github.io/bootstrap-italia/docs/componenti/dropdown/). + +## Namespace + +```csharp +BitBlazor.Components +``` + +## Description + +`BitDropdown` renders a collapsible menu anchored to an activator button. Opening, closing, and full keyboard navigation are managed entirely in Blazor — no JavaScript interop is required. The menu can be positioned in four directions, styled with a dark color theme, and expanded to full container width. Individual `BitDropdownItem` components support navigation links, click callbacks, active highlighting, and disabled states. + +A custom `ActivatorTemplate` can replace the built-in toggle button with any element while retaining the complete keyboard interaction model. + +## Components + +| Component | Description | +|-----------|-------------| +| `BitDropdown` | Root container. Renders the activator and the collapsible menu; orchestrates open/close state and keyboard focus | +| `BitDropdownItem` | A single menu entry rendered as a `