跳转到内容

🎉 v5 beta is out! Head to the v5 documentation to get started.

TimelineItem API

The API documentation of the TimelineItem React component. Learn more about the props and the CSS customization points.

Import

import TimelineItem from '@material-ui/lab/TimelineItem';
// or
import { TimelineItem } from '@material-ui/lab';

You can learn more about the difference by reading this guide.

Component name

The MuiTimelineItem name can be used for providing default props or style overrides at the theme level.

Props

Name Type Default Description
children node The content of the component.
classes object Override or extend the styles applied to the component. See CSS API below for more details.

The ref is forwarded to the root element.

Any other props supplied will be provided to the root element (native element).

CSS

Rule name Global class Description
root .MuiTimelineItem-root Styles applied to the root element.
alignLeft .MuiTimelineItem-alignLeft Styles applied to the root element if align="left".
alignRight .MuiTimelineItem-alignRight Styles applied to the root element if align="right".
alignAlternate .MuiTimelineItem-alignAlternate Styles applied to the root element if align="alternate".
missingOppositeContent .MuiTimelineItem-missingOppositeContent Styles applied to the root element if no there isn't TimelineOppositeContent provided.
content .MuiTimelineItem-content Styles applied to the timeline content node.
oppositeContent .MuiTimelineItem-oppositeContent Styles applied to the timeline opposite content node.

You can override the style of the component thanks to one of these customization points:

If that's not sufficient, you can check the implementation of the component for more detail.

Demos