Components / PaperAlert

Feedback

PaperAlert

Editorial notice box with clear severity accents.

← urgency without shouting.

Preview

Notice
!

Scheduled maintenance

Read-only mode starts Friday at 11:00 PM IST.

import * as React from 'react'
import { cva, type VariantProps } from 'class-variance-authority'
import { cn } from '@/lib/utils'

const paperAlertVariants = cva(
  'relative overflow-hidden rounded-none border-2 border-ink-black p-5 shadow-lift-1 transition-all duration-150 ease-paper',

Installation

Copy this file into your project, export its barrel, and then add it to the master UI index.

  1. Step 1.Create this file:
    components/ui/paperAlert/paperAlert.tsx
  2. Step 2.Create the barrel:
    components/ui/paperAlert/index.ts
  3. Step 3.Add this export in components/ui/index.ts:
    export * from './paperAlert'

Variants

Info

Notice
!

Heads up

New docs are available.

Success

Notice
!

Saved

All changes synced.

Warning

Notice
!

Warning

Double-check before publishing.

Danger

Notice
!

Blocked

Permission required.

Props

PropTypeDefaultDescription
variant'info' | 'success' | 'warning' | 'danger'infoAccent stripe and tone color.
childrenReactNoderequiredAlert title/content blocks.

Examples

Deployment warning

Use warning variant for risky actions.

Notice
!

Production deploy

Traffic may spike for 3-5 minutes.

<PaperAlert variant="warning">...</PaperAlert>

Success confirmation

Short success notice after async actions.

Notice
!

Publish complete

Your page is live.

<PaperAlert variant="success">...</PaperAlert>