Skip to main content

NeoPopTiltedButton

A skewed, optionally levitating 3D button with configurable tilt direction, plunk shadow, and shimmer decoration.

Usage

// dark mode example
import { NeoPopTiltedButton } from 'neopop-rn';
import { Text } from 'react-native';

<NeoPopTiltedButton
color="#06C270"
tiltDirection="right"
tiltAngle={12}
isFloating
floatingDuration={1200}
colorMode="dark"
decoration={{
plunkColor: '#025c33',
shadowColor: '#000000',
border: false,
showShimmer: true,
}}
onPress={() => console.log('tilted press')}
>
<Text style={{ color: '#ffffff', fontWeight: '700' }}>Invest Now</Text>
</NeoPopTiltedButton>
// light mode example
import { NeoPopTiltedButton } from 'neopop-rn';
import { Text } from 'react-native';

<NeoPopTiltedButton
color="#0d0d0d"
tiltDirection="left"
colorMode="light"
decoration={{ plunkColor: '#555555', border: true }}
onPress={() => {}}
>
<Text style={{ color: '#ffffff' }}>CTA</Text>
</NeoPopTiltedButton>

Props

PropTypeDefaultDescription
childrenReact.ReactNodeContent rendered inside the button face.
colorstringFace background color.
tiltDirection'left' | 'right'Direction the button is skewed.
tiltAnglenumberSkew angle in degrees.
isFloatingbooleanWhen true, the button continuously bobs vertically (levitation).
floatingDurationnumberDuration of one levitation cycle in ms.
floatingDelaynumberInitial delay before the levitation animation starts.
tapDurationnumberDuration of the press-sink animation in ms.
buttonDepthnumberDepth of the 3D extrusion.
shadowDistancenumberSize of the drop shadow behind the button.
yPosFactornumberVertical position factor used in shadow / plunk calculation.
enabledbooleanWhen false, disables all interaction.
decorationNeoPopTiltedButtonDecorationVisual decoration options (see below).
onTapUp() => voidCalled when the finger lifts after a press.
onTapDown() => voidCalled when the finger touches down.
onPress() => voidCalled on a completed tap.
enableHapticsbooleanFires a haptic on press.
colorMode'dark' | 'light'Theme mode for default colors.
styleStyleProp<ViewStyle>Additional style applied to the outer container.

NeoPopTiltedButtonDecoration

KeyTypeDescription
colorstringOverrides face color via decoration (alternative to the top-level color).
plunkColorstringColor of the plunk (3D side shadow).
shadowColorstringColor of the drop shadow beneath the button.
borderbooleanWhen true, renders a border around the face.
showShimmerbooleanWhen true, overlays a shimmer animation on the face.

colorConfig

NeoPopTiltedButton does not accept a colorConfig prop. Use color and decoration props for color control.

Notes

  • The component uses a CSS-like skewX transform for the tilt effect; on Android this requires the Reanimated renderer to apply correctly.
  • isFloating and enabled: false can coexist; when disabled, the levitation animation does not start.
  • showShimmer within decoration uses the default NeoPopShimmer configuration; there is no API to customise shimmer parameters from NeoPopTiltedButton.
  • onTapDown and onTapUp are fired in addition to onPress and can be used for sound effects or custom animations.