Skip to main content

ExpandCollapseMini

Library
Allium Design Systemweb-only
Repository
github.com/telus/allium-design-system
Package
npmjs.com/package/@telus-uds/ds-allium
Package version
1.14.0
Loading...

Introduction

import { ExpandCollapseMini } from '@telus-uds/ds-allium'

Similar to ExpandCollapse. Clicking on the hyperlink triggers target content to display in a panel directly below CTA.

Guidance

  • Use ExpandCollapseMini to show/hide visually hidden content
    • Show hidden content directly below or adjacent to the ExpandCollapseMini
    • Show more information to provide clarity to information a user may interpret as unclear
  • Use sentence case
  • Text should be lead by a strong action word
  • Text should be as short as possible

Ref forwarding

Note that ExpandCollapseMini provides ref forwarding, which allows you, for example, to move focus to it manually (try clicking the button and then press the spacebar to expand / collapse):

Loading...

Accessibility

info

Limit the use of compact as it may the accessibility for users

Use the React Native accessibilityLabel attribute to provide an accessibility label to the toggle control.

Platform considerations

This component is currently only supported on web.

Figma

Props

NameTypeDefaultDescription
children*node
collapseTitle*string
expandTitle*string
onPressfunc
onTogglefunc() => {}
pressableStateobject
variantobjectSystem variant prop, see variants for more details

Variants

Icon position

Default is right, can be controlled with the iconPosition attribute.

Loading...

Size

Size can be any of micro, small, medium, large (the sizes supported by the TextButton/Link components). Pass a variant with the desired size.

Loading...

Alternative

Loading...

Inverse

Loading...

Feedback