InvoiceFolder
A folder with a frosted-glass front and invoice sheets peeking out the top. The sheets bob gently; press it and they lift and fan out while the folder dips and the logo sticker tilts.
Preview
Preview coming soon
Try it live: run the CLI command below in an Expo app, or open the Code tab.
Installation
npx @codewithrabby/ui@latest add invoice-folderUsage
import { InvoiceFolder } from "@/components/uir/invoice-folder";
const folderW = (width - 40 - 16) / 2; // two per row
<View style={{ flexDirection: "row", flexWrap: "wrap", justifyContent: "space-between", rowGap: 22 }}>
{clients.map((c, i) => (
<InvoiceFolder
key={c.id}
name={c.name}
count={c.invoices.length}
papers={["overdue", "pending", "paid"]}
sticker={{ label: "F", color: "#a259ff" }}
// stickerContent={<Image source={c.logo} style={{ width: "100%", height: "100%" }} />}
width={folderW}
floatDelay={i * 250}
onPress={() => router.push(`/clients/${c.id}`)}
/>
))}
</View>Props
| Prop | Type | Default |
|---|---|---|
nameLabel under the folder. | string | — |
countNumber in the pill next to the name. | number | — |
papersSheets peeking out, back to front. 1–3 look best. | ("paid" | "pending" | "overdue")[] | — |
stickerLogo sticker: short text on a colour. | { label, color } | — |
stickerContentAny element for the sticker instead, e.g. an <Image>. | ReactNode | — |
markSmall mark bottom-left of the front. null hides it. | ReactNode | null | signature icon |
onPressCalled when the folder is tapped. | () => void | — |
widthFolder width; the height follows. | number | 160 |
floatDelayms before the idle bob starts. Stagger it in a grid. | number | 0 |
paperColorsOverride the sheet colours. | Partial<Record<status, string>> | — |
folderColorColour of the folder back. | string | "#e4e4e7" |