geoview-core - v2.2.0
    Preparing search index...

    Variable AccordionConst

    Accordion: (props: AccordionProps) => ReactNode = AccordionUI

    Type Declaration

      • (props: AccordionProps): ReactNode
      • Customizable accordion component with expandable sections and optional loading states.

        Wraps Material-UI's Accordion to provide collapsible content sections with loading animation support. Manages individual section states internally and renders a loading spinner icon during transitions when showLoadingIcon is enabled. Useful for hierarchical information display and progressive content disclosure.

        Parameters

        • props: AccordionProps

          Accordion configuration (see AccordionProps interface)

        Returns ReactNode

        Rendered accordion with expandable sections

        // Basic usage
        <Accordion
        id="my-accordion"
        items={[
        { title: "Section 1", content: <div>Content 1</div> },
        { title: "Section 2", content: <div>Content 2</div> }
        ]}
        />

        // With loading icon and default expanded
        <Accordion
        id="loading-accordion"
        items={items}
        showLoadingIcon={true}
        defaultExpanded={true}
        sx={{ maxWidth: '500px' }}
        />

        // With custom styling
        <Accordion
        id="styled-accordion"
        items={items}
        className="custom-accordion"
        sx={{
        backgroundColor: '#f5f5f5',
        borderRadius: '8px'
        }}
        />