TabScrollButtonAPI
React TabScrollButton 元件的 API 參考文件。了解這個匯出模組的 props、CSS 和其他 API。
範例
匯入
import TabScrollButton from '@mui/material/TabScrollButton';
// or
import { TabScrollButton } from '@mui/material';
請閱讀這篇關於最小化套件大小的指南,以了解差異。
原生元件的 props 也可使用。
名稱 | 類型 | 預設值 | 描述 |
---|---|---|---|
direction (方向)* | 'left' | 'right' | - | 按鈕應指示的方向。 |
orientation (方向)* | 'horizontal' | 'vertical' | - | 元件方向(版面配置流動方向)。 |
children (子元件) | node | - | 元件的內容。 |
classes (類別) | object | - | 覆寫或擴充套用至元件的樣式。 如需更多詳細資訊,請參閱下方的 CSS 類別 API。 |
disabled (已停用) | bool | false | 如果為 |
slotProps (插槽 Props) | { endScrollButtonIcon?: func | object, startScrollButtonIcon?: func | object } | {} | 插槽元件的額外 props。您可以覆寫現有的 props 或新增 props。 |
slots (插槽) | { EndScrollButtonIcon?: elementType, StartScrollButtonIcon?: elementType } | {} | 用於每個插槽內部的元件。 |
sx | Array<func | object | bool> | func | object | - | 系統 prop,可讓您定義系統覆寫以及額外的 CSS 樣式。 如需更多詳細資訊,請參閱 `sx` 頁面。 |
ref
會轉發到根元素。主題預設 props
您可以使用 MuiTabScrollButton
透過主題變更此元件的預設 props。
這些類別名稱對於使用 CSS 設定樣式很有用。當觸發特定狀態時,它們會套用至元件的插槽。
類別名稱 | 規則名稱 | 描述 |
---|---|---|
.Mui-disabled | 如果 disabled={true} ,則套用至根元素的狀態類別。 | |
.MuiTabScrollButton-root | root (根) | 套用至根元素的樣式。 |
.MuiTabScrollButton-vertical | vertical (垂直) | 如果 orientation="vertical" ,則套用至根元素的樣式。 |
您可以使用下列其中一種客製化選項來覆寫元件的樣式
- 使用全域類別名稱。
- 在自訂主題中使用規則名稱作為元件的
styleOverrides
屬性的一部分。
原始碼
如果您在此頁面中找不到資訊,請考慮查看元件的實作以取得更多詳細資訊。