Sonner 9

PreviousNext

A soft-styled info toast notification with color-mixed background for subtle messaging

Docs
shadcn-studiocomponent

Preview

Loading preview…
registry/new-york/components/sonner/sonner-09.tsx
'use client'

import { toast } from 'sonner'

import { Button } from '@/registry/new-york/ui/button'

const SoftInfoSonnerDemo = () => {
  return (
    <Button
      variant='outline'
      onClick={() =>
        toast.info('This is for your information, please note.', {
          style: {
            '--normal-bg':
              'color-mix(in oklab, light-dark(var(--color-sky-600), var(--color-sky-400)) 10%, var(--background))',
            '--normal-text': 'light-dark(var(--color-sky-600), var(--color-sky-400))',
            '--normal-border': 'light-dark(var(--color-sky-600), var(--color-sky-400))'
          } as React.CSSProperties
        })
      }
    >
      Soft Info Toast
    </Button>
  )
}

export default SoftInfoSonnerDemo

Installation

npx shadcn@latest add @shadcn-studio/sonner-09

Usage

import { Sonner09 } from "@/components/sonner-09"
<Sonner09 />