ConsentWidget
An inline consent management widget for embedding in settings or privacy pages. Shows category toggles with accordion layout.
ConsentWidget is a standalone, inline consent management widget. Unlike ConsentDialog (which is a modal), the widget embeds directly in your page layout - ideal for privacy settings pages, account preferences, or any page where users should be able to manage consent without a modal overlay.
Basic Usage
Configuration
Accordion Behavior
Each consent category is rendered as an expandable accordion item. Clicking the category header expands it to show a description and any associated services. Users can toggle individual categories on or off using the switch control. The necessary category is always enabled and cannot be toggled.
Compound Components
Build fully custom widget layouts using sub-components:
ConsentWidget.Root— Theme context providerConsentWidget.Accordion— Radix-based accordion rootConsentWidget.AccordionItems— Auto-generates toggle items from consent configConsentWidget.AccordionItem— Individual category itemConsentWidget.AccordionTrigger— Clickable header for each itemConsentWidget.AccordionContent— Collapsible content areaConsentWidget.AccordionArrow— Expand/collapse indicatorConsentWidget.Switch— Category toggle switchConsentWidget.Footer— Footer containerConsentWidget.FooterSubGroup— Groups related buttonsConsentWidget.AcceptAllButton— Accepts all consentConsentWidget.RejectButton— Rejects all consentConsentWidget.SaveButton— Saves custom selections