Default Image

Message

Display global messages as feedback in response to user operations.

import { Message } from '@redshank/native';

When To Use

  • To provide feedback such as success, warning, error etc.
  • A message is displayed at top and center and will be dismissed automatically, as a non-interrupting light-weighted prompt.

Examples

Message

Default Message element.

With Icon

With icon message element.

With Shadow Box

With shadow box message element.

With Shadow Opacity

With shadow opacity message element.

Message

Options Api props

AttributeTypeAccepted valuesDescriptionDefault
ComponentComponent FunctionComponentJSX.Element ComponentChange component MessageView if onPress then Ripple
contentstringTextContent message-
iconLeftReactNodeComponentIcon leftif showIcon is true then closecircle of antdesign
iconRightReactNodeComponentIcon right-
onPressfunction(event) => voidOptional function when trigger press message-
styleobjectStyleProp<ViewStyle>Style for component-
styleTextobjectStyleProp<ViewStyle>Style for text content-
typeMessageTypedefautl shadowBackground opacity or solid colordefault
withBoxShadowbooleantrue falseShow shadown outsite messagefalse
withIconbooleantrue falseShow or hidden iconfalse

Community:

We're excited to see the community adopt @redshank/native, raise issues, and provide feedback. Whether it's a feature request, bug report, or a project to showcase, please get involved!

DiscordGithub

Contributing:

PR's on @redshank/native are always welcome, please see our contribution guidelines to learn how you can contribute to this project.

Copyright © 2023 @redshank.