BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/diceui/base/status

status

diceui-base/status
FreeComponent

diceui/base publishes no description for this item.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/sadmann7/diceui/HEAD/docs/public/r/styles/base-vega/status.json

Source

ui/status.tsxraw.githubusercontent.com/sadmann7/diceui/HEAD/docs/public/r/styles/base-vega/status.json
1import { mergeProps } from "@base-ui/react/merge-props";
2import { useRender } from "@base-ui/react/use-render";
3import { cva, type VariantProps } from "class-variance-authority";
4import type * as React from "react";
5import { cn } from "@/lib/utils";
6
7const statusVariants = cva(
8 "inline-flex w-fit shrink-0 items-center gap-1.5 overflow-hidden whitespace-nowrap rounded-full border px-2.5 py-1 font-medium text-xs transition-colors",
9 {
10 variants: {
11 variant: {
12 default:
13 "border-transparent bg-muted text-muted-foreground **:data-[slot=status-indicator]:bg-muted-foreground",
14 success:
15 "border-green-500/20 bg-green-500/10 text-green-600 **:data-[slot=status-indicator]:bg-green-600 dark:text-green-400 **:data-[slot=status-indicator]:dark:bg-green-400",
16 error:
17 "border-destructive/20 bg-destructive/10 text-destructive **:data-[slot=status-indicator]:bg-destructive",
18 warning:
19 "border-orange-500/20 bg-orange-500/10 text-orange-600 **:data-[slot=status-indicator]:bg-orange-600 dark:text-orange-400 **:data-[slot=status-indicator]:dark:bg-orange-400",
20 info: "border-blue-500/20 bg-blue-500/10 text-blue-600 **:data-[slot=status-indicator]:bg-blue-600 dark:text-blue-400 **:data-[slot=status-indicator]:dark:bg-blue-400",
21 },
22 },
23 defaultVariants: {
24 variant: "default",
25 },
26 },
27);
28
29interface StatusProps
30 extends VariantProps<typeof statusVariants>,
31 React.ComponentProps<"div">,
32 useRender.ComponentProps<"div"> {}
33
34function Status(props: StatusProps) {
35 const { className, variant = "default", render, ...rootProps } = props;
36
37 return useRender({
38 defaultTagName: "div",
39 props: mergeProps<"div">(
40 {
41 className: cn(statusVariants({ variant }), className),
42 },
43 rootProps,
44 ),
45 render,
46 state: {
47 slot: "status",
48 variant,
49 },
50 });
51}
52
53function StatusIndicator(props: React.ComponentProps<"div">) {
54 const { className, ...indicatorProps } = props;
55
56 return (
57 <div
58 data-slot="status-indicator"
59 {...indicatorProps}
60 className={cn(
61 "relative flex size-2 shrink-0 rounded-full",
62 "before:absolute before:inset-0 before:animate-ping before:rounded-full before:bg-inherit",
63 "after:absolute after:inset-[2px] after:rounded-full after:bg-inherit",
64 className,
65 )}
66 />
67 );
68}
69
70function StatusLabel(props: React.ComponentProps<"div">) {
71// … truncated

What it pulls in

npm packages

  • @base-ui/react

Files it writes

  • ui/status.tsx

Facts

Registry
diceui/base
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-09
Last confirmed
2 days ago

Go to the source

www.diceui.com sadmann7/diceui on GitHub Raw registry item This item as JSON

More from diceui/base

All 192 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
action-baraction-bardiceui/baseComponentsFree1 dep
angle-sliderangle-sliderdiceui/baseComponentsFree1 dep · 3 files
avatar-groupavatar-groupdiceui/baseComponentsFree1 dep
badge-overflowbadge-overflowdiceui/baseComponentsFree1 dep · 2 files
bannerbannerdiceui/baseComponentsFree1 dep
circular-progresscircular-progressdiceui/baseComponentsFree1 dep
client-onlyclient-onlydiceui/baseComponentsFreeno deps
color-pickercolor-pickerdiceui/baseComponentsFree1 dep · 2 files
BlockDex

Built by

Kynth Studios

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studios

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studios

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex