Content Switcher

Segmented single-select control for filters and view modes.

Installation

Add this item from the registry, or import it from the package after installing Default File UI.

Registry path

itsvigneshv/default-file-ui/content-switcher

Package import

import { ContentSwitcher, ContentSwitcherItem } from "@default-file/ui/components/df-content-switcher"

Default

Joined bordered segments for single-select options.

Properties

Segmented single-select for filters and view modes. Compose ContentSwitcher and ContentSwitcherItem.

ContentSwitcher

PropTypeDefaultNotes
valuestringControlled selected value.
defaultValuestringUncontrolled initial value.
onValueChange(value: string) => voidCalled when selection changes.
orientation"horizontal" | "vertical""horizontal"Layout direction.
fullWidthbooleanfalseStretch items to fill the available width.
classNamestringAdditional styles on the root.

ContentSwitcherItem

PropTypeDefaultNotes
valuestringItem value (required).
disabledbooleanNon-interactive item.
childrenReactNodeItem label.
…button attributesButtonHTMLAttributesNative button props.