Primitives
Animated Number Avatar Badge Button Button Group Toggle Toggle Group Checkbox Chip Countdown Divider Fab Grid Icon Image Input Search Input Textarea Label Loader Marquee Masked Input Message Bubble Notification Banner Offline Banner Progress Progress Ring Radio Group Range Slider Rating Separator Skeleton Slider Stack Stepper Switch Text Theme Toggle Ticker Typing IndicatorComposed
Accordion Achievement Badge Action Bar Action Sheet Action Swap Activity Rings Add to Cart Button Address Card Agenda List Alert Amount Keypad Animated Icons App Bar Audio Message Audio Recorder Autocomplete Avatar Group Balance Display Bar List Barcode Before After Biometric Gate Bloom Menu Bottom Sheet Paywall Sheet Side Sheet Breadcrumb Calendar Calendar Strip Card Carousel Cart Item Character Charts Chat Composer Chat List Item Choice Card Circle Reveal Coach Marks Collapsible Collapsible Header Color Picker Combobox Command Palette Comment Thread Confetti Consent Sheet Context Menu Copy Field Country Picker Coupon Input Currency Input Data Table Date Range Picker Day Schedule Dialog Dock Donut Chart Drawer Driver Card Dropdown Menu Drum Picker Emoji Picker Empty State Error State Event Card Expandable Control Fader Feature Gate File Picker Filter Bar Follow Button Form Gauge Glass Glass Cluster Glass Dock Morph Glass Fab Morph Glass Lab Glass Orb Glass Search Morph Glass Sheet Edge Gradient Button Headline New Heatmap Image Cropper Image Viewer Kanban Card Keyboard Avoiding Keyboard Toolbar Leaderboard Level Progress Lightbox Like Button Line Chart List Reorderable List Swipeable Row Location Card Location Search Map Sheet Map View Markdown View Media Controls Media Picker Media Tile Mention Input Meter Bar Mini Player Mood Slider Morphing Modal Multi Select Navigation Rail Notification Item Number Input Onboarding Pager Order Card Order Summary OTP Input Pagination Paper Clip New Parallax Header Pass Card Password Strength Payment Button Payment Card Payment Method Permission Primer Phone Input PIN Pad Polaroid New Poll Popover Post Card Postage Stamp New Price Tag Pricing Table Product Card Product Gallery Profile Header Promo Banner Prompt Input Property Card Pull To Refresh QR Code Quick Actions Quick Replies Rating Summary Reaction Picker Resend Timer Review Card Review Prompt Ride Option Save Button Scan Frame Scroll Spy Tabs Seat Map Section Header Section Index Segmented Control Select Share Button Share Sheet Shutter Button Signature Pad Slide to Confirm Slot Picker Smart Banner Social Login Button Sparkline Splash Screen Split Button Stat Card Stateful Button Status Dot Step Flow Steps Sticker New Stopwatch Stories Progress Stories Viewer Story Ring Streak Counter Streaming Text Success Seal Swipe Deck Tabs Tag Input Tape New Text Reveal Thinking Indicator Time Picker Timeline Timer Ring Tip Selector Toast Toolbar Tooltip Track Row Transaction Row Trip Progress Variant Picker Video Controls Waveform Weather Card Weekday Picker Zoom TransitionScreens
Account Switcher Biometric Setup Delete Account Forgot Password Grow Auth Login Login — Dark Stage Login — Dense Work Login — Editorial Login — Illustrated Login — Minimal Ink Login — Social Login — Video Loop Food Onboarding Onboarding Onboarding Dark Objects Onboarding Editorial Onboarding Illustrated Onboarding Personalize Onboarding Photo Carousel OTP Verification Passkey — Create Password Reset Permission — Notifications Phone Verification Onboarding Quiz Session Devices Signup Sign-up Chat Sign-up Photo Sheet Social Auth Split Auth Verify Identity Welcome AI Chat AI Assistant Channels List Chat Info Chat List Chat Media Chat Thread Create Group Group Info Message Requests New Message Kept Messages Accessibility Activity Log Appearance Authenticator Blocked Accounts Export Your Data Downloads Edit Profile Edit Profile — Rows Emergency Call Empty States Set Error State Send Feedback Device Locator Help Center Home — Bento Home — Dark Home — Editorial Home Feed Invite Friends Language & Region Linked Accounts Not Found (404) Notification Settings Notifications Password Vault Paywall Paywall — Comparison Paywall — Dark Stage Paywall — Editorial Paywall — Photo Paywall — Trial Timeline Privacy Profile Profile — Gamified Profile — Minimal Profile — Photo Hero QR Scanner Report Issue Saved Items Phone Time Search Search — Command Palette Search — Visual Account Health Settings Settings — Dark Device Settings — Search Storage & Data Terms & Privacy Dating Chat Dating Filters Profile Discover Its A Match Into You Matches Profile Detail Profile Editor Courier Matching Delivery History Delivery Support Package Schedule Parcel Tracking Proof Of Delivery Quick Aisle Quick Home Send Package Substitutions Add Payment Address Book Cart Categories Checkout Checkout — Steps Checkout Success Delivery Filters & Sort Flash Sale Gift Cards Loyalty Points Order Cancel Order Detail Orders Pay Later Checkout Payment Methods Product Detail Product Detail — Hero Product Grid Product Reviews Promo Codes Recently Viewed Return Items Search Results Shop Assistant Store Home Tip & Rate Courier Order Tracking Wishlist Write a Review Event Checkin Event Hero Events Discover My Tickets Seat Selection Ticket Checkout Add Card Bank Accounts Dashboard — Bento Bill Pay Budgets Card Details Crypto Portfolio Finance Dashboard Dashboard — Dark Exchange Currency Expense List Invoice Detail Manage Cards Plan Management Savings Goals Send Money Spending Analytics Split Bill Subscriptions Token Detail Token Swap Transactions Wallet Home Wallet Movers Courier Tracking Food Cart Food Home Food Orders Grocery List Recipe Detail Restaurant — Dark Restaurant Detail Activity Rings Fitness Home Habit Quest Habit Tracker Meal Planner Med Store Meditation Player Mood Check-in Nutrition Home Period Tracker Prior Auth Prior Auth Cases Quest Complete Run Tracking Rx Scan Sleep Tracker Telehealth Booking Walk Map Water Tracker Workout Complete Workout Detail Workout Session Applications Apply Company Interview Schedule Job Detail Job Feed Resume Saved Jobs Create Listing Item Chat Listing Detail Make Offer Market Checkout Market Home Market Search My Listings Offers Inbox Seller Profile Audiobook Player Camera Gallery Albums Game Store Mini Player Music Player Photo Editor Photo Gallery Playlist Detail Podcast Player Clips Feed Serene Home Sound Mixer Stories Video Call Video Player Article Reader Course Detail Event Detail Memory Onboarding Icon Lab Leaderboard Lesson Player Match Detail News Editorial News Home Plant Care Prediction Live Prediction Welcome Smart Home Standings Ticket Wallet Topics Follow Weather Detail Add Task Sheet Alarm Clock Calendar Day Calendar Month Doc Scanner File Manager Focus Timer Journal Kanban Board Mail Inbox Mail Thread Note Editor Notes List Reminders Task List Time Blocks Agent Profile Compare Homes Mortgage Calculator Property Detail Rental Application Saved Homes Schedule Tour Search List Search Map Complete Destination Driver Arriving Ev Charging History Home In Trip Matching Options Parking Receipt Safety Schedule Scooter Unlock Booking Confirmed Booking Review Booking Slots My Bookings Pro On The Way Provider Detail Provider List Rate Service Services Home Arc Create Arc Detail Arc Onboarding Avatar Creator Comments Sheet Create Post Explore Grid Followers List Hashtag Feed Mentions Post Detail Post Hero Social Profile Boarding Pass Booking Confirm Car Rental Trip Discover Flight Live Flight Preferences Flight Results Flight Search Hotel Detail Live Transit Trip — Map Day Trip — Rideshare Request Seat Select Travel Home Trip Itinerary Trip OnboardingNothing matches — try another word.
Sticker
NewDie-cut sticker with a white cut edge and a soft shadow, set at a slight tilt. Press it and it lifts off the page while one corner peels back to show the white backing.
Preview
import * as React from "react";
import { forwardRef, useCallback } from "react";
import {
Image,
Platform,
Pressable,
View,
type ImageSourcePropType,
type PressableProps,
type ViewStyle,
} from "react-native";
import Animated, {
useAnimatedStyle,
useSharedValue,
withSpring,
withTiming,
} from "react-native-reanimated";
import Svg, { Defs, LinearGradient, Path, Stop } from "react-native-svg";
import { cn, spring, timing, useHaptic, useReducedMotion, useTheme } from "@lumioui/core";
/**
* Sticker — a die-cut vinyl sticker: your image or content inside a white
* cut edge, set down at a slight tilt with a soft shadow. Press it and it
* lifts off the page: it rises, straightens a little, its shadow deepens and
* one corner peels back to show the white backing. Release and it lays flat.
*
* <Sticker image={{ uri }} shape="circle" tilt={-6} />
* <Sticker shape="pill" contentClassName="bg-primary px-4 py-2" peel={0.4}>
* <Text className="font-bold text-primary-foreground">Lisboa</Text>
* </Sticker>
*
* The paper family (Tape, Polaroid, PostageStamp, PaperClip) shares the lift,
* shadows and handwriting face exported here. Expo Go compatible.
*/
// ---------------------------------------------------------------------------
// Shared paper language
// ---------------------------------------------------------------------------
/** A handwriting face from the system — no font files to ship. Noteworthy on
* Apple platforms, the casual face on Android, a cursive stack on the web. */
export const HANDWRITING: string =
Platform.select({
ios: "Noteworthy-Bold",
android: "casual",
default: '"Noteworthy", "Bradley Hand", "Segoe Print", "Chalkboard SE", cursive',
}) ?? "cursive";
/** Paper is a physical object, so it keeps its own colour in both schemes —
* dark mode only takes the glare off so it doesn't burn on a black canvas. */
export const PAPER = {
/** Sticker vinyl edge. */
vinyl: { light: "#FFFFFF", dark: "#F2F1EE" },
/** Photo and stamp stock — a warm white. */
stock: { light: "#FCFBF8", dark: "#E9E7E2" },
/** Brown kraft — tabs, tape, envelopes. */
kraft: { light: "#D6B98C", dark: "#C4A87C" },
/** Pen ink on paper. Paper stays light, so ink stays dark. */
ink: "#2B2926",
/** The back of a sticker or a curled corner. */
backing: "#E4E2DD",
} as const;
/** Resting and lifted shadows for paper on a surface — black under both
* schemes on purpose (a real shadow, not a coloured glow). The web gets a
* two-layer boxShadow; native the same lift via shadow* + elevation. */
export function paperShadow(lifted: boolean): ViewStyle {
if (Platform.OS === "web") {
return {
boxShadow: lifted
? "0 14px 28px rgba(0,0,0,0.16), 0 4px 10px rgba(0,0,0,0.10)"
: "0 1px 2px rgba(0,0,0,0.14), 0 4px 12px rgba(0,0,0,0.08)",
};
}
return lifted
? { shadowColor: "#000", shadowOpacity: 0.2, shadowRadius: 16, shadowOffset: { width: 0, height: 10 }, elevation: 10 }
: { shadowColor: "#000", shadowOpacity: 0.14, shadowRadius: 6, shadowOffset: { width: 0, height: 2 }, elevation: 3 };
}
export interface PaperLiftOptions {
/** Resting tilt in degrees. */
tilt: number;
/** Points the paper rises while held. */
rise?: number;
/** Scale while held. */
grow?: number;
/** Share of the tilt taken out while held (0 keeps it, 1 straightens). */
straighten?: number;
/** Extra degrees of rotation added while held (a swing away from the tilt). */
swing?: number;
/** Fire the selection haptic as the paper lifts. Default true. */
haptic?: boolean;
disabled?: boolean;
}
/**
* usePaperLift — the family's one press: lift on touch-down (spring.press,
* so the paper answers the finger at once), lay back down on release
* (spring.surface, a calm settle with no bounce). `lift` runs 0 → 1 and
* drives shadows and peels. Reduced motion keeps the shadow change and drops
* the rise, scale and straightening.
*/
export function usePaperLift({
tilt,
rise = 3,
grow = 1.03,
straighten = 0.5,
swing = 0,
haptic = true,
disabled = false,
}: PaperLiftOptions) {
const reduce = useReducedMotion();
const haptics = useHaptic(haptic);
const lift = useSharedValue(0);
const onPressIn = useCallback(() => {
if (disabled) return;
haptics.selection();
lift.value = reduce ? withTiming(1, timing.fast) : withSpring(1, spring.press);
}, [disabled, haptics, lift, reduce]);
const onPressOut = useCallback(() => {
lift.value = reduce ? withTiming(0, timing.recede) : withSpring(0, spring.surface);
}, [lift, reduce]);
const surfaceStyle = useAnimatedStyle(() => {
const l = reduce ? 0 : lift.value;
return {
transform: [
{ translateY: -rise * l },
{ rotate: `${tilt * (1 - straighten * l) + swing * l}deg` },
{ scale: 1 + (grow - 1) * l },
],
};
}, [reduce, tilt, rise, grow, straighten, swing]);
const liftShadowStyle = useAnimatedStyle(() => ({ opacity: lift.value }));
return { lift, reduce, onPressIn, onPressOut, surfaceStyle, liftShadowStyle };
}
// ---------------------------------------------------------------------------
// Sticker
// ---------------------------------------------------------------------------
type Corner = "top-left" | "top-right" | "bottom-left" | "bottom-right";
/** Corner box of the peel, in points. The fold runs across its diagonal. */
const PEEL_SIZE = 28;
/** The curled corner's rounded tip, as a share of the peel box. */
const PEEL_TIP = 0.32;
const RADIUS = { rounded: 22, circle: 9999, pill: 9999 } as const;
export interface StickerProps
extends Omit<PressableProps, "children" | "style" | "accessibilityRole"> {
className?: string;
/** Sticker content — text, an icon, a small layout. Ignored when `image` is set. */
children?: React.ReactNode;
/** Image printed on the sticker. */
image?: ImageSourcePropType;
/** Image side in points (square). Default 112. */
size?: number;
/** Die-cut outline. Default "rounded". */
shape?: "rounded" | "circle" | "pill";
/** White cut edge in points. Default 6. */
edge?: number;
/** Resting tilt in degrees. Default -4. */
tilt?: number;
/** How far the corner is already peeled at rest, 0–1. Default 0 — it only
* peels while pressed. A resting peel shows `backdrop` under the corner. */
peel?: number;
/** Which corner peels. Default "bottom-right". */
peelCorner?: Corner;
/** Colour under the peeled corner — the page the sticker sits on. Default
* the theme background. */
backdrop?: string;
/** Classes for the inner face (background, padding) when using children. */
contentClassName?: string;
/** Selection haptic as it lifts. Default true. */
haptic?: boolean;
disabled?: boolean;
accessibilityLabel?: string;
}
export const Sticker = forwardRef<React.ElementRef<typeof Pressable>, StickerProps>(
function Sticker(
{
className,
children,
image,
size = 112,
shape = "rounded",
edge = 6,
tilt = -4,
peel = 0,
peelCorner = "bottom-right",
backdrop,
contentClassName,
haptic = true,
disabled,
onPress,
onPressIn,
onPressOut,
accessibilityLabel,
...props
},
ref
) {
const { colors, scheme } = useTheme();
const { lift, reduce, onPressIn: liftIn, onPressOut: liftOut, surfaceStyle, liftShadowStyle } =
usePaperLift({ tilt, haptic, disabled: !!disabled });
const vinyl = PAPER.vinyl[scheme];
const outer = RADIUS[shape];
const inner = shape === "rounded" ? Math.max(4, outer - edge) : 9999;
// A peel on a round die-cut has no corner to lift — circles and pills only rise.
const canPeel = shape === "rounded";
const resting = Math.min(1, Math.max(0, peel));
const peelStyle = useAnimatedStyle(() => {
const p = resting + (1 - resting) * lift.value;
// Reduced motion: the curl fades in at its full size instead of growing.
return {
opacity: Math.min(1, p * 6),
transform: [{ scale: reduce ? 1 : p }],
};
}, [reduce, resting]);
const bottom = peelCorner.startsWith("bottom");
const right = peelCorner.endsWith("right");
const peelPos: ViewStyle = {
position: "absolute",
width: PEEL_SIZE,
height: PEEL_SIZE,
[bottom ? "bottom" : "top"]: 0,
[right ? "right" : "left"]: 0,
transformOrigin: `${right ? "100%" : "0%"} ${bottom ? "100%" : "0%"}`,
};
const flip = { transform: [{ scaleX: right ? 1 : -1 }, { scaleY: bottom ? 1 : -1 }] };
const F = PEEL_SIZE;
const tip = F * PEEL_TIP;
const gradId = React.useId().replace(/:/g, "");
return (
<Pressable
ref={ref}
disabled={disabled}
onPress={onPress}
onPressIn={(e) => {
liftIn();
onPressIn?.(e);
}}
onPressOut={(e) => {
liftOut();
onPressOut?.(e);
}}
// Decorative vinyl with nothing to say stays out of the screen-reader order.
accessible={!!onPress || !!accessibilityLabel}
accessibilityRole={onPress ? "button" : image ? "image" : undefined}
accessibilityLabel={accessibilityLabel}
accessibilityState={onPress ? { disabled: !!disabled } : undefined}
className={cn("self-start", className)}
{...props}
>
<Animated.View style={surfaceStyle}>
<Animated.View
pointerEvents="none"
className="absolute inset-0"
style={[{ borderRadius: outer, backgroundColor: vinyl }, paperShadow(true), liftShadowStyle]}
/>
<View style={[{ borderRadius: outer, backgroundColor: vinyl, padding: edge }, paperShadow(false)]}>
<View
className={cn("items-center justify-center overflow-hidden", !image && contentClassName)}
style={{ borderRadius: inner }}
>
{image ? (
<Image source={image} style={{ width: size, height: size }} resizeMode="cover" />
) : (
children
)}
</View>
</View>
{canPeel ? (
<Animated.View pointerEvents="none" style={[peelPos, peelStyle]}>
<View style={[{ width: F, height: F }, flip]}>
<Svg width={F} height={F}>
<Defs>
<LinearGradient id={gradId} x1="0" y1="0" x2="1" y2="1">
<Stop offset="0" stopColor={PAPER.backing} />
<Stop offset="1" stopColor="#FFFFFF" />
</LinearGradient>
</Defs>
{/* The page shows where the corner left it. */}
<Path d={`M${F} 0 L${F} ${F} L0 ${F} Z`} fill={backdrop ?? colors.background} />
{/* The curl's shadow on the sticker face. */}
<Path d={`M0 ${F} L${F} 0 L${tip} 0 Q0 0 0 ${tip} Z`} fill="#000" opacity={0.14} transform="translate(-1.5 -1.5)" />
{/* The curled corner, white backing up. */}
<Path d={`M0 ${F} L${F} 0 L${tip} 0 Q0 0 0 ${tip} Z`} fill={`url(#${gradId})`} />
</Svg>
</View>
</Animated.View>
) : null}
</Animated.View>
</Pressable>
);
}
);
Sticker.displayName = "Sticker"; import { Sticker } from "@/components/ui/sticker/sticker";
export function Example() {
return (
<Sticker />
);
} Installation
Install the dependencies
npx expo install react-native-reanimated react-native-svgCopy the source from the Code tab into your project
components/ui/sticker/sticker.tsxcomponents/ui/sticker/index.tsUpdate the import paths to match your project setup.
Usage
import { HANDWRITING, PAPER, paperShadow, usePaperLift, Sticker } from "@/components/ui/sticker/sticker"; <Sticker /> Also exported: HANDWRITING, PAPER, paperShadow, usePaperLift.
API reference
className string — children React.ReactNode Sticker content — text, an icon, a small layout. Ignored when image is set.
image ImageSourcePropType Image printed on the sticker.
—size number Image side in points (square). Default 112.
112 shape "rounded" | "circle" | "pill" Die-cut outline. Default "rounded".
"rounded" edge number White cut edge in points. Default 6.
6 tilt number Resting tilt in degrees. Default -4.
-4 peel number How far the corner is already peeled at rest, 0–1. Default 0 — it only peels while pressed. A resting peel shows backdrop under the corner.
0 peelCorner Corner Which corner peels. Default "bottom-right".
"bottom-right" backdrop string Colour under the peeled corner — the page the sticker sits on. Default the theme background.
—contentClassName string Classes for the inner face (background, padding) when using children.
—haptic boolean Selection haptic as it lifts. Default true.
true disabled boolean — accessibilityLabel string —