Alert 13

PreviousNext

displaying a minimal "New message!" notification with an attention icon and an actionable "Open" button

Docs
shadcn-studiocomponent

Preview

Loading preview…
registry/new-york/components/alert/alert-13.tsx
import { CircleAlertIcon } from 'lucide-react'

import { Alert, AlertTitle } from '@/registry/new-york/ui/alert'
import { Button } from '@/registry/new-york/ui/button'

const AlertWithActionDemo = () => {
  return (
    <Alert className='flex items-center justify-between [&>svg]:translate-y-0'>
      <CircleAlertIcon />
      <AlertTitle className='flex-1'>New message!</AlertTitle>
      <Button variant='outline' className='h-7 cursor-pointer rounded-md px-2'>
        Open
      </Button>
    </Alert>
  )
}

export default AlertWithActionDemo

Installation

npx shadcn@latest add @shadcn-studio/alert-13

Usage

import { Alert13 } from "@/components/alert-13"
<Alert13 />