Skip to content

Empty State

FeedbackWeb + NativeMIT
View in Storybook

Illustration + heading + call-to-action for empty data views.

bun add @otfdashkit/ui

Preview

Empty State
Loading Storybook preview…

Code

import { EmptyState } from '@otfdashkit/ui'
import { Inbox } from 'lucide-react'

export function Example() {
  return (
    <EmptyState
      icon={<Inbox className="h-10 w-10" />}
      title="No messages yet"
      description="When you receive messages, they will appear here."
      action={{ label: 'Compose', onClick: () => {} }}
    />
  )
}

Free with the SDK. This component ships in @otfdashkit/ui under the MIT license.

Props

Props declared in the EmptyState source. Inherited HTML attributes are not listed.

PropTypeDefaultDescription
titlerequiredstring
action{ label: string; onClick: () => void; }
classNamestring
descriptionstring
iconReactNode
secondaryAction{ label: string; onClick: () => void; }
size'sm' | 'default' | 'lg''default'