# Card

- Page: https://jiguang132.com/resources/material-ui/docs/cards
- Resource: Material UI (https://jiguang132.com/resources/material-ui.md)
- All guides: https://jiguang132.com/resources/material-ui/docs.md

Group related content, media and explicit primary or secondary actions.

This guide covers Material UI Core with the default Emotion engine; extensions and additional demos are explicitly classified.

## Use case and business boundary

Cards do not fetch data; avoid nesting competing interactive elements inside one clickable primary action.

## Native composition and scope

`Card`, `CardActionArea`, `CardActions`, `CardContent`, `CardHeader`, `CardMedia`, `Collapse`, `Paper`

Preserve native Material UI composition and types; do not substitute JGuang UI/Base UI/Radix APIs. Example entries are not extra components.

## Native installation and initialization

```bash
npm install @mui/material@9.4.0 @emotion/react@11.14.0 @emotion/styled@11.14.1
```

Use native npm and Emotion, not an invented JGuang UI Registry URL. Place examples inside native ThemeProvider; choose CssBaseline or ScopedCssBaseline for the project. Inspect React, existing providers, lockfile and SSR first. Never overwrite files or conceal peer conflicts. This batch verified React 19.2.8; React 18 and below require matching react-is. See the included bilingual setup guide.

## Practical native parameters

These selected parameters are not a flattened universal API. Preserve the native declaring owner, slot structure, nullable values and generics.

| Owner.prop | Practical role | Declaration source |
| --- | --- | --- |
| `Card.variant` | Owning native presentation enum; never substitute a universal variant prop. | `Paper` |
| `CardActionArea.component` | Rendered native element/component type; preserve valid semantics and refs. | `ButtonBase` |
| `CardMedia.component` | Rendered native element/component type; preserve valid semantics and refs. | `CardMedia` |
| `CardMedia.image` | CardMedia image source; use the correct media element and fallback. | `CardMedia` |

## Runnable native examples

Machine keys select example entries, not universal variant props. Native demo JSX/data stay unchanged; JGuang-authored acceptance fixtures are explicitly labelled.

- Introduction · `BasicCard` · upstream native demo
- Outlined Card · `OutlinedCard` · upstream native demo
- Complex Interaction · `RecipeReviewCard` · upstream native demo
- Media · `MediaCard` · upstream native demo
- Media · `ImgMediaCard` · upstream native demo
- Primary action · `ActionAreaCard` · upstream native demo
- Primary action · `MultiActionAreaCard` · upstream native demo
- UI Controls · `MediaControlCard` · upstream native demo
- Active state styles · `SelectActionCard` · upstream native demo

## Actual usage example

Unmodified pinned native demo; copy its required local helper files together.

```tsx
import Box from '@mui/material/Box';
import Card from '@mui/material/Card';
import CardActions from '@mui/material/CardActions';
import CardContent from '@mui/material/CardContent';
import Button from '@mui/material/Button';
import Typography from '@mui/material/Typography';

const bull = (
  <Box
    component="span"
    sx={{ display: 'inline-block', mx: '2px', transform: 'scale(0.8)' }}
  >
    •
  </Box>
);

export default function BasicCard() {
  return (
    <Card sx={{ minWidth: 275 }}>
      <CardContent>
        <Typography gutterBottom sx={{ color: 'text.secondary', fontSize: 14 }}>
          Word of the Day
        </Typography>
        <Typography variant="h5" component="div">
          be{bull}nev{bull}o{bull}lent
        </Typography>
        <Typography sx={{ color: 'text.secondary', mb: 1.5 }}>adjective</Typography>
        <Typography variant="body2">
          well meaning and kindly.
          <br />
          {'"a benevolent smile"'}
        </Typography>
      </CardContent>
      <CardActions>
        <Button size="small">Learn More</Button>
      </CardActions>
    </Card>
  );
}

```

## Example dependency boundaries

`@mui/material/Box`, `@mui/material/Card`, `@mui/material/CardActions`, `@mui/material/CardContent`, `@mui/material/Button`, `@mui/material/Typography`, `react`, `@mui/material/styles`, `@mui/material/CardHeader`, `@mui/material/CardMedia`, `@mui/material/Collapse`, `@mui/material/Avatar`, `@mui/material/IconButton`, `@mui/material/colors`, `@mui/icons-material/Favorite`, `@mui/icons-material/Share`, `@mui/icons-material/ExpandMore`, `@mui/icons-material/MoreVert`, `@mui/material/CardActionArea`, `@mui/icons-material/SkipPrevious`, `@mui/icons-material/PlayArrow`, `@mui/icons-material/SkipNext`

Direct Icons/System/Utils example imports require their matching 9.4.0 packages. Relative data/helpers are part of the example closure, not extra components. Remote images and simulated operations do not supply a backend.

## Pinned upstream API metadata reference

These tables retain the upstream metadata, not a newly inferred generic type system. Conditional generics, inherited props and callback details are defined by the source declarations below. Theme defaults may override metadata defaults.

### Card

```tsx
import Card from '@mui/material/Card';
import { Card } from '@mui/material';
```

Native inheritance: `Paper`. Parent/DOM props are not fabricated as additional own props.

| Prop | Required | Upstream metadata type / constraint | Metadata default |
| --- | --- | --- | --- |
| `children` | no | `node` | — |
| `classes` | no | `object` | — |
| `raised` | no | `bool` | `false` |
| `sx` | no | `Array<func \| object \| bool> \| func \| object` | — |



### CardActionArea

```tsx
import CardActionArea from '@mui/material/CardActionArea';
import { CardActionArea } from '@mui/material';
```

Native inheritance: `ButtonBase`. Parent/DOM props are not fabricated as additional own props.

| Prop | Required | Upstream metadata type / constraint | Metadata default |
| --- | --- | --- | --- |
| `children` | no | `node` | — |
| `classes` | no | `object` | — |
| `slotProps` | no | `{ focusHighlight?: func \| object, root?: func \| object }` | `{}` |
| `slots` | no | `{ focusHighlight?: elementType, root?: elementType }` | `{}` |
| `sx` | no | `Array<func \| object \| bool> \| func \| object` | — |



### CardActions

```tsx
import CardActions from '@mui/material/CardActions';
import { CardActions } from '@mui/material';
```

| Prop | Required | Upstream metadata type / constraint | Metadata default |
| --- | --- | --- | --- |
| `children` | no | `node` | — |
| `classes` | no | `object` | — |
| `disableSpacing` | no | `bool` | `false` |
| `sx` | no | `Array<func \| object \| bool> \| func \| object` | — |



### CardContent

```tsx
import CardContent from '@mui/material/CardContent';
import { CardContent } from '@mui/material';
```

| Prop | Required | Upstream metadata type / constraint | Metadata default |
| --- | --- | --- | --- |
| `children` | no | `node` | — |
| `classes` | no | `object` | — |
| `component` | no | `elementType` | — |
| `sx` | no | `Array<func \| object \| bool> \| func \| object` | — |



### CardHeader

```tsx
import CardHeader from '@mui/material/CardHeader';
import { CardHeader } from '@mui/material';
```

| Prop | Required | Upstream metadata type / constraint | Metadata default |
| --- | --- | --- | --- |
| `action` | no | `node` | — |
| `avatar` | no | `node` | — |
| `classes` | no | `object` | — |
| `component` | no | `elementType` | — |
| `disableTypography` | no | `bool` | `false` |
| `slotProps` | no | `{ action?: func \| object, avatar?: func \| object, content?: func \| object, root?: func \| object, subheader?: func \| object, title?: func \| object }` | `{}` |
| `slots` | no | `{ action?: elementType, avatar?: elementType, content?: elementType, root?: elementType, subheader?: elementType, title?: elementType }` | `{}` |
| `subheader` | no | `node` | — |
| `sx` | no | `Array<func \| object \| bool> \| func \| object` | — |
| `title` | no | `node` | — |



### CardMedia

```tsx
import CardMedia from '@mui/material/CardMedia';
import { CardMedia } from '@mui/material';
```

| Prop | Required | Upstream metadata type / constraint | Metadata default |
| --- | --- | --- | --- |
| `children` | no | `node` | — |
| `classes` | no | `object` | — |
| `component` | no | `elementType` | — |
| `image` | no | `string` | — |
| `src` | no | `string` | — |
| `sx` | no | `Array<func \| object \| bool> \| func \| object` | — |



### Collapse

```tsx
import Collapse from '@mui/material/Collapse';
import { Collapse } from '@mui/material';
```

Native inheritance: `Transition`. Parent/DOM props are not fabricated as additional own props.

| Prop | Required | Upstream metadata type / constraint | Metadata default |
| --- | --- | --- | --- |
| `addEndListener` | no | `func` | — |
| `children` | no | `node` | — |
| `classes` | no | `object` | — |
| `collapsedSize` | no | `number \| string` | `'0px'` |
| `component` | no | `element type` | — |
| `disablePrefersReducedMotion` | no | `bool` | `false` |
| `easing` | no | `{ enter?: string, exit?: string } \| string` | — |
| `in` | no | `bool` | — |
| `orientation` | no | `'horizontal' \| 'vertical'` | `'vertical'` |
| `slotProps` | no | `{ root?: func \| object, wrapper?: func \| object, wrapperInner?: func \| object }` | `{}` |
| `slots` | no | `{ root?: elementType, wrapper?: elementType, wrapperInner?: elementType }` | `{}` |
| `sx` | no | `Array<func \| object \| bool> \| func \| object` | — |
| `timeout` | no | `'auto' \| number \| { appear?: number, enter?: number, exit?: number }` | `duration.standard` |



### Paper

```tsx
import Paper from '@mui/material/Paper';
import { Paper } from '@mui/material';
```

| Prop | Required | Upstream metadata type / constraint | Metadata default |
| --- | --- | --- | --- |
| `children` | no | `node` | — |
| `classes` | no | `object` | — |
| `component` | no | `elementType` | — |
| `elevation` | no | `integer` | `1` |
| `square` | no | `bool` | `false` |
| `sx` | no | `Array<func \| object \| bool> \| func \| object` | — |
| `variant` | no | `'elevation' \| 'outlined' \| string` | `'elevation'` |


## Native source declarations

Declarations/imports are extracted from pinned source without flattening unions or external inheritance. Original English comments/types are source reference, not a claim of translated upstream prose. Shared types stay in their native packages.

### vendor/src/Card/Card.d.ts

```ts
import * as React from 'react';

import { SxProps } from '@mui/system';

import { DistributiveOmit } from '@mui/types';

import { OverridableComponent, OverrideProps } from '../OverridableComponent';

import { Theme } from '../styles';

import { PaperOwnProps } from '../Paper';

import { CardClasses } from './cardClasses';

export interface CardPropsColorOverrides {}

export interface CardOwnProps extends DistributiveOmit<PaperOwnProps, 'classes'> {
  /**
   * Override or extend the styles applied to the component.
   */
  classes?: Partial<CardClasses> | undefined;
  /**
   * If `true`, the card will use raised styling.
   * @default false
   */
  raised?: boolean | undefined;
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx?: SxProps<Theme> | undefined;
}

export interface CardTypeMap<
  AdditionalProps = {},
  RootComponent extends React.ElementType = 'div',
> {
  props: AdditionalProps & CardOwnProps;
  defaultComponent: RootComponent;
}

declare const Card: OverridableComponent<CardTypeMap>;

export type CardProps<
  RootComponent extends React.ElementType = CardTypeMap['defaultComponent'],
  AdditionalProps = {},
> = OverrideProps<CardTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
  component?: React.ElementType | undefined;
};
```

### vendor/src/CardActionArea/CardActionArea.d.ts

```ts
import * as React from 'react';

import { SxProps } from '@mui/system';

import { SlotProps, CreateSlotsAndSlotProps } from '../utils/types';

import { Theme } from '../styles';

import {
  ButtonBaseProps,
  ButtonBaseTypeMap,
  ExtendButtonBase,
  ExtendButtonBaseTypeMap,
} from '../ButtonBase';

import { OverrideProps } from '../OverridableComponent';

import { CardActionAreaClasses } from './cardActionAreaClasses';

export interface CardActionAreaSlots {
  /**
   * The component that renders the root.
   * @default ButtonBase
   */
  root: React.ElementType;
  /**
   * The component that renders the focusHighlight.
   * @default span
   */
  focusHighlight: React.ElementType;
}

export type CardActionAreaSlotsAndSlotProps = CreateSlotsAndSlotProps<
  CardActionAreaSlots,
  {
    /**
     * Props forwarded to the root slot.
     * By default, the available props are based on the span element.
     */
    root: SlotProps<React.ElementType<ButtonBaseProps>, {}, CardActionAreaOwnerState>;
    /**
     * Props forwarded to the focusHighlight slot.
     * By default, the available props are based on the span element.
     */
    focusHighlight: SlotProps<'span', {}, CardActionAreaOwnerState>;
  }
>;

export interface CardActionAreaOwnerState extends Omit<
  CardActionAreaProps,
  'slots' | 'slotProps'
> {}

export interface CardActionAreaOwnProps {
  /**
   * Override or extend the styles applied to the component.
   */
  classes?: Partial<CardActionAreaClasses> | undefined;
  focusVisibleClassName?: string | undefined;
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx?: SxProps<Theme> | undefined;
}

export type CardActionAreaTypeMap<
  AdditionalProps,
  RootComponent extends React.ElementType,
> = ExtendButtonBaseTypeMap<{
  props: AdditionalProps & CardActionAreaOwnProps & CardActionAreaSlotsAndSlotProps;
  defaultComponent: RootComponent;
}>;

declare const CardActionArea: ExtendButtonBase<
  CardActionAreaTypeMap<{}, ButtonBaseTypeMap['defaultComponent']>
>;

export type CardActionAreaProps<
  RootComponent extends React.ElementType = ButtonBaseTypeMap['defaultComponent'],
  AdditionalProps = {},
> = OverrideProps<CardActionAreaTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
  component?: React.ElementType | undefined;
};
```

### vendor/src/CardActions/CardActions.d.ts

```ts
import * as React from 'react';

import { SxProps } from '@mui/system';

import { Theme } from '../styles';

import { InternalStandardProps as StandardProps } from '../internal';

import { CardActionsClasses } from './cardActionsClasses';

export interface CardActionsProps extends StandardProps<React.HTMLAttributes<HTMLDivElement>> {
  /**
   * The content of the component.
   */
  children?: React.ReactNode;
  /**
   * Override or extend the styles applied to the component.
   */
  classes?: Partial<CardActionsClasses> | undefined;
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx?: SxProps<Theme> | undefined;
  /**
   * If `true`, the actions do not have additional margin.
   * @default false
   */
  disableSpacing?: boolean | undefined;
}

export default function CardActions(props: CardActionsProps): React.JSX.Element;
```

### vendor/src/CardContent/CardContent.d.ts

```ts
import * as React from 'react';

import { SxProps } from '@mui/system';

import { OverridableComponent, OverrideProps } from '../OverridableComponent';

import { Theme } from '../styles';

import { CardContentClasses } from './cardContentClasses';

export interface CardContentOwnProps {
  /**
   * The content of the component.
   */
  children?: React.ReactNode;
  /**
   * Override or extend the styles applied to the component.
   */
  classes?: Partial<CardContentClasses> | undefined;
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx?: SxProps<Theme> | undefined;
}

export interface CardContentTypeMap<
  AdditionalProps = {},
  RootComponent extends React.ElementType = 'div',
> {
  props: AdditionalProps & CardContentOwnProps;
  defaultComponent: RootComponent;
}

declare const CardContent: OverridableComponent<CardContentTypeMap>;

export type CardContentProps<
  RootComponent extends React.ElementType = CardContentTypeMap['defaultComponent'],
  AdditionalProps = {},
> = OverrideProps<CardContentTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
  component?: React.ElementType | undefined;
};
```

### vendor/src/CardHeader/CardHeader.d.ts

```ts
import * as React from 'react';

import { SxProps } from '@mui/system';

import { TypographyProps } from '../Typography';

import { OverridableComponent, OverrideProps } from '../OverridableComponent';

import { Theme } from '../styles';

import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';

import { CardHeaderClasses } from './cardHeaderClasses';

export interface CardHeaderRootSlotPropsOverrides {}

export interface CardHeaderAvatarSlotPropsOverrides {}

export interface CardHeaderActionSlotPropsOverrides {}

export interface CardHeaderContentSlotPropsOverrides {}

export interface CardHeaderTitleSlotPropsOverrides {}

export interface CardHeaderSubheaderSlotPropsOverrides {}

export interface CardHeaderSlots {
  /**
   * The component that renders the root slot.
   * @default 'div'
   */
  root: React.ElementType;
  /**
   * The component that renders the avatar slot.
   * @default 'div'
   */
  avatar: React.ElementType;
  /**
   * The component that renders the action slot.
   * @default 'div'
   */
  action: React.ElementType;
  /**
   * The component that renders the content slot.
   * @default 'div'
   */
  content: React.ElementType;
  /**
   * The component that renders the title slot (as long as disableTypography is not `true`).
   * [Follow this guide](https://mui.com/material-ui/api/typography/#props) to learn more about the requirements for this component.
   * @default Typography
   */
  title: React.ElementType;
  /**
   * The component that renders the subheader slot (as long as disableTypography is not `true`).
   * [Follow this guide](https://mui.com/material-ui/api/typography/#props) to learn more about the requirements for this component.
   * @default Typography
   */
  subheader: React.ElementType;
}

export type CardHeaderSlotsAndSlotProps<
  TitleTypographyComponent extends React.ElementType = React.ElementType<TypographyProps>,
  SubheaderTypographyComponent extends React.ElementType = React.ElementType<TypographyProps>,
> = CreateSlotsAndSlotProps<
  CardHeaderSlots,
  {
    /**
     * Props forwarded to the root slot.
     * By default, the available props are based on the div element.
     */
    root: SlotProps<'div', CardHeaderRootSlotPropsOverrides, CardHeaderOwnerState>;
    /**
     * Props forwarded to the avatar slot.
     * By default, the available props are based on the div element.
     */
    avatar: SlotProps<'div', CardHeaderAvatarSlotPropsOverrides, CardHeaderOwnerState>;
    /**
     * Props forwarded to the action slot.
     * By default, the available props are based on the div element.
     */
    action: SlotProps<'div', CardHeaderActionSlotPropsOverrides, CardHeaderOwnerState>;
    /**
     * Props forwarded to the content slot.
     * By default, the available props are based on the div element.
     */
    content: SlotProps<'div', CardHeaderContentSlotPropsOverrides, CardHeaderOwnerState>;
    /**
     * Props forwarded to the title slot (as long as disableTypography is not `true`).
     * By default, the available props are based on the [Typography](https://mui.com/material-ui/api/typography/#props) component.
     */
    title:
      | TypographyProps<
          TitleTypographyComponent,
          { component?: TitleTypographyComponent | undefined } & CardHeaderTitleSlotPropsOverrides
        >
      | ((
          ownerState: CardHeaderOwnerState,
        ) => TypographyProps<
          TitleTypographyComponent,
          { component?: TitleTypographyComponent | undefined } & CardHeaderTitleSlotPropsOverrides
        >);
    /**
     * Props forwarded to the subheader slot (as long as disableTypography is not `true`).
     * By default, the available props are based on the [Typography](https://mui.com/material-ui/api/typography/#props) component.
     */
    subheader:
      | TypographyProps<
          SubheaderTypographyComponent,
          {
            component?: SubheaderTypographyComponent | undefined;
          } & CardHeaderSubheaderSlotPropsOverrides
        >
      | ((ownerState: CardHeaderOwnerState) => TypographyProps<
          SubheaderTypographyComponent,
          {
            component?: SubheaderTypographyComponent | undefined;
          } & CardHeaderSubheaderSlotPropsOverrides
        >);
  }
>;

export interface CardHeaderOwnProps {
  /**
   * The action to display in the card header.
   */
  action?: React.ReactNode;
  /**
   * The Avatar element to display.
   */
  avatar?: React.ReactNode;
  /**
   * Override or extend the styles applied to the component.
   */
  classes?: Partial<CardHeaderClasses> | undefined;
  /**
   * If `true`, `subheader` and `title` won't be wrapped by a Typography component.
   * This can be useful to render an alternative Typography variant by wrapping
   * the `title` text, and optional `subheader` text
   * with the Typography component.
   * @default false
   */
  disableTypography?: boolean | undefined;
  /**
   * The content of the component.
   */
  subheader?: React.ReactNode;
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx?: SxProps<Theme> | undefined;
  /**
   * The content of the component.
   */
  title?: React.ReactNode;
}

export interface CardHeaderOwnerState extends CardHeaderOwnProps {}

export interface CardHeaderTypeMap<
  AdditionalProps = {},
  RootComponent extends React.ElementType = 'div',
  TitleTypographyComponent extends React.ElementType = 'span',
  SubheaderTypographyComponent extends React.ElementType = 'span',
> {
  props: AdditionalProps &
    CardHeaderOwnProps &
    CardHeaderSlotsAndSlotProps<TitleTypographyComponent, SubheaderTypographyComponent>;
  defaultComponent: RootComponent;
}

declare const CardHeader: OverridableCardHeader;

export interface OverridableCardHeader extends OverridableComponent<CardHeaderTypeMap> {
  <
    RootComponent extends React.ElementType = CardHeaderTypeMap['defaultComponent'],
    AdditionalProps = {},
    TitleTypographyComponent extends React.ElementType = 'span',
    SubheaderTypographyComponent extends React.ElementType = 'span',
  >(
    props: CardHeaderPropsWithComponent<
      RootComponent,
      AdditionalProps,
      TitleTypographyComponent,
      SubheaderTypographyComponent
    >,
  ): React.JSX.Element;
}

export type CardHeaderProps<
  RootComponent extends React.ElementType = CardHeaderTypeMap['defaultComponent'],
  AdditionalProps = {},
  TitleTypographyComponent extends React.ElementType = 'span',
  SubheaderTypographyComponent extends React.ElementType = 'span',
> = OverrideProps<
  CardHeaderTypeMap<
    AdditionalProps,
    RootComponent,
    TitleTypographyComponent,
    SubheaderTypographyComponent
  >,
  RootComponent
>;

export type CardHeaderPropsWithComponent<
  RootComponent extends React.ElementType = CardHeaderTypeMap['defaultComponent'],
  AdditionalProps = {},
  TitleTypographyComponent extends React.ElementType = 'span',
  SubheaderTypographyComponent extends React.ElementType = 'span',
> = {
  /**
   * The component used for the root node.
   * Either a string to use a HTML element or a component.
   */
  component?: RootComponent | undefined;
} & CardHeaderProps<
  RootComponent,
  AdditionalProps,
  TitleTypographyComponent,
  SubheaderTypographyComponent
>;
```

### vendor/src/CardMedia/CardMedia.d.ts

```ts
import * as React from 'react';

import { SxProps } from '@mui/system';

import { Theme } from '../styles';

import { OverridableComponent, OverrideProps } from '../OverridableComponent';

import { CardMediaClasses } from './cardMediaClasses';

export interface CardMediaOwnProps {
  /**
   * The content of the component.
   */
  children?: React.ReactNode;
  /**
   * Override or extend the styles applied to the component.
   */
  classes?: Partial<CardMediaClasses> | undefined;
  /**
   * Image to be displayed as a background image.
   * Either `image` or `src` prop must be specified.
   * Note that caller must specify height otherwise the image will not be visible.
   */
  image?: string | undefined;
  /**
   * An alias for `image` property.
   * Available only with media components.
   * Media components: `video`, `audio`, `picture`, `iframe`, `img`.
   */
  src?: string | undefined;
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx?: SxProps<Theme> | undefined;
}

export interface CardMediaTypeMap<AdditionalProps, RootComponent extends React.ElementType> {
  props: AdditionalProps & CardMediaOwnProps;
  defaultComponent: RootComponent;
}

declare const CardMedia: OverridableComponent<CardMediaTypeMap<{}, 'div'>>;

export type CardMediaProps<
  RootComponent extends React.ElementType = 'div',
  AdditionalProps = {},
> = OverrideProps<CardMediaTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
  component?: React.ElementType | undefined;
};
```

### vendor/src/Collapse/Collapse.d.ts

```ts
import * as React from 'react';

import { SxProps } from '@mui/system';

import { Theme } from '../styles';

import { InternalStandardProps as StandardProps } from '../internal';

import { TransitionProps, TransitionStatus } from '../transitions/types';

import { CollapseClasses } from './collapseClasses';

import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';

export interface CollapseSlots {
  /**
   * The component that renders the root.
   * @default 'div'
   */
  root?: React.ElementType | undefined;
  /**
   * The component that renders the wrapper.
   * @default 'div'
   */
  wrapper?: React.ElementType | undefined;
  /**
   * The component that renders the inner wrapper.
   * @default 'div'
   */
  wrapperInner?: React.ElementType | undefined;
}

export interface CollapseRootSlotPropsOverrides {}

export interface CollapseWrapperSlotPropsOverrides {}

export interface CollapseWrapperInnerSlotPropsOverrides {}

export type CollapseSlotsAndSlotProps = CreateSlotsAndSlotProps<
  CollapseSlots,
  {
    root: SlotProps<'div', CollapseRootSlotPropsOverrides, CollapseOwnerState>;
    wrapper: SlotProps<'div', CollapseWrapperSlotPropsOverrides, CollapseOwnerState>;
    wrapperInner: SlotProps<'div', CollapseWrapperInnerSlotPropsOverrides, CollapseOwnerState>;
  }
>;

export interface CollapseProps
  extends StandardProps<TransitionProps, 'timeout'>, CollapseSlotsAndSlotProps {
  /**
   * Add a custom transition end trigger.
   * Use it when you need custom logic to decide when the transition has ended.
   * Note: Timeouts are still used as a fallback if provided.
   *
   * @param {HTMLElement} node The transitioning DOM node.
   * @param {Function} done Call this when the transition has finished.
   */
  addEndListener?: TransitionProps['addEndListener'] | undefined;
  /**
   * The content node to be collapsed.
   */
  children?: React.ReactNode;
  className?: string | undefined;
  /**
   * Override or extend the styles applied to the component.
   */
  classes?: Partial<CollapseClasses> | undefined;
  /**
   * The width (horizontal) or height (vertical) of the container when collapsed.
   * @default '0px'
   */
  collapsedSize?: string | number | undefined;
  /**
   * The component used for the root node.
   * Either a string to use a HTML element or a component.
   */
  component?: React.ElementType<TransitionProps> | undefined;
  /**
   * If `true`, the transition ignores `theme.motion.reducedMotion` and keeps its normal timing.
   * @default false
   */
  disablePrefersReducedMotion?: boolean | undefined;
  /**
   * The transition timing function.
   * You may specify a single easing or a object containing enter and exit values.
   */
  easing?: TransitionProps['easing'] | undefined;
  /**
   * If `true`, the component will transition in.
   */
  in?: boolean | undefined;
  /**
   * The transition orientation.
   * @default 'vertical'
   */
  orientation?: 'horizontal' | 'vertical' | undefined;
  /**
   * The duration for the transition, in milliseconds.
   * You may specify a single timeout for all transitions, or individually with an object.
   *
   * Set to 'auto' to automatically calculate transition time based on height.
   * @default duration.standard
   */
  timeout?: TransitionProps['timeout'] | 'auto' | undefined;
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx?: SxProps<Theme> | undefined;
}

export interface CollapseOwnerState extends CollapseProps {
  state: TransitionStatus;
}

export default function Collapse(props: CollapseProps): React.JSX.Element;
```

### vendor/src/Paper/Paper.d.ts

```ts
import * as React from 'react';

import { SxProps } from '@mui/system';

import { OverridableStringUnion } from '@mui/types';

import { Theme } from '../styles';

import { OverrideProps, OverridableComponent, OverridableTypeMap } from '../OverridableComponent';

import { PaperClasses } from './paperClasses';

export interface PaperPropsVariantOverrides {}

export interface PaperOwnProps {
  /**
   * The content of the component.
   */
  children?: React.ReactNode;
  /**
   * Override or extend the styles applied to the component.
   */
  classes?: Partial<PaperClasses> | undefined;
  /**
   * Shadow depth, corresponds to `dp` in the spec.
   * It accepts values between 0 and 24 inclusive.
   * @default 1
   */
  elevation?: number | undefined;
  /**
   * If `true`, rounded corners are disabled.
   * @default false
   */
  square?: boolean | undefined;
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx?: SxProps<Theme> | undefined;
  /**
   * The variant to use.
   * @default 'elevation'
   */
  variant?:
    OverridableStringUnion<'elevation' | 'outlined', PaperPropsVariantOverrides> | undefined;
}

export interface PaperTypeMap<
  AdditionalProps = {},
  RootComponent extends React.ElementType = 'div',
> {
  props: AdditionalProps & PaperOwnProps;
  defaultComponent: RootComponent;
}

declare const Paper: OverridableComponent<PaperTypeMap>;

export interface ExtendPaperTypeMap<TypeMap extends OverridableTypeMap, Keys extends string = ''> {
  props: TypeMap['props'] & Omit<PaperTypeMap['props'], Keys>;
  defaultComponent: TypeMap['defaultComponent'];
}

export type PaperProps<
  RootComponent extends React.ElementType = PaperTypeMap['defaultComponent'],
  AdditionalProps = {},
> = OverrideProps<PaperTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
  component?: React.ElementType | undefined;
};
```

## Post-install acceptance

Run strict types, production build and real interactions. Check keyboard labels/focus, disabled/error/read-only semantics where natively supported, both themes, narrow screens and reduced motion. Verify callbacks against the real host data; do not declare installation complete from copying a prompt. Initialization fixtures also require server HTML and warning-free hydration.

## Source and license

https://github.com/mui/material-ui/tree/809a7717b4c050ba3f69b75300689f07c050a16e

MIT · @mui/material@9.4.0. Vendor originals and license are preserved. Full original upstream prose remains in vendor/docs and is not represented as fully translated.

---

Index of all JGuang resources: https://jiguang132.com/llms.txt
