===== COMPONENT: animated-badge =====
Title: animated-badge
Description: An animated badge component.
--- file: eldoraui/animated-badge.tsx ---
"use client"
import Link from "next/link"
import { ChevronRight } from "lucide-react"
import { motion } from "motion/react"
type AnimatedBadgeProps = {
text?: string
color?: string // hex or css color value
href?: string // optional redirect link
}
function hexToRgba(hexColor: string, alpha: number): string {
const hex = hexColor.replace("#", "")
if (hex.length === 3) {
const r = parseInt(hex[0] + hex[0], 16)
const g = parseInt(hex[1] + hex[1], 16)
const b = parseInt(hex[2] + hex[2], 16)
return `rgba(${r}, ${g}, ${b}, ${alpha})`
}
if (hex.length === 6) {
const r = parseInt(hex.substring(0, 2), 16)
const g = parseInt(hex.substring(2, 4), 16)
const b = parseInt(hex.substring(4, 6), 16)
return `rgba(${r}, ${g}, ${b}, ${alpha})`
}
return hexColor
}
const AnimatedBadge = ({
text = "Introducing Eldoraui",
color = "#22d3ee",
href,
}: AnimatedBadgeProps) => {
const content = (
Start by searching or entering a web address
{cardDescription}
{characters}
{line.kind === "add"
? "+"
: line.kind === "del"
? "-"
: " "}
{line.content}
{openThreadAt === idx && line.kind !== "hunk" && (
{c.author}
{c.createdAt}{c.body}
This is a GitHub-style inline diff comments component. Hover over a line in the diff to reveal the "Add comment" button, then click to open a compact inline thread for discussion—just like reviewing code on GitHub.
Connect with your favorite tools and services. Our platform integrates with over 100+ applications to streamline your workflow and boost productivity.
{title}
{elements}