TabButton for navigation links and actions such as adding a tab or opening an overflow menu. It shares the appearance of Tabs and uses Button for interaction.
State ownership
Your application suppliesactive from its current route or menu state. This prop highlights the control without changing its role or introducing selection state. Use Tabs.Root, Tabs.List, Tabs.Tab, and Tabs.Panel to switch between related content panels, with controlled or uncontrolled selection.
Navigation
Sethref to render a link. Supply aria-current="page" on the current destination.
href and your router link through render. Keep route state and history options on the router link. Custom wrappers must forward props and the ref to the anchor. Disabled links retain their link role and block activation.
Actions
Withouthref, the control renders a native button with type="button". Native attributes, refs, styles, class names, and event handlers pass through.
startIcon, endIcon, and badge for supporting content. An avatar passed to an icon slot is decorative when the text names the destination. The size prop controls content padding with sm and md values.
Props
boolean
default:"false"
Highlights the current destination or an action associated with the active tab. Does not change the control role.
ReactNode
Content following the label and trailing icon, such as a count.
string | ((state: ButtonState) => string | undefined)
CSS class applied to the element, or a function that
returns a class based on the component’s state.
ReactNode
Decorative content displayed after the label.
boolean
default:"false"
Whether the button should be focusable when disabled.
ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ButtonState>
Caller-supplied root element or renderer. Preserve a native button, or an anchor when
href is set. Router integration belongs to the caller."sm" | "md"
default:"sm"
Padding of the tab content: sm or md.
ReactNode
Decorative content displayed before the label.
CSSProperties | ((state: ButtonState) => CSSProperties | undefined)
Style applied to the element, or a function that
returns a style object based on the component’s state.