suiss/uim · Block

Dash Store

A store sales dashboard with a range switcher, stat tiles, a daily bar chart, filtered recent orders and a tab bar.

Dash Store is an open-source mobile screen from suiss/uim for React Native and Expo, with SwiftUI and Jetpack Compose versions built from the same design tokens. The @esuiss/uim CLI copies its source into your project, so you own the code.

iOS
Dash Store on iOS in light mode

Composes Screen, Header, DropdownMenu for picking the store, ToggleGroup, the BarChart from Chart, Chip filters, Avatar, Item rows and TabBar. The bar chart compares online and in-store sales per day, and pressing a day highlights it and shows its total. Order status chips filter the list.

Installation

$ pnpm dlx @esuiss/uim@latest add dash-store

The CLI also adds what it builds on: Avatar, Button, Chart, Chip, Dropdown Menu, Header, Icon, Item, Screen, Tab Bar, Text, Toggle Group.

Manual

  1. Install the dependencies:
npx expo install cn phosphor-react-native react-native-reanimated react-native-svg react-native-worklets
  1. Add the pieces it builds on: Avatar, Button, Chart, Chip, Dropdown Menu, Header, Icon, Item, Screen, Tab Bar, Text, Toggle Group.

  2. Copy the source into components/blocks/dash-store.tsx:

uniwind/components/blocks/dash-store.tsx
import { cn } from "cn"
import {
  CaretDownIcon,
  ChartBarIcon,
  HandbagIcon,
  HouseIcon,
  type Icon as PhosphorIcon,
  StorefrontIcon,
  UsersIcon,
} from "phosphor-react-native"
import * as React from "react"
import { View } from "react-native"
import { FadeInDown, ReduceMotion } from "react-native-reanimated"
import { AnimatedView } from "@/components/ui/animated-view"
import { Avatar, AvatarFallback } from "@/components/ui/avatar"
import { Button } from "@/components/ui/button"
  1. Update the import paths to match your project.

Usage

import { DashStore } from "@/components/blocks/dash-store"
<DashStore />

Replace STORES, ranges, week, orders and filters with your store data. Pass onRangeChange, onFilterChange, onStoreChange, onOrderPress and onNavigate to react to each control.