tigran tumasov

Note

Component 26

About

Display text that requires attention or provides additional information.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Note to your project and fits it to your theme.

Code

How Note is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import { Fragment } from "react";
import { Button } from "@/components/ui/button-1";
import { Note, TNoteType } from "@/components/ui/note";

const types: TNoteType[] = [
  "secondary",
  "tertiary",
  "warning",
  "success",
  "default",
  "alert",
  "error",
  "lite",
  "ghost",
  "alert",
  "violet",
  "cyan",
  "rotate-ccw"
];

export default function LabelsDemo() {
  return (
      <div className="flex flex-col items-start gap-4 w-3/4 py-4">
        <div className="flex flex-col gap-4">
          <div className="font-bold dark:text-white">Default label</div>
          {types.map((t) => (
            <Fragment key={t}>
              <Note type={t}>This is a note of type `{t}`.</Note>
              <Note fill type={t}>
                This is a fill note of type `{t}`.
              </Note>
            </Fragment>
          ))}
        </div>
        <div className="flex flex-col gap-4">
          <div className="font-bold dark:text-white">Custom label</div>
          {types.map((t) => (
            <Fragment key={t}>
              <Note label={t} type={t}>
                This is a note of type `{t}`.
              </Note>
              <Note fill label={t} type={t}>
                This is a fill note of type `{t}`.
              </Note>
            </Fragment>
          ))}
        </div>
        <div className="flex flex-col gap-4">
          <div className="font-bold dark:text-white">No label</div>
          {types.map((t) => (
            <Fragment key={t}>
              <Note label={false} type={t}>
                This is a note of type `{t}`.
              </Note>
              <Note fill label={false} type={t}>
                This is a fill note of type `{t}`.
              </Note>
            </Fragment>
          ))}
        </div>
      </div>
  );
}

Dependencies

More by tigran tumasov

View all
  • Product Hunt Badge

    Product Hunt Badge

    1.8K
  • Book

    Book

    162
  • Calendar

    Calendar

    152
  • Theme Switcher

    Theme Switcher

    135
  • Snippet

    Snippet

    124
  • Table

    Table

    123
  • Toggle

    Toggle

    89
  • Feedback

    Feedback

    88