TimelineDotAPI
React TimelineDot 元件的 API 參考文件。瞭解此匯出模組的 props、CSS 和其他 API。
Demo
Import
import TimelineDot from '@mui/lab/TimelineDot';
// or
import { TimelineDot } from '@mui/lab';
若要瞭解差異,請閱讀此關於最小化套件大小的指南。
原生元件的 Props 也可使用。
名稱 | 類型 | 預設值 | 描述 |
---|---|---|---|
children | node | - | 元件的內容。 |
classes | object | - | 覆寫或擴展應用於元件的樣式。 請參閱下方CSS 類別 API 以瞭解更多詳細資訊。 |
color | 'error' | 'grey' | 'info' | 'inherit' | 'primary' | 'secondary' | 'success' | 'warning' | string | 'grey' | 圓點可以有不同的顏色。 |
sx | Array<func | object | bool> | func | object | - | 系統 prop,允許定義系統覆寫以及額外的 CSS 樣式。 請參閱 `sx` 頁面 以瞭解更多詳細資訊。 |
variant | 'filled' | 'outlined' | string | 'filled' | 圓點可以顯示為填滿或外框。 |
ref
會轉發到根元素。主題預設 Props
您可以使用 MuiTimelineDot
透過主題變更此元件的預設 props。
這些類別名稱對於使用 CSS 設定樣式很有用。當觸發特定狀態時,它們會應用於元件的 slot。
類別名稱 | 規則名稱 | 描述 |
---|---|---|
.MuiTimelineDot-filled | filled | 如果 variant="filled" ,則樣式會應用於根元素。 |
.MuiTimelineDot-filledGrey | filledGrey | 如果 color="grey" 且 variant="filled" ,則樣式會應用於根元素。 |
.MuiTimelineDot-filledPrimary | filledPrimary | 如果 color="primary" 且 variant="filled" ,則樣式會應用於根元素。 |
.MuiTimelineDot-filledSecondary | filledSecondary | 如果 color="secondary" 且 variant="filled" ,則樣式會應用於根元素。 |
.MuiTimelineDot-outlined | outlined | 如果 variant="outlined" ,則樣式會應用於根元素。 |
.MuiTimelineDot-outlinedGrey | outlinedGrey | 如果 color="grey" 且 variant="outlined" ,則樣式會應用於根元素。 |
.MuiTimelineDot-outlinedPrimary | outlinedPrimary | 如果 color="primary" 且 variant="outlined" ,則樣式會應用於根元素。 |
.MuiTimelineDot-outlinedSecondary | outlinedSecondary | 如果 color="secondary" 且 variant="outlined" ,則樣式會應用於根元素。 |
.MuiTimelineDot-root | root | 應用於根元素的樣式。 |
您可以使用以下其中一種客製化選項來覆寫元件的樣式
- 使用全域類別名稱。
- 在自訂主題中使用規則名稱作為元件
styleOverrides
屬性的一部分。
原始碼
如果您在本頁面中找不到資訊,請考慮查看元件的實作以取得更多詳細資訊。