Empty
octane/emptyFreeComponent
octane publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by octane on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://raw.githubusercontent.com/octanejs/octane/main/packages/shadcn/registry/empty.jsonSource
1// Base UI base empty — presentational, no headless primitive in any base.2//3// UNVERIFIED PROVENANCE: derived from this package's React Aria base rather than transcribed4// from upstream's `bases/base-ui/ui/empty.tsx`, which was not available at port time.5// Diff the class strings against the upstream source before treating this as ported.6import { cva, type VariantProps } from 'class-variance-authority';78import { cn } from '@/lib/utils';9import type { DivProps, HostProps } from '@/lib/types';1011export function Empty({ className, ...props }: DivProps) @{12 <div13 data-slot="empty"14 className={cn(15 'flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance',16 className,17 )}18 {...props}19 />20}2122export function EmptyHeader({ className, ...props }: DivProps) @{23 <div24 data-slot="empty-header"25 className={cn('flex max-w-sm flex-col items-center gap-2', className)}26 {...props}27 />28}2930export const emptyMediaVariants = cva(31 'mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0',32 {33 variants: {34 variant: {35 default: 'bg-transparent',36 icon: 'flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*=\'size-\'])]:size-4',37 },38 },39 defaultVariants: {40 variant: 'default',41 },42 },43);4445export interface EmptyMediaProps extends DivProps {46 variant?: VariantProps<typeof emptyMediaVariants>['variant'];47}4849export function EmptyMedia({ className, variant = 'default', ...props }: EmptyMediaProps) @{50 <div51 data-slot="empty-icon"52 data-variant={variant}53 className={cn(emptyMediaVariants({ variant, className }))}54 {...props}55 />56}5758export function EmptyTitle({ className, ...props }: DivProps) @{59 <div60 data-slot="empty-title"61 className={cn('text-sm font-medium tracking-tight', className)}62 {...props}63 />64}6566// Upstream types this part as a `<p>` while rendering a `<div>`; the prop type is transcribed67// as-authored rather than "corrected", so the surface matches upstream exactly.68export function EmptyDescription({ className, ...props }: HostProps<'p'>) @{69 <div70 data-slot="empty-description"71 className={cn(72 'text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary',73 className,74 )}75 {...props}76 />77}7879export function EmptyContent({ className, ...props }: DivProps) @{80 <div81 data-slot="empty-content"82 className={cn(83// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from octane
All 44 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | octane | Components | Free | 2 deps | |
| Alertalert | octane | Components | Free | 1 dep | |
| Alert Dialogalert-dialog | octane | Components | Free | 1 dep | |
| Aspect Ratioaspect-ratio | octane | Components | Free | no deps | |
| Avataravatar | octane | Components | Free | 1 dep | |
| Badgebadge | octane | Components | Free | 1 dep | |
| Breadcrumbbreadcrumb | octane | Components | Free | 1 dep | |
| Buttonbutton | octane | Components | Free | 2 deps |
