Default Image

Image

Image component.

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

Examples

Default

Default image element.

Resize Mode

Object Fit mode.

APIs

Image

Api props extends from Image

AttributeTypeAccepted valuesDescriptionDefault
ComponentComponentReact ComponentChange the element warpper baseRipple or View
ImageComponentComponentReact ComponentChange the element of the image baseRNImage
childrenReactNodeReactNodeAccessory as a child for the component-
childrenContainerStyleStyleProp<ViewStyle>objectStyle object for wrapper children element-
containerStyleStyleProp<ViewStyle>objectStyle object for container element-
heightnumberNumberHeight of the image-
placeholderContentReactNodeReact ElementPlaceholder of the image when not find a source prop-
placeholderStyleStyleProp<ViewStyle>objectStyle object for container element-
sourceImageSourcePropTypeabsoluteImport stringURI of the picture, can be an import or string-
transitionbooleantrue falseActivate animation effect fadeInfalse
transitionDurationnumberNumberTransition duration effect360ms
widthnumberNumberWidth of the image-
Other PropsanyOther propsInteractive props for element-

Base Properties

type BaseProperties = {
  onBlur?: ((e: NativeSyntheticEvent<TargetedEvent>) => void) | undefined;
  onFocus?: ((e: NativeSyntheticEvent<TargetedEvent>) => void) | undefined;
  onLayout?: ((event: LayoutChangeEvent) => void) | undefined;
  onLongPress?: ((event: GestureResponderEvent) => void) | undefined;
  onPress?: ((event: GestureResponderEvent) => void) | undefined;
  onPressIn?: ((event: GestureResponderEvent) => void) | undefined;
  onPressOut?: ((event: GestureResponderEvent) => void) | undefined;
};

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.