HomeDocsComponentsBlocksChartsThemes
Introduction
  • Introduction
  • Installation
  • Themes
  • Artwork
  • llms.txt
Components
  • Accordion
  • Alert
  • Alert Dialog
  • Amount
  • Aspect Ratio
  • Audio Player
  • Avatar
  • Avatar Upload
  • Badge
  • Banner
  • Breadcrumb
  • Button
  • Button Group
  • Calendar
  • Card
  • Carousel
  • Chart
  • Checkbox
  • Code Block
  • Collapsible
  • Color Picker
  • Combobox
  • Command
  • Context Menu
  • Copy Button
  • Countdown
  • Data Grid
  • Data Table
  • Date Picker
  • Date Range Picker
  • Description List
  • Device Mockup
  • Dialog
  • Direction
  • Dot Loader
  • Drawer
  • Dropdown Menu
  • Empty
  • Field
  • File Upload
  • Hover Card
  • Icon Tile
  • Input
  • Input Group
  • Input OTP
  • Item
  • Kanban
  • Kbd
  • Label
  • Marquee
  • Menubar
  • Meter
  • Multi Select
  • Native Select
  • Navigation Menu
  • Number Field
  • Pagination
  • Password Strength
  • Phone Input
  • Popover
  • Progress
  • Progress Circle
  • Radio Group
  • Rating
  • Resizable
  • Responsive Dialog
  • Rich Text Editor
  • Scroll Area
  • Segmented Control
  • Select
  • Separator
  • Sheet
  • Sidebar
  • Signature
  • Skeleton
  • Slider
  • Sortable
  • Spinner
  • Stat
  • Stat Tabs
  • Stepper
  • Switch
  • Table
  • Tabs
  • Tag Input
  • Terminal
  • Textarea
  • Time Field
  • Timeline
  • Toast
  • Toggle
  • Toggle Group
  • Tooltip
  • Tree
  • Typography
  • Video Player
  • Window Mockup
AI
  • Message Scroller
  • Message
  • Bubble
  • Marker
  • Attachment
  • Questionnaire
  • Composer
  • Reasoning
  • Tool Call
  • Approval Card
  • Citations
Blocks
  • Airtable
  • Airtable Kanban
  • ClickUp List
  • ClickUp Kanban
  • Repeatable Group
  • Command Palette
  • Sign In and Sign Up
  • Availability Scheduler
  • AI Chat
  • Action Bar
  • Notion
  • Banking
  • Lineup Builder
  • Sports Score
  • Strava
  • Sheets
  • Notices
  • Settings
  • Billing
Templates
  • Sign In Page
  • Upload Page
  • Agreement Sign
  • Email
  • Email Composer
  • Share Dialog
  • Integrations
  • Transactions
  • Analytics
Utilities
  • motion
  • sounds
  • scroll-fade
  • shimmer
Another UI. Built on shadcn/ui with Phosphor icons.

Analytics

PreviousNext

A store dashboard with a sidebar, metric cards you can swap and drag, revenue charts with a hatched forecast, and a customers table with bulk actions.

Change the period or product, swap or drag a metric card, hover a chart, or select customers for the action bar.

Full page

Installation#

pnpm dlx shadcn@latest add https://anotherui.dev/r/analytics.json

Features#

  • One toolbar row. The period (this year, 30 days, 7 days, 24 hours) and the product sit in one row with Export. Every figure and chart follows them.
  • Metric cards. Each card's label is a menu to swap which metric it shows, and the handle drags it into a new order, with the Sortable primitive.
  • Forecast charts. ForecastChart draws this period against the last one, dashed. Points after today are a projection: the line fades and the zone behind it is hatched. Hover for both values. The two chart cards can be reordered too.
  • Customers. A Data Table with avatars, a status filter and delete and edit on each row. Selecting rows raises the Action Bar with Export, Archive and Delete, and deletes can be undone from the toast.
  • Sidebar. A workspace menu with keyboard shortcuts, navigation with a badge, a folder tree, a dismissible "What's new" card and the signed-in user. It hides on narrow screens.

Usage#

import { AnalyticsPage, ForecastChart } from "@/components/blocks/analytics"
 
<AnalyticsPage
  workspace="Acme"
  user={{ name: "Ana Cheng", email: "ana@acme.com", avatar: "/ana.png" }}
  customers={customers}
/>
 
<ForecastChart
  data={[{ label: "Jan", value: 4200, previous: 3900 } /* ... */]}
  forecastFrom={10}
  format={(v) => `$${v.toLocaleString()}`}
/>

Props#

  • workspace, user. Shown in the sidebar.
  • customers. Rows for the table: name, handle, email, avatar, date (ISO), status (paid, pending or refunded) and amount. Demo rows are used when left out.
  • ForecastChart. data is a list of label, value and an optional previous. forecastFrom is the index of the first projected point. format formats the tooltip values.
Transactionsmotion

On This Page

InstallationFeaturesUsageProps