HomeDocsComponentsBlocksChartsThemes
Introduction
  • Introduction
  • Installation
  • Themes
  • Artwork
  • llms.txt
Components
  • Accordion
  • Alert
  • Alert Dialog
  • Amount
  • Aspect Ratio
  • Audio Player
  • Avatar
  • Avatar Upload
  • Badge
  • Banner
  • Brand SVG
  • Breadcrumb
  • Button
  • Button Group
  • Calendar
  • Card
  • Carousel
  • Cart Button
  • Cart Line Item
  • Cart Summary
  • 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
  • Fill Blank
  • File Icon
  • File Upload
  • Form Guide
  • Hover Card
  • Icon Tile
  • Image Export
  • Input
  • Input Group
  • Input OTP
  • Item
  • Kanban
  • Kbd
  • Label
  • League Table
  • Marquee
  • Match Score
  • Menubar
  • Meter
  • Multi Select
  • Native Select
  • Navigation Menu
  • Number Field
  • Pagination
  • Password Strength
  • Person Avatar
  • Phone Input
  • Popover
  • Price
  • Product Card
  • Progress
  • Progress Circle
  • Radio Group
  • Rating
  • Resizable
  • Responsive Dialog
  • Rich Text Editor
  • Scroll Area
  • Segmented Control
  • Select
  • Separator
  • Sheet
  • Sidebar
  • Signature
  • Skeleton
  • Slider
  • Sonner
  • 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
  • Message Toolbar
Blocks
  • Airtable
  • Airtable Kanban
  • CRM
  • ClickUp List
  • ClickUp Kanban
  • Repeatable Group
  • Command Palette
  • App Shell
  • Record Files
  • Settings Shell
  • Help Panel
  • Note Editor
  • Email Drafts
  • Task List
  • Notifications Panel
  • Dual Pane Sidebar
  • Team Members Panel
  • Mix Pack Builder
  • Record Picker and Date Quick-pick
  • Record List
  • Record Page
  • Sign In and Sign Up
  • Availability Scheduler
  • AI Chat
  • AI Assistant
  • Voice Message
  • Action Bar
  • Notion
  • Banking
  • Lineup Builder
  • Sports Score
  • Standings
  • Strava
  • Sheets
  • Notices
  • Settings
  • Billing
Templates
  • Sign In Page
  • Upload Page
  • Showcase Onboarding
  • 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.

Cart Line Item

PreviousNext

One line of a cart, built on Item. A thumbnail, the title, the variant, what is inside a mix pack, the quantity, the price and a remove button.

UI SDKRadix UI
Radix UI
Paloma Agave

4 pack

Qty 1$15.96
Mix pack of 12

12 pack

Paloma Agave
×4
Pear Elderflower
×5
Peach Maple
×3
$95.76

Installation#

pnpm dlx shadcn@latest add https://anotherui.dev/r/cart-line-item.json

Usage#

import { CartLineItem, CartLineItems } from "@/components/ui/cart-line-item"
import { Price } from "@/components/ui/price"
 
<CartLineItems>
  {cart.lines.map((line) => (
    <CartLineItem
      key={line.id}
      media={<img src={line.image} alt="" />}
      title={line.title}
      variant={line.variantTitle}
      details={line.attributes.map((a) => ({ label: a.key, value: a.value }))}
      quantity={<span>Qty {line.quantity}</span>}
      price={<Price value={line.price} />}
      action={<RemoveButton line={line} />}
    />
  ))}
</CartLineItems>

Pass a Number Field as quantity to let people change it in place.

Props#

  • media. An img or anything else. It fills a 4 by 5 thumbnail.
  • title. The product name. It wraps to two lines.
  • variant. The chosen option, such as 4 pack.
  • details. Label and value pairs under the variant, shown as Paloma Agave ×4.
  • quantity. Text, or a Number Field.
  • price. A Price or an Amount.
  • action. A remove button, or a form around one. Give the button a label that names the product.
  • CartLineItems. The list around the lines.
Cart ButtonCart Summary

On This Page

InstallationUsageProps