Management Bar
animate-ui/components-community-management-barFreeComponent
A management bar for managing items.
Install it
npx shadcn@latest add https://animate-ui.com/r/components-community-management-bar.jsonSource
1'use client';23import * as React from 'react';4import {5 ChevronLeft,6 ChevronRight,7 Ban,8 X,9 Command,10 IdCard,11} from 'lucide-react';12import { SlidingNumber } from '@/components/animate-ui/primitives/texts/sliding-number';13import { motion, type Variants, type Transition } from 'motion/react';1415const TOTAL_PAGES = 10;1617const BUTTON_MOTION_CONFIG = {18 initial: 'rest',19 whileHover: 'hover',20 whileTap: 'tap',21 variants: {22 rest: { maxWidth: '40px' },23 hover: {24 maxWidth: '140px',25 transition: { type: 'spring', stiffness: 200, damping: 35, delay: 0.15 },26 },27 tap: { scale: 0.95 },28 },29 transition: { type: 'spring', stiffness: 250, damping: 25 },30} as const;3132const LABEL_VARIANTS: Variants = {33 rest: { opacity: 0, x: 4 },34 hover: { opacity: 1, x: 0, visibility: 'visible' },35 tap: { opacity: 1, x: 0, visibility: 'visible' },36};3738const LABEL_TRANSITION: Transition = {39 type: 'spring',40 stiffness: 200,41 damping: 25,42};4344function ManagementBar() {45 const [currentPage, setCurrentPage] = React.useState(1);4647 const handlePrevPage = React.useCallback(() => {48 if (currentPage > 1) setCurrentPage(currentPage - 1);49 }, [currentPage]);5051 const handleNextPage = React.useCallback(() => {52 if (currentPage < TOTAL_PAGES) setCurrentPage(currentPage + 1);53 }, [currentPage]);5455 return (56 <div className="@container/wrapper w-full flex justify-center">57 <div className="flex w-fit flex-col @xl/wrapper:flex-row items-center gap-y-2 rounded-2xl border border-border bg-background p-2 shadow-lg">58 <div className="mx-auto flex flex-col @lg/wrapper:flex-row shrink-0 items-center">59 <div className="flex h-10">60 <button61 disabled={currentPage === 1}62 className="p-1 text-muted-foreground transition-colors hover:text-foreground disabled:text-muted-foreground/30 disabled:hover:text-muted-foreground/30"63 onClick={handlePrevPage}64 >65 <ChevronLeft size={20} />66 </button>67 <div className="mx-2 flex items-center space-x-1 text-sm tabular-nums">68 <SlidingNumber69 className="text-foreground"70 padStart71 number={currentPage}72 />73 <span className="text-muted-foreground">/ {TOTAL_PAGES}</span>74 </div>75 <button76 disabled={currentPage === TOTAL_PAGES}77// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from Animate UI
All 580 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Avatar Groupcomponents-animate-avatar-group | Animate UI | Components | Free | 1 dep | |
| Codecomponents-animate-code | Animate UI | Components | Free | 1 dep | |
| Code Tabscomponents-animate-code-tabs | Animate UI | Components | Free | 1 dep | |
| Cursorcomponents-animate-cursor | Animate UI | Components | Free | no deps | |
| GitHub Stars Wheelcomponents-animate-github-stars-wheel | Animate UI | Components | Free | 1 dep | |
| Tabscomponents-animate-tabs | Animate UI | Components | Free | no deps | |
| Tooltipcomponents-animate-tooltip | Animate UI | Components | Free | 1 dep | |
| Bubble Backgroundcomponents-backgrounds-bubble | Animate UI | Components | Free | 1 dep |
