Skip to main content

🪛 Types

Here are all the types referenced in the API section.


CustomAnimationConfig​

animationConfigIn: {
type: "timing" | "spring",
config: WithSpringConfig | WithTimingConfig // -> Reanimated type declarations
}
animationConfigOut?: {
type: "timing" | "spring",
config: WithSpringConfig | WithTimingConfig // -> Reanimated type declarations
}
transitionInStyles: (progress: SharedValue<number>) => AnimatedStylesType // -> must be a worklet / Reanimated type declarations
transitionOutStyles?: (progress: SharedValue<number>) => AnimatedStylesType // -> must be a worklet / Reanimated type declarations

CustomVariants​

{
key: {
component: React.FC
},
[...]
}


GestureConfig​

direction: 'y' | 'x' | 'full' | 'none'

StyleProps​

titleSize: number // default 20
titleColor: string
descriptionSize: number // default 12
descriptionColor: string
bgColor: string
borderType: 'border' | 'accent' | 'no-border' // default 'accent',
borderRadius: number // default 25
accentColor: string
borderWidth: number // default 3
multiline: number // default 5
defaultIconType: 'color' | 'monochromatic' | 'no-icon' // default 'color'
leftIconSource: ImageSourcePropType // -> React Native type declaration
imageStyle: ImageStyle // -> React Native type declaration

NotificationConfigParams​

config?: {
duration?: number // default 3000
notificationPosition: NotificationPosition // default 'top'
animationConfig: CustomAnimationConfig
}

NotificationParams​

params: {
title?: string
description?: string
onPress?: () => void
style?: StyleProps
hideCloseButton?: boolean // default false
customID?: string
}

When used with a custom notification, there is a little difference in the 'title' and 'description'

// when calling custom component:
params: {
customTitle?: string
customDescription?: string
[...]
// rest is the same
}

NotificationPosition​

;'top' | 'center' | 'top'

ModalNotificationProvider​

ModalNotificationsProvider: React.FC<React.PropsWithChildren<{ notificationTopPosition?: number }>>