You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/components/accordion.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -270,6 +270,25 @@ Disable specific items with the `disabled` prop:
270
270
</Accordion.Root>
271
271
```
272
272
273
+
### Hidden Until Found
274
+
275
+
The `hiddenUntilFound` prop enables browser search functionality within collapsed accordion content. When enabled, collapsed content is marked with `hidden="until-found"`, allowing browsers to automatically expand accordion items when users search for text within them.
@@ -26,6 +26,7 @@ The Collapsible component enables you to create expandable and collapsible conte
26
26
-**Transition Support**: CSS variables and data attributes for smooth transitions between states.
27
27
-**Flexible State Management**: Supports controlled and uncontrolled state, take control if needed.
28
28
-**Compound Component Structure**: Provides a set of sub-components that work together to create a fully-featured collapsible.
29
+
-**Hidden Until Found**: Support for the `hidden="until-found"` attribute for browser search integration.
29
30
30
31
## Architecture
31
32
@@ -218,4 +219,37 @@ You can then use the `MyCollapsibleContent` component alongside the other `Colla
218
219
</Collapsible.Root>
219
220
```
220
221
222
+
## Hidden Until Found
223
+
224
+
The `hiddenUntilFound` prop enables integration with the browser's find-in-page functionality. When enabled, the collapsible content is marked with `hidden="until-found"`, which allows browsers to automatically expand collapsed content when users search for text within it.
description: "The accordion item content, which is displayed when the item is open.",
132
132
props: {
133
133
forceMount: forceMountProp,
134
+
hiddenUntilFound: defineBooleanProp({
135
+
description:
136
+
"Whether the content should use `hidden='until-found'` when closed. This allows browsers to search within collapsed content and automatically expand the accordion item when matches are found.",
description: "The content displayed when the collapsible is open.",
85
85
props: {
86
86
forceMount: forceMountProp,
87
+
hiddenUntilFound: defineBooleanProp({
88
+
default: false,
89
+
description:
90
+
'When true, the content will be marked with `hidden="until-found"` when collapsed, allowing browsers to find and automatically expand the content during page searches.',
0 commit comments