Marker
blode-ui/markerFreeComponent
A compact inline status line for activity feeds and transcripts, with optional icon, separator, and border variants.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/mblode/blode-ui/main/public/r/marker.jsonSource
1import { mergeProps } from "@base-ui/react/merge-props";2import { useRender } from "@base-ui/react/use-render";3import { cva } from "class-variance-authority";4import type { VariantProps } from "class-variance-authority";5import type * as React from "react";67import { cn } from "@/lib/utils";89const markerVariants = cva(10 "group/marker relative flex min-h-4 w-full items-center gap-2 text-left text-muted-foreground text-sm [a]:underline [a]:underline-offset-3 [a]:hover:text-foreground [&_svg:not([class*='size-'])]:size-4",11 {12 variants: {13 variant: {14 border: "border-border border-b pb-2",15 default: "",16 separator:17 "before:mr-1 before:h-px before:min-w-0 before:flex-1 before:bg-border after:ml-1 after:h-px after:min-w-0 after:flex-1 after:bg-border",18 },19 },20 },21);2223const Marker = ({24 className,25 variant = "default",26 render,27 ...props28}: useRender.ComponentProps<"div"> & VariantProps<typeof markerVariants>) =>29 useRender({30 defaultTagName: "div",31 props: mergeProps<"div">(32 {33 className: cn(markerVariants({ className, variant })),34 },35 props,36 ),37 render,38 state: {39 slot: "marker",40 variant,41 },42 });4344const MarkerIcon = ({ className, ...props }: React.ComponentProps<"span">) => (45 <span46 aria-hidden="true"47 className={cn("size-4 shrink-0 [&_svg:not([class*='size-'])]:size-4", className)}48 data-slot="marker-icon"49 {...props}50 />51);5253const MarkerContent = ({ className, ...props }: React.ComponentProps<"span">) => (54 <span55 className={cn(56 "min-w-0 wrap-break-word group-data-[variant=separator]/marker:flex-none group-data-[variant=separator]/marker:text-center *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",57 className,58 )}59 data-slot="marker-content"60 {...props}61 />62);6364export { Marker, MarkerIcon, MarkerContent, markerVariants };
What it pulls in
npm packages
Files it writes
More from blode/ui
All 85 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | blode/ui | Components | Free | 2 deps | |
| Alertalert | blode/ui | Components | Free | no deps | |
| Alert Dialogalert-dialog | blode/ui | Components | Free | 1 dep | |
| Ask User Questionsask-user-questions | blode/ui | Components | Free | 1 dep | |
| Aspect Ratioaspect-ratio | blode/ui | Components | Free | 1 dep | |
| Attachmentattachment | blode/ui | Components | Free | 1 dep | |
| Autocompleteautocomplete | blode/ui | Components | Free | 1 dep | |
| Avataravatar | blode/ui | Components | Free | 1 dep |
