# With actions

> Message paired with Later and Update now buttons.

A shadcn/ui block from the [@flx](https://ui.flexnative.com) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/flx/banner-04).

- Page, with a live preview: https://shadcn.exchange/r/flx/banner-04
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/flx/banner-04-light-944e6c55f1e96a87.png
- Registry item: https://ui.flexnative.com/r/banner-04.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://ui.flexnative.com/r/banner-04.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `button`

## Files

### `registry/patterns/banner/banner-04.tsx`

```tsx
'use client'

import { useState } from 'react'
import { ArrowUpCircle, X } from 'lucide-react'

import { Button } from '@/components/ui/button'

export function Banner04() {
  const [open, setOpen] = useState(true)

  if (!open) {
    return (
      <button
        type="button"
        onClick={() => setOpen(true)}
        className="text-muted-foreground hover:text-foreground text-sm underline-offset-4 hover:underline"
      >
        Show banner again
      </button>
    )
  }

  return (
    <div className="flex w-full flex-col gap-3 rounded-lg border bg-card px-4 py-3.5 shadow-sm sm:flex-row sm:items-center">
      <span className="bg-primary/10 text-primary flex size-9 shrink-0 items-center justify-center rounded-full">
        <ArrowUpCircle className="size-5" />
      </span>
      <div className="flex flex-1 flex-col gap-0.5">
        <p className="text-sm font-medium">Update available — v2.4.0</p>
        <p className="text-muted-foreground text-sm">
          Restart the app to install the latest improvements and fixes.
        </p>
      </div>
      <div className="flex shrink-0 items-center gap-2">
        <Button
          variant="ghost"
          size="sm"
          onClick={() => setOpen(false)}
          className="text-muted-foreground"
        >
          Later
        </Button>
        <Button size="sm">Update now</Button>
      </div>
    </div>
  )
}
```
