Skip to main content

Feedback

Library
UDS Base
Repository
github.com/telus/universal-design-system
Package
npmjs.com/package/@telus-uds/ds-allium
Package version
1.14.0
Loading...

Introduction

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

A feedback box commonly used with form fields. While its primary use is to facilitate feedback states for other form components such as TextInput, you may use it standalone.

Guidance

Complex content

You may pass any React tree as the children of this component, bear in mind that a render function is better suited for styling children based on Feedback's variant.

Loading...

Using a render function

When a function is passed for rendering content, it will receive the feedback text styles and variant as arguments.

Loading...

Accessibility

All accessibility props set on this component will be applied to the outer container. By default using validation="error" will set the feedback's role to "alert".

Platform considerations

The component is available on both native platforms and web.

Props

NameTypeDefaultDescription
childrenstring | node | funcFeedback content rendered below the title. A render function '({textStyles, variant}) => {}' is supported.
titlestringEmphasized summary of the feedback. If an icon is set, it is rendered next to the title.
tokenscustomSystem tokens prop, see tokens for more details
validation'error' | 'success'Use to visually mark the Feedback as valid or invalid.
variantobjectOfSystem variant prop, see variants for more details

Tokens

In exceptional circumstances, the following tokens can be passed to this component to override its default styles. Do not do this unless absolutely necessary. Read more about overriding styles.

View Tokens
Prop NameToken PropertyToken Type
tokensbackgroundColorcolor
borderColorcolor
borderWidthborder
borderRadiusradius
paddingTopsize
paddingBottomsize
paddingLeftsize
paddingRightsize
spaceinteger
colorcolor
fontNamefontName
fontWeightfontWeight
lineHeightlineHeight
titleFontSizefontSize
contentFontSizefontSize
iconicon
iconSizesize
iconColorcolor
iconGapsize

Figma

Variants

You can choose whether an icon should be shown by using the icon variant:

Loading...
info

An icon will only be rendered if the title prop is set.

This component's appearance may change based on the validation prop.

Loading...
Loading...

Feedback