diff --git a/docs/data/base/components/collapsible/CssAnimatedCollapsible.js b/docs/data/base/components/collapsible/CssAnimatedCollapsible.js new file mode 100644 index 0000000000..55e13848d7 --- /dev/null +++ b/docs/data/base/components/collapsible/CssAnimatedCollapsible.js @@ -0,0 +1,138 @@ +import * as React from 'react'; +import { useTheme } from '@mui/system'; +import * as Collapsible from '@base_ui/react/Collapsible'; + +export default function CssAnimatedCollapsible() { + const [open, setOpen] = React.useState(true); + return ( +
This is the collapsed content
+This is the second paragraph
+This is a longer sentence and also the third paragraph
+This is the collapsed content
+This is the second paragraph
+This is a longer sentence and also the third paragraph
++ This is the collapsed content. The element that shows and hides the + content has role button +
++ When the content is visible, the element with role `button` has + `aria-expanded` set to `true` +
+When the content area is hidden, it is set to `false`
++ Optionally, the element with role `button` has a value specified for + `aria-controls` that refers to the element that contains all the content + that is shown or hidden +
++ This is the collapsed content. The element that shows and hides the + content has role button +
++ When the content is visible, the element with role `button` has + `aria-expanded` set to `true` +
+When the content area is hidden, it is set to `false`
++ Optionally, the element with role `button` has a value specified for + `aria-controls` that refers to the element that contains all the content + that is shown or hidden +
+This is the collapsed content
++ Your Choice of Fried Chicken (Half), Chicken Sandwich, With Shredded cabbage & carrot + with mustard mayonnaise And Potato Wedges +
+demo: https://codepen.io/aardrian/pen/QWjBNQG
+https://adrianroselli.com/2020/05/disclosure-widgets.html