BridgeBeta
  • Brand
  • Digital Assets
    Foundations
    Icons
    Components
    Templates
  • Resources
    Design Tokens
    How-tos
    Best Practices
    Libraries
    Accessibility
    Products List
  • Support
    • Overview
    • Actions
      • Overview
      • Button
      • ContextMenu
      • Link
    • Controls
      • Overview
      • Checkbox
      • Tag
      • Toggle
    • Forms
      • Overview
      • DatePicker
      • FileUploader
      • Input
      • NumberInput
      • RadioButton
      • Search
      • Select
      • Slider
      • TextArea
      • TextInput
    • Hooks
      • useIsomorphicLayoutEffect
      • useMediaQuery
      • useSettings
    • Navigation
      • Overview
      • AnchorNavigation
      • BannerNavigation
      • Breadcrumb
      • Footer
      • InfoBar
      • MainNavigation
      • SecondaryNavigation
      • StepNavigation
      • SubNavigation
    • Overlay
      • Overview
      • Credits
      • Modal
      • ModalWrapper
      • Notification
      • Tooltip
    • Structure
      • Overview
      • Accordion
      • AuthLayout
      • Avatar
      • Callout
      • Card
      • ContentSwitcher
      • Empty
      • Hero
      • InlineLoading
      • Item
      • List
      • Loading
      • mdxComponents
      • Module
      • Pagination
      • ReadMore
      • Story
      • Table
      • Tabs
      • Text
      • Unit
      • User
      • WFPCoreProvider
      • Wrapper
Components
Structure
ContentSwitcher
Deprecated

ContentSwitcher

  • Design
  • Code
  • Props

ContentSwitcher to switch between different contents

Import statement

import { ContentSwitcher } from "@wfp/react"

Documentation is outdated

This component will most likely be removed in the future. Please use the Tabs component instead.

Text

Be concise and specific. Titles have a max of two words.

Default selection

Based on usage, there should be a default selection. The default selection is always the first option in a switcher.

Usage with react

import { ContentSwitcher, Switch } from "@wfp/react";
import { iconAdd } from "@wfp/icons-react";
<ContentSwitcher onChange={onChangeAction}>
<Switch
name="one"
text="First section"
onClick={onClickAction}
kind="anchor"
href="#"
icon={<Icon icon={iconAdd} />}
/>
<Switch name="two" text="Second section" />
<Switch name="three" text="Third section" />
</ContentSwitcher>

Reference

  • Carbon Components

On this page

  • Text
  • Default selection
  • Usage with react
  • Reference

References

  • Storybook
Storybook
Figma library
Contact us
2025 © World Food Programme