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
ReadMore

ReadMore

  • Design
  • Code
  • Props

ReadMore

Expand code

Editable Example

import { ReadMore } from "@wfp/react";

() => {
  return (
    <ReadMore
      defaultValue="false"
      fade
      helperText="Optional helper text."
      labelA="Off"
      labelB="On"
      labelText="Toggle label"
      maxHeight={50}
    />
  );
};

PropDefaultDescriptionValue

className

string
–

Specify an optional className to be applied to the wrapper node

collapsed

boolean
–

The content of the collapsed content (optional)

collapseLink

React.ReactNode
–

A custom link for collapsing

collapseText

React.ReactNode
Show less

Custom text for collapsing

default: Show less

disableAutoscroll

boolean
–

Disable the scroll into view on expanding

expandLink

React.ReactNode
–

A custom link for expanding

expandText

React.ReactNode
Show more

Custom text for expanding

default: Show more

fade

boolean
–

Enables the fade effect when the content is collapsed (optional) when enabled collapsed will be ignored

maxHeight

number
–

The maximum height when the content is collapsed (optional)

On this page

  • ReadMore

References

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