21st.dev 원본
작업 요청 알림 · Origin UI
섹션 · MIT
갤러리 안에서는 화면을 벗어나거나 움직임을 멈추면 예제도 닫힙니다. 다시 재생할 때는 처음부터 시작해요.
저장한 HTML에서는 갤러리의 재생 설정이 적용되지 않아요.
SOURCE FILES
원본 코드 읽기
수집한 원본 소스와 실행 안내를 함께 제공합니다. 실행 HTML에는 미리보기를 위한 실행 환경이 들어 있습니다.
author-example.tsx
import { TriangleAlertIcon, XIcon } from "lucide-react";
import { Button } from "@/registry/default/ui/button";
export default function Component() {
return (
// To make the notification fixed, add classes like `fixed bottom-4 right-4` to the container element.
<div className="z-50 max-w-[400px] rounded-md border bg-background p-4 shadow-lg">
<div className="flex gap-2">
<div className="flex grow gap-3">
<TriangleAlertIcon
aria-hidden="true"
className="mt-0.5 shrink-0 text-amber-500"
size={16}
/>
<div className="flex grow flex-col gap-3">
<div className="space-y-1">
<p className="font-medium text-sm">
Something requires your action!
</p>
<p className="text-muted-foreground text-sm">
It conveys that a specific action is needed to resolve or
address a situation.
</p>
</div>
<div>
<Button size="sm">Learn more</Button>
</div>
</div>
</div>
<Button
aria-label="Close notification"
className="group -my-1.5 -me-2 size-8 shrink-0 p-0 hover:bg-transparent"
variant="ghost"
>
<XIcon
aria-hidden="true"
className="opacity-60 transition-opacity group-hover:opacity-100"
size={16}
/>
</Button>
</div>
</div>
);
}
LICENSE
MIT License
Copyright (c) 2025 coss.com
Originally Copyright (c) 2025 Origin UI
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
함께 쓰는 파일 12개 보기
upstream/apps/origin/config/components.ts
export interface ComponentCategory {
slug: string;
name: string;
components: { name: string }[];
isNew?: boolean;
}
export const categories: ComponentCategory[] = [
{
components: [
{ name: "comp-334" },
{ name: "comp-335" },
{ name: "comp-336" },
{ name: "comp-337" },
{ name: "comp-338" },
{ name: "comp-339" },
{ name: "comp-340" },
{ name: "comp-341" },
{ name: "comp-342" },
{ name: "comp-343" },
{ name: "comp-344" },
{ name: "comp-345" },
{ name: "comp-346" },
{ name: "comp-347" },
{ name: "comp-348" },
{ name: "comp-349" },
{ name: "comp-350" },
{ name: "comp-351" },
{ name: "comp-352" },
{ name: "comp-353" },
],
name: "Accordion",
slug: "accordion",
},
{
components: [
{ name: "comp-267" },
{ name: "comp-268" },
{ name: "comp-269" },
{ name: "comp-270" },
{ name: "comp-271" },
{ name: "comp-272" },
{ name: "comp-273" },
{ name: "comp-274" },
{ name: "comp-275" },
{ name: "comp-276" },
{ name: "comp-277" },
{ name: "comp-278" },
],
name: "Alert",
slug: "alert",
},
{
components: [
{ name: "comp-390" },
{ name: "comp-391" },
{ name: "comp-392" },
{ name: "comp-393" },
{ name: "comp-394" },
{ name: "comp-395" },
{ name: "comp-396" },
{ name: "comp-397" },
{ name: "comp-398" },
{ name: "comp-399" },
{ name: "comp-400" },
{ name: "comp-401" },
{ name: "comp-402" },
{ name: "comp-403" },
{ name: "comp-404" },
{ name: "comp-405" },
{ name: "comp-406" },
{ name: "comp-407" },
{ name: "comp-408" },
{ name: "comp-409" },
{ name: "comp-410" },
{ name: "comp-411" },
{ name: "comp-412" },
],
name: "Avatar",
slug: "avatar",
},
{
components: [
{ name: "comp-413" },
{ name: "comp-414" },
{ name: "comp-415" },
{ name: "comp-416" },
{ name: "comp-417" },
{ name: "comp-418" },
{ name: "comp-419" },
{ name: "comp-420" },
{ name: "comp-421" },
{ name: "comp-422" },
{ name: "comp-423" },
{ name: "comp-424" },
{ name: "comp-425" },
],
name: "Badge",
slug: "badge",
},
{
components: [
{ name: "comp-301" },
{ name: "comp-302" },
{ name: "comp-303" },
{ name: "comp-304" },
{ name: "comp-305" },
{ name: "comp-306" },
{ name: "comp-307" },
{ name: "comp-308" },
{ name: "comp-309" },
{ name: "comp-310" },
{ name: "comp-311" },
{ name: "comp-312" },
],
name: "Banner",
slug: "banner",
},
{
components: [
{ name: "comp-446" },
{ name: "comp-447" },
{ name: "comp-448" },
{ name: "comp-449" },
{ name: "comp-450" },
{ name: "comp-451" },
{ name: "comp-452" },
{ name: "comp-453" },
],
name: "Breadcrumb",
slug: "breadcrumb",
},
{
components: [
{ name: "comp-78" },
{ name: "comp-79" },
{ name: "comp-80" },
{ name: "comp-81" },
{ name: "comp-82" },
{ name: "comp-83" },
{ name: "comp-84" },
{ name: "comp-85" },
{ name: "comp-86" },
{ name: "comp-87" },
{ name: "comp-88" },
{ name: "comp-89" },
{ name: "comp-90" },
{ name: "comp-91" },
{ name: "comp-92" },
{ name: "comp-93" },
{ name: "comp-94" },
{ name: "comp-95" },
{ name: "comp-96" },
{ name: "comp-97" },
{ name: "comp-98" },
{ name: "comp-99" },
{ name: "comp-100" },
{ name: "comp-101" },
{ name: "comp-129" },
{ name: "comp-130" },
{ name: "comp-102" },
{ name: "comp-103" },
{ name: "comp-104" },
{ name: "comp-105" },
{ name: "comp-106" },
{ name: "comp-107" },
{ name: "comp-108" },
{ name: "comp-109" },
{ name: "comp-110" },
{ name: "comp-111" },
{ name: "comp-112" },
{ name: "comp-113" },
{ name: "comp-114" },
{ name: "comp-131" },
{ name: "comp-115" },
{ name: "comp-116" },
{ name: "comp-117" },
{ name: "comp-118" },
{ name: "comp-119" },
{ name: "comp-120" },
{ name: "comp-121" },
{ name: "comp-122" },
{ name: "comp-123" },
{ name: "comp-124" },
{ name: "comp-125" },
{ name: "comp-126" },
{ name: "comp-127" },
{ name: "comp-128" },
],
name: "Button",
slug: "button",
},
{
components: [
{ name: "comp-487" },
{ name: "comp-488" },
{ name: "comp-489" },
{ name: "comp-490" },
{ name: "comp-491" },
{ name: "comp-492" },
{ name: "comp-493" },
{ name: "comp-494" },
{ name: "comp-495" },
{ name: "comp-496" },
{ name: "comp-497" },
{ name: "comp-498" },
{ name: "comp-499" },
{ name: "comp-500" },
{ name: "comp-501" },
{ name: "comp-502" },
{ name: "comp-503" },
{ name: "comp-504" },
{ name: "comp-505" },
{ name: "comp-506" },
{ name: "comp-507" },
{ name: "comp-508" },
{ name: "comp-509" },
{ name: "comp-510" },
{ name: "comp-41" },
{ name: "comp-42" },
{ name: "comp-511" },
{ name: "comp-512" },
],
name: "Calendar & Date picker",
slug: "calendar-date-picker",
},
{
components: [
{ name: "comp-132" },
{ name: "comp-133" },
{ name: "comp-134" },
{ name: "comp-135" },
{ name: "comp-136" },
{ name: "comp-137" },
{ name: "comp-138" },
{ name: "comp-139" },
{ name: "comp-151" },
{ name: "comp-140" },
{ name: "comp-141" },
{ name: "comp-142" },
{ name: "comp-143" },
{ name: "comp-144" },
{ name: "comp-145" },
{ name: "comp-146" },
{ name: "comp-147" },
{ name: "comp-148" },
{ name: "comp-149" },
{ name: "comp-150" },
],
name: "Checkbox",
slug: "checkbox",
},
{
components: [
{ name: "comp-554" },
{ name: "comp-555" },
{ name: "comp-556" },
{ name: "comp-557" },
{ name: "comp-558" },
{ name: "comp-559" },
{ name: "comp-560" },
{ name: "comp-561" },
{ name: "comp-562" },
{ name: "comp-563" },
{ name: "comp-564" },
],
name: "Image Cropper",
slug: "image-cropper",
},
{
components: [
{ name: "comp-313" },
{ name: "comp-314" },
{ name: "comp-315" },
{ name: "comp-316" },
{ name: "comp-317" },
{ name: "comp-318" },
{ name: "comp-319" },
{ name: "comp-320" },
{ name: "comp-321" },
{ name: "comp-322" },
{ name: "comp-323" },
{ name: "comp-324" },
{ name: "comp-325" },
{ name: "comp-326" },
{ name: "comp-327" },
{ name: "comp-328" },
{ name: "comp-329" },
{ name: "comp-330" },
{ name: "comp-331" },
{ name: "comp-332" },
{ name: "comp-333" },
],
name: "Dialog",
slug: "dialog",
},
{
components: [
{ name: "comp-366" },
{ name: "comp-367" },
{ name: "comp-368" },
{ name: "comp-369" },
{ name: "comp-370" },
{ name: "comp-371" },
{ name: "comp-372" },
{ name: "comp-373" },
{ name: "comp-374" },
{ name: "comp-375" },
{ name: "comp-376" },
{ name: "comp-377" },
{ name: "comp-378" },
{ name: "comp-379" },
{ name: "comp-380" },
],
name: "Dropdown",
slug: "dropdown",
},
{
components: [
{ name: "comp-125" },
{ name: "comp-126" },
{ name: "comp-543" },
{ name: "comp-544" },
{ name: "comp-545" },
{ name: "comp-546" },
{ name: "comp-547" },
{ name: "comp-548" },
{ name: "comp-549" },
{ name: "comp-550" },
{ name: "comp-551" },
{ name: "comp-552" },
{ name: "comp-553" },
{ name: "comp-554" },
],
name: "File upload",
slug: "file-upload",
},
{
components: [{ name: "comp-542" }],
name: "Event calendar",
slug: "event-calendar",
},
{
components: [
{ name: "comp-01" },
{ name: "comp-02" },
{ name: "comp-03" },
{ name: "comp-04" },
{ name: "comp-05" },
{ name: "comp-06" },
{ name: "comp-07" },
{ name: "comp-08" },
{ name: "comp-09" },
{ name: "comp-10" },
{ name: "comp-11" },
{ name: "comp-12" },
{ name: "comp-13" },
{ name: "comp-14" },
{ name: "comp-15" },
{ name: "comp-16" },
{ name: "comp-17" },
{ name: "comp-18" },
{ name: "comp-19" },
{ name: "comp-20" },
{ name: "comp-21" },
{ name: "comp-22" },
{ name: "comp-23" },
{ name: "comp-24" },
{ name: "comp-25" },
{ name: "comp-26" },
{ name: "comp-27" },
{ name: "comp-28" },
{ name: "comp-29" },
{ name: "comp-30" },
{ name: "comp-31" },
{ name: "comp-32" },
{ name: "comp-33" },
{ name: "comp-34" },
{ name: "comp-35" },
{ name: "comp-36" },
{ name: "comp-37" },
{ name: "comp-38" },
{ name: "comp-39" },
{ name: "comp-40" },
{ name: "comp-41" },
{ name: "comp-42" },
{ name: "comp-43" },
{ name: "comp-44" },
{ name: "comp-45" },
{ name: "comp-58" },
{ name: "comp-46" },
{ name: "comp-47" },
{ name: "comp-48" },
{ name: "comp-49" },
{ name: "comp-50" },
{ name: "comp-51" },
{ name: "comp-52" },
{ name: "comp-53" },
{ name: "comp-54" },
{ name: "comp-55" },
{ name: "comp-486" },
{ name: "comp-56" },
{ name: "comp-57" },
],
name: "Input",
slug: "input",
},
{
components: [
{ name: "comp-577" },
{ name: "comp-578" },
{ name: "comp-579" },
{ name: "comp-580" },
{ name: "comp-581" },
{ name: "comp-582" },
{ name: "comp-583" },
{ name: "comp-584" },
{ name: "comp-585" },
{ name: "comp-586" },
{ name: "comp-587" },
{ name: "comp-588" },
{ name: "comp-589" },
{ name: "comp-590" },
{ name: "comp-591" },
{ name: "comp-592" },
{ name: "comp-593" },
{ name: "comp-594" },
{ name: "comp-595" },
{ name: "comp-596" },
],
name: "Navbar",
slug: "navbar",
},
{
components: [
{ name: "comp-279" },
{ name: "comp-280" },
{ name: "comp-281" },
{ name: "comp-282" },
{ name: "comp-283" },
{ name: "comp-284" },
{ name: "comp-285" },
{ name: "comp-286" },
{ name: "comp-287" },
{ name: "comp-288" },
{ name: "comp-289" },
{ name: "comp-290" },
{ name: "comp-291" },
{ name: "comp-292" },
{ name: "comp-293" },
{ name: "comp-294" },
{ name: "comp-295" },
{ name: "comp-296" },
{ name: "comp-297" },
{ name: "comp-298" },
{ name: "comp-299" },
{ name: "comp-300" },
],
name: "Notification",
slug: "notification",
},
{
components: [
{ name: "comp-454" },
{ name: "comp-455" },
{ name: "comp-456" },
{ name: "comp-457" },
{ name: "comp-458" },
{ name: "comp-459" },
{ name: "comp-460" },
{ name: "comp-461" },
{ name: "comp-462" },
{ name: "comp-463" },
{ name: "comp-464" },
{ name: "comp-465" },
],
name: "Pagination",
slug: "pagination",
},
{
components: [
{ name: "comp-381" },
{ name: "comp-382" },
{ name: "comp-383" },
{ name: "comp-384" },
{ name: "comp-385" },
{ name: "comp-386" },
{ name: "comp-387" },
{ name: "comp-388" },
{ name: "comp-389" },
],
name: "Popover",
slug: "popover",
},
{
components: [
{ name: "comp-152" },
{ name: "comp-153" },
{ name: "comp-154" },
{ name: "comp-155" },
{ name: "comp-156" },
{ name: "comp-157" },
{ name: "comp-158" },
{ name: "comp-159" },
{ name: "comp-160" },
{ name: "comp-161" },
{ name: "comp-162" },
{ name: "comp-163" },
{ name: "comp-164" },
{ name: "comp-165" },
{ name: "comp-166" },
{ name: "comp-171" },
{ name: "comp-167" },
{ name: "comp-168" },
{ name: "comp-169" },
{ name: "comp-170" },
],
name: "Radio",
slug: "radio",
},
{
components: [
{ name: "comp-189" },
{ name: "comp-190" },
{ name: "comp-191" },
{ name: "comp-192" },
{ name: "comp-193" },
{ name: "comp-194" },
{ name: "comp-195" },
{ name: "comp-196" },
{ name: "comp-197" },
{ name: "comp-198" },
{ name: "comp-199" },
{ name: "comp-200" },
{ name: "comp-201" },
{ name: "comp-202" },
{ name: "comp-203" },
{ name: "comp-204" },
{ name: "comp-205" },
{ name: "comp-206" },
{ name: "comp-207" },
{ name: "comp-208" },
{ name: "comp-209" },
{ name: "comp-210" },
{ name: "comp-211" },
{ name: "comp-212" },
{ name: "comp-213" },
{ name: "comp-214" },
{ name: "comp-215" },
{ name: "comp-216" },
{ name: "comp-217" },
{ name: "comp-218" },
{ name: "comp-219" },
{ name: "comp-220" },
{ name: "comp-221" },
{ name: "comp-222" },
{ name: "comp-223" },
{ name: "comp-224" },
{ name: "comp-225" },
{ name: "comp-226" },
{ name: "comp-227" },
{ name: "comp-228" },
{ name: "comp-229" },
{ name: "comp-230" },
{ name: "comp-231" },
{ name: "comp-232" },
{ name: "comp-233" },
{ name: "comp-234" },
{ name: "comp-235" },
{ name: "comp-236" },
{ name: "comp-237" },
{ name: "comp-238" },
{ name: "comp-239" },
],
name: "Select",
slug: "select",
},
{
components: [
{ name: "comp-240" },
{ name: "comp-241" },
{ name: "comp-242" },
{ name: "comp-243" },
{ name: "comp-244" },
{ name: "comp-245" },
{ name: "comp-246" },
{ name: "comp-247" },
{ name: "comp-248" },
{ name: "comp-249" },
{ name: "comp-250" },
{ name: "comp-251" },
{ name: "comp-252" },
{ name: "comp-253" },
{ name: "comp-254" },
{ name: "comp-255" },
{ name: "comp-256" },
{ name: "comp-257" },
{ name: "comp-258" },
{ name: "comp-259" },
{ name: "comp-260" },
{ name: "comp-261" },
{ name: "comp-262" },
{ name: "comp-263" },
{ name: "comp-264" },
{ name: "comp-265" },
{ name: "comp-266" },
],
name: "Slider",
slug: "slider",
},
{
components: [
{ name: "comp-513" },
{ name: "comp-514" },
{ name: "comp-515" },
{ name: "comp-516" },
{ name: "comp-517" },
{ name: "comp-518" },
{ name: "comp-519" },
{ name: "comp-520" },
{ name: "comp-521" },
{ name: "comp-522" },
{ name: "comp-523" },
{ name: "comp-524" },
{ name: "comp-525" },
{ name: "comp-526" },
{ name: "comp-527" },
{ name: "comp-528" },
{ name: "comp-529" },
],
name: "Stepper",
slug: "stepper",
},
{
components: [
{ name: "comp-172" },
{ name: "comp-173" },
{ name: "comp-174" },
{ name: "comp-175" },
{ name: "comp-176" },
{ name: "comp-177" },
{ name: "comp-178" },
{ name: "comp-179" },
{ name: "comp-180" },
{ name: "comp-181" },
{ name: "comp-182" },
{ name: "comp-183" },
{ name: "comp-184" },
{ name: "comp-185" },
{ name: "comp-186" },
{ name: "comp-187" },
{ name: "comp-188" },
],
name: "Switch",
slug: "switch",
},
{
components: [
{ name: "comp-466" },
{ name: "comp-467" },
{ name: "comp-468" },
{ name: "comp-469" },
{ name: "comp-470" },
{ name: "comp-471" },
{ name: "comp-472" },
{ name: "comp-473" },
{ name: "comp-474" },
{ name: "comp-475" },
{ name: "comp-476" },
{ name: "comp-477" },
{ name: "comp-478" },
{ name: "comp-479" },
{ name: "comp-480" },
{ name: "comp-481" },
{ name: "comp-482" },
{ name: "comp-483" },
{ name: "comp-484" },
{ name: "comp-485" },
],
name: "Table",
slug: "table",
},
{
components: [
{ name: "comp-426" },
{ name: "comp-427" },
{ name: "comp-428" },
{ name: "comp-429" },
{ name: "comp-430" },
{ name: "comp-431" },
{ name: "comp-432" },
{ name: "comp-433" },
{ name: "comp-434" },
{ name: "comp-435" },
{ name: "comp-436" },
{ name: "comp-437" },
{ name: "comp-438" },
{ name: "comp-439" },
{ name: "comp-440" },
{ name: "comp-441" },
{ name: "comp-442" },
{ name: "comp-443" },
{ name: "comp-444" },
{ name: "comp-445" },
],
name: "Tabs",
slug: "tabs",
},
{
components: [
{ name: "comp-59" },
{ name: "comp-60" },
{ name: "comp-61" },
{ name: "comp-62" },
{ name: "comp-63" },
{ name: "comp-64" },
{ name: "comp-65" },
{ name: "comp-66" },
{ name: "comp-67" },
{ name: "comp-68" },
{ name: "comp-69" },
{ name: "comp-70" },
{ name: "comp-71" },
{ name: "comp-72" },
{ name: "comp-73" },
{ name: "comp-74" },
{ name: "comp-75" },
{ name: "comp-76" },
{ name: "comp-77" },
],
name: "Textarea",
slug: "textarea",
},
{
components: [
{ name: "comp-530" },
{ name: "comp-531" },
{ name: "comp-532" },
{ name: "comp-533" },
{ name: "comp-534" },
{ name: "comp-535" },
{ name: "comp-536" },
{ name: "comp-537" },
{ name: "comp-538" },
{ name: "comp-539" },
{ name: "comp-540" },
{ name: "comp-541" },
],
name: "Timeline",
slug: "timeline",
},
{
components: [
{ name: "comp-354" },
{ name: "comp-355" },
{ name: "comp-356" },
{ name: "comp-357" },
{ name: "comp-358" },
{ name: "comp-359" },
{ name: "comp-360" },
{ name: "comp-361" },
{ name: "comp-362" },
{ name: "comp-363" },
{ name: "comp-364" },
{ name: "comp-365" },
],
name: "Tooltip",
slug: "tooltip",
},
{
components: [
{ name: "comp-565" },
{ name: "comp-566" },
{ name: "comp-567" },
{ name: "comp-568" },
{ name: "comp-569" },
{ name: "comp-570" },
{ name: "comp-571" },
{ name: "comp-572" },
{ name: "comp-573" },
{ name: "comp-574" },
{ name: "comp-575" },
{ name: "comp-576" },
{ name: "comp-597" },
{ name: "comp-598" },
{ name: "comp-599" },
],
name: "Tree",
slug: "tree",
},
];
export function getCategory(slug: string): ComponentCategory | undefined {
return categories.find((category) => category.slug === slug);
}
author/apps/origin/registry/default/ui/button.tsx
import { cva, type VariantProps } from "class-variance-authority";
import { Slot } from "radix-ui";
import type * as React from "react";
import { cn } from "@/registry/default/lib/utils";
const buttonVariants = cva(
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium text-sm outline-none transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
{
defaultVariants: {
size: "default",
variant: "default",
},
variants: {
size: {
default: "h-9 px-4 py-2",
icon: "size-9",
lg: "h-10 rounded-md px-8",
sm: "h-8 rounded-md px-3 text-xs",
},
variant: {
default:
"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",
destructive:
"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
ghost: "hover:bg-accent hover:text-accent-foreground",
link: "text-primary underline-offset-4 hover:underline",
outline:
"border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",
secondary:
"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
},
},
},
);
function Button({
className,
variant,
size,
asChild = false,
...props
}: React.ComponentProps<"button"> &
VariantProps<typeof buttonVariants> & {
asChild?: boolean;
}) {
const Comp = asChild ? Slot.Root : "button";
return (
<Comp
className={cn(buttonVariants({ className, size, variant }))}
data-slot="button"
{...props}
/>
);
}
export { Button, buttonVariants };
author/apps/origin/registry/default/lib/utils.ts
import { type ClassValue, clsx } from "clsx";
import { twMerge } from "tailwind-merge";
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
author/apps/origin/app/globals.css
@import "tailwindcss";
@import "tw-animate-css";
@custom-variant dark (&:is(.dark *));
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--font-sans: var(--font-sans);
--font-mono: var(--font-mono);
--color-sidebar-ring: var(--sidebar-ring);
--color-sidebar-border: var(--sidebar-border);
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
--color-sidebar-accent: var(--sidebar-accent);
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
--color-sidebar-primary: var(--sidebar-primary);
--color-sidebar-foreground: var(--sidebar-foreground);
--color-sidebar: var(--sidebar);
--color-chart-5: var(--chart-5);
--color-chart-4: var(--chart-4);
--color-chart-3: var(--chart-3);
--color-chart-2: var(--chart-2);
--color-chart-1: var(--chart-1);
--color-ring: var(--ring);
--color-input: var(--input);
--color-border: var(--border);
--color-destructive-foreground: var(--destructive-foreground);
--color-destructive: var(--destructive);
--color-accent-foreground: var(--accent-foreground);
--color-accent: var(--accent);
--color-muted-foreground: var(--muted-foreground);
--color-muted: var(--muted);
--color-secondary-foreground: var(--secondary-foreground);
--color-secondary: var(--secondary);
--color-primary-foreground: var(--primary-foreground);
--color-primary: var(--primary);
--color-popover-foreground: var(--popover-foreground);
--color-popover: var(--popover);
--color-card-foreground: var(--card-foreground);
--color-card: var(--card);
--radius-sm: calc(var(--radius) - 4px);
--radius-md: calc(var(--radius) - 2px);
--radius-lg: var(--radius);
--radius-xl: calc(var(--radius) + 4px);
}
:root {
--radius: 0.625rem;
--background: oklch(1 0 0); /* --color-white */
--foreground: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
--card: oklch(1 0 0); /* --color-white */
--card-foreground: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
--popover: oklch(1 0 0); /* --color-white */
--popover-foreground: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
--primary: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
--primary-foreground: oklch(0.985 0 0); /* --color-zinc-50 */
--secondary: oklch(0.967 0.001 286.375); /* --color-zinc-100 */
--secondary-foreground: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
--muted: oklch(0.967 0.001 286.375); /* --color-zinc-100 */
--muted-foreground: oklch(0.552 0.016 285.938); /* --color-zinc-500 */
--accent: oklch(0.967 0.001 286.375); /* --color-zinc-100 */
--accent-foreground: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
--destructive: oklch(0.637 0.237 25.331); /* --color-red-500 */
--destructive-foreground: oklch(0.637 0.237 25.331); /* --color-red-500 */
--border: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
--input: oklch(0.871 0.006 286.286); /* --color-zinc-300 */
--ring: oklch(0.871 0.006 286.286); /* --color-zinc-300 */
--chart-1: oklch(0.646 0.222 41.116); /* --color-orange-600 */
--chart-2: oklch(0.6 0.118 184.704); /* --color-teal-600 */
--chart-3: oklch(0.398 0.07 227.392); /* --color-cyan-900 */
--chart-4: oklch(0.828 0.189 84.429); /* --color-amber-400 */
--chart-5: oklch(0.769 0.188 70.08); /* --color-amber-500 */
--sidebar: oklch(0.985 0 0); /* --color-zinc-50 */
--sidebar-foreground: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
--sidebar-primary: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
--sidebar-primary-foreground: oklch(0.985 0 0); /* --color-zinc-50 */
--sidebar-accent: oklch(0.967 0.001 286.375); /* --color-zinc-100 */
--sidebar-accent-foreground: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
--sidebar-border: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
--sidebar-ring: oklch(0.871 0.006 286.286); /* --color-zinc-300 */
}
.dark {
--background: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
--foreground: oklch(0.985 0 0); /* --color-zinc-50 */
--card: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
--card-foreground: oklch(0.985 0 0); /* --color-zinc-50 */
--popover: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
--popover-foreground: oklch(0.985 0 0); /* --color-zinc-50 */
--primary: oklch(0.985 0 0); /* --color-zinc-50 */
--primary-foreground: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
--secondary: oklch(0.274 0.006 286.033); /* --color-zinc-800 */
--secondary-foreground: oklch(0.985 0 0); /* --color-zinc-50 */
--muted: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
--muted-foreground: oklch(0.65 0.01 286); /* 🔥 near --color-zinc-400 */
--accent: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
--accent-foreground: oklch(0.985 0 0); /* --color-zinc-50 */
--destructive: oklch(0.396 0.141 25.723); /* --color-red-900 */
--destructive-foreground: oklch(0.637 0.237 25.331); /* --color-red-500 */
--border: oklch(0.274 0.006 286.033); /* --color-zinc-800 */
--input: oklch(0.274 0.006 286.033); /* --color-zinc-800 */
--ring: oklch(0.442 0.017 285.786); /* --color-zinc-600 */
--chart-1: oklch(0.488 0.243 264.376); /* --color-blue-700 */
--chart-2: oklch(0.696 0.17 162.48); /* --color-emerald-500 */
--chart-3: oklch(0.769 0.188 70.08); /* --color-amber-500 */
--chart-4: oklch(0.627 0.265 303.9); /* --color-purple-500 */
--chart-5: oklch(0.645 0.246 16.439); /* --color-rose-500 */
--sidebar: oklch(0.205 0 0); /* --color-neutral-900 */
--sidebar-foreground: oklch(0.985 0 0); /* --color-zinc-50 */
--sidebar-primary: oklch(0.488 0.243 264.376); /* --color-blue-700 */
--sidebar-primary-foreground: oklch(0.985 0 0); /* --color-zinc-50 */
--sidebar-accent: oklch(0.269 0 0); /* --color-neutral-800 */
--sidebar-accent-foreground: oklch(0.985 0 0); /* --color-zinc-50 */
--sidebar-border: oklch(0.274 0.006 286.033); /* --color-zinc-800 */
--sidebar-ring: oklch(0.442 0.017 285.786); /* --color-zinc-600 */
}
@layer base {
* {
@apply border-border outline-ring/50;
}
body {
@apply bg-background text-foreground;
}
}
/* originui css below */
@theme inline {
--font-heading: var(--font-heading);
--font-mono:
ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
"Courier New", monospace;
}
@layer base {
/* Custom scrollbar styling. Thanks @pranathiperii. */
pre::-webkit-scrollbar {
width: 5px;
}
pre::-webkit-scrollbar-track {
background: transparent;
}
pre::-webkit-scrollbar-thumb {
background: var(--border);
border-radius: 5px;
}
pre {
scrollbar-width: thin;
scrollbar-color: var(--border) transparent;
}
}
author/apps/origin/package.json
{
"dependencies": {
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/modifiers": "^9.0.0",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@headless-tree/core": "^1.5.1",
"@headless-tree/react": "^1.5.1",
"@internationalized/date": "^3.10.0",
"@origin-space/image-cropper": "^0.1.9",
"@radix-ui/react-icons": "^1.3.2",
"@remixicon/react": "^4.7.0",
"@tanstack/react-table": "^9.2.4",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "1.1.1",
"date-fns": "^4.1.0",
"emblor": "^1.4.8",
"hast-util-to-jsx-runtime": "^2.3.6",
"input-otp": "^1.4.2",
"jotai": "^2.15.1",
"lodash": "^4.17.21",
"lucide-react": "^0.539.0",
"next": "16.2.5",
"next-themes": "^0.4.4",
"radix-ui": "1.4.4-rc.1762291353631",
"react": "^19.2.6",
"react-aria": "^3.44.0",
"react-aria-components": "^1.13.0",
"react-day-picker": "^9.11.1",
"react-dom": "^19.2.6",
"react-intersection-observer": "^9.16.0",
"react-payment-inputs": "^1.2.0",
"react-phone-number-input": "^3.4.13",
"react-resizable-panels": "^3.0.6",
"shadcn": "^2.10.0",
"sonner": "^2.0.7",
"tailwind-merge": "^3.4.0",
"ts-morph": "^26.0.0",
"tsx": "^4.20.6",
"use-mask-input": "^3.5.2",
"zod": "^4.1.12"
},
"devDependencies": {
"@tailwindcss/postcss": "^4.1.17",
"@types/node": "^24.10.1",
"@types/react": "^19.2.6",
"@types/react-dom": "^19.2.3",
"@types/react-payment-inputs": "^1.1.4",
"postcss": "^8.5.6",
"rimraf": "^6.1.0",
"shiki": "^3.15.0",
"tailwindcss": "^4.1.17",
"tw-animate-css": "^1.4.0",
"typescript": "^5.9.3"
},
"license": "MIT",
"name": "origin",
"private": true,
"scripts": {
"build": "bun run --bun format:write && next build",
"clean": "rm -rf node_modules && rm -rf .turbo && rm -rf .next",
"dev": "next dev --port 4001",
"format:check": "biome format --check .",
"format:write": "biome format --write .",
"lint": "biome lint .",
"registry:build": "shadcn build",
"start": "next start",
"typecheck": "tsc --noEmit"
},
"type": "module",
"version": "0.1.0"
}
Usage.tsx실행 안내·자료
// Local host for the unchanged exact baseline demonstration.
import OriginalDemo from "./author-example.tsx";
export default function Demo() { return <><OriginalDemo /></>; }
runtime/author-mount.tsx실행 안내·자료
/** Local sandbox host. Ready is a mount observation, never a verification result. */
import React, { Component, useEffect } from 'react';
import { createRoot } from 'react-dom/client';
declare global {
interface Window {
__STYLEGALLERY_PREVIEW__: { id: string; status: string; errors: string[] };
}
}
export function mount(Demo: React.ComponentType, id: string) {
const state = window.__STYLEGALLERY_PREVIEW__ = { id, status: 'loading', errors: [] as string[] };
const send = (message: object) => parent.postMessage({ ...message, id }, '*');
const report = (error: unknown) => {
const message = error instanceof Error ? error.message : String(error);
if (!state.errors.includes(message)) state.errors.push(message);
state.status = 'error';
document.body.dataset.previewStatus = 'error';
send({ type: 'sg-preview-error', message });
};
window.addEventListener('error', (event) => report(event.error ?? event.message));
window.addEventListener('unhandledrejection', (event) => report(event.reason));
window.addEventListener('securitypolicyviolation', (event) => report(`Blocked by preview policy: ${event.violatedDirective}`));
const theme = new URLSearchParams(location.search).get('theme') === 'dark' ? 'dark' : 'light';
document.documentElement.classList.toggle('dark', theme === 'dark');
document.documentElement.dataset.theme = theme;
// Keep original source bytes while ensuring imported attribution/navigation remains local text.
const removeDestinations = () => document.querySelectorAll('a[href]').forEach((link) => {
link.removeAttribute('href');
link.removeAttribute('target');
});
document.addEventListener('click', (event) => {
if ((event.target as Element)?.closest?.('a')) event.preventDefault();
}, true);
document.addEventListener('submit', (event) => event.preventDefault());
new MutationObserver(removeDestinations).observe(document.getElementById('root')!, { childList: true, subtree: true });
const observe = () => {
const root = document.getElementById('root')!;
const elements = Array.from(root.querySelectorAll('*'));
const rect = root.getBoundingClientRect();
const diagnostics = {
textLength: (root.textContent ?? '').trim().length,
elementCount: elements.length,
visibleElementCount: elements.filter((element) => {
const bounds = element.getBoundingClientRect();
const style = getComputedStyle(element);
return bounds.width > 0 && bounds.height > 0 && style.display !== 'none' && style.visibility !== 'hidden' && Number(style.opacity) !== 0;
}).length,
images: [],
canvases: [],
rootRect: { width: rect.width, height: rect.height },
documentWidth: document.documentElement.scrollWidth,
viewportWidth: innerWidth,
};
send({ type: 'sg-preview-observation', diagnostics });
};
class Boundary extends Component<{ children: React.ReactNode }, { error: string | null }> {
state = { error: null as string | null };
static getDerivedStateFromError(error: Error) { return { error: error.message }; }
componentDidCatch(error: Error) { report(error); }
render() { return this.state.error ? <p role="alert">This preview could not render: {this.state.error}</p> : this.props.children; }
}
function Ready() {
useEffect(() => {
const preference = matchMedia('(prefers-reduced-motion: reduce)');
const syncSVG = () => document.querySelectorAll('svg').forEach((svg) => {
if (preference.matches) svg.pauseAnimations?.();
else svg.unpauseAnimations?.();
});
syncSVG();
preference.addEventListener('change', syncSVG);
let second = 0;
let delayed = 0;
const first = requestAnimationFrame(() => { second = requestAnimationFrame(() => {
if (state.status !== 'error') {
state.status = 'mounted';
document.body.dataset.previewStatus = 'mounted';
send({ type: 'sg-preview-ready' });
observe();
delayed = window.setTimeout(observe, 700);
}
}); });
return () => {
cancelAnimationFrame(first);
cancelAnimationFrame(second);
clearTimeout(delayed);
preference.removeEventListener('change', syncSVG);
};
}, []);
return <Demo />;
}
createRoot(document.getElementById('root')!).render(<Boundary><Ready /></Boundary>);
}
runtime/author-styles.css실행 안내·자료
@import "tailwindcss";
@custom-variant dark (&:where(.dark, .dark *));
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--color-card: var(--background);
--color-card-foreground: var(--foreground);
--color-primary: var(--primary);
--color-primary-foreground: var(--primary-foreground);
--color-secondary: var(--muted);
--color-secondary-foreground: var(--foreground);
--color-muted: var(--muted);
--color-muted-foreground: var(--muted-foreground);
--color-accent: var(--muted);
--color-accent-foreground: var(--foreground);
--color-popover: var(--background);
--color-popover-foreground: var(--foreground);
--color-destructive: #dc2626;
--color-destructive-foreground: #ffffff;
--color-input: var(--border);
--color-border: var(--border);
--color-ring: var(--foreground);
--radius-lg: 0.5rem;
--radius-md: 0.375rem;
--radius-sm: 0.25rem;
}
:root {
--background: #ffffff;
--border: #d4d4d8;
--foreground: #18181b;
--muted: #f4f4f5;
--muted-foreground: #71717a;
--primary: #18181b;
--primary-foreground: #fafafa;
background: var(--background);
color: var(--foreground);
color-scheme: light;
font-family: Arial, sans-serif;
}
.dark {
--background: #09090b;
--border: #3f3f46;
--foreground: #fafafa;
--muted: #27272a;
--muted-foreground: #a1a1aa;
--primary: #fafafa;
--primary-foreground: #18181b;
color-scheme: dark;
}
body {
margin: 0;
min-height: 100vh;
}
#root {
align-items: center;
box-sizing: border-box;
display: flex;
justify-content: center;
min-height: 100vh;
padding: 24px;
width: 100%;
}
#root > * {
max-width: 100%;
}
noscript {
display: block;
padding: 24px;
}
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-play-state: paused !important;
}
}
runtime/applied-theme.css실행 안내·자료
@custom-variant dark (&:is(.dark *));
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--font-sans: var(--font-sans);
--font-mono: var(--font-mono);
--color-sidebar-ring: var(--sidebar-ring);
--color-sidebar-border: var(--sidebar-border);
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
--color-sidebar-accent: var(--sidebar-accent);
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
--color-sidebar-primary: var(--sidebar-primary);
--color-sidebar-foreground: var(--sidebar-foreground);
--color-sidebar: var(--sidebar);
--color-chart-5: var(--chart-5);
--color-chart-4: var(--chart-4);
--color-chart-3: var(--chart-3);
--color-chart-2: var(--chart-2);
--color-chart-1: var(--chart-1);
--color-ring: var(--ring);
--color-input: var(--input);
--color-border: var(--border);
--color-destructive-foreground: var(--destructive-foreground);
--color-destructive: var(--destructive);
--color-accent-foreground: var(--accent-foreground);
--color-accent: var(--accent);
--color-muted-foreground: var(--muted-foreground);
--color-muted: var(--muted);
--color-secondary-foreground: var(--secondary-foreground);
--color-secondary: var(--secondary);
--color-primary-foreground: var(--primary-foreground);
--color-primary: var(--primary);
--color-popover-foreground: var(--popover-foreground);
--color-popover: var(--popover);
--color-card-foreground: var(--card-foreground);
--color-card: var(--card);
--radius-sm: calc(var(--radius) - 4px);
--radius-md: calc(var(--radius) - 2px);
--radius-lg: var(--radius);
--radius-xl: calc(var(--radius) + 4px);
}
:root {
--radius: 0.625rem;
--background: oklch(1 0 0); /* --color-white */
--foreground: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
--card: oklch(1 0 0); /* --color-white */
--card-foreground: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
--popover: oklch(1 0 0); /* --color-white */
--popover-foreground: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
--primary: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
--primary-foreground: oklch(0.985 0 0); /* --color-zinc-50 */
--secondary: oklch(0.967 0.001 286.375); /* --color-zinc-100 */
--secondary-foreground: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
--muted: oklch(0.967 0.001 286.375); /* --color-zinc-100 */
--muted-foreground: oklch(0.552 0.016 285.938); /* --color-zinc-500 */
--accent: oklch(0.967 0.001 286.375); /* --color-zinc-100 */
--accent-foreground: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
--destructive: oklch(0.637 0.237 25.331); /* --color-red-500 */
--destructive-foreground: oklch(0.637 0.237 25.331); /* --color-red-500 */
--border: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
--input: oklch(0.871 0.006 286.286); /* --color-zinc-300 */
--ring: oklch(0.871 0.006 286.286); /* --color-zinc-300 */
--chart-1: oklch(0.646 0.222 41.116); /* --color-orange-600 */
--chart-2: oklch(0.6 0.118 184.704); /* --color-teal-600 */
--chart-3: oklch(0.398 0.07 227.392); /* --color-cyan-900 */
--chart-4: oklch(0.828 0.189 84.429); /* --color-amber-400 */
--chart-5: oklch(0.769 0.188 70.08); /* --color-amber-500 */
--sidebar: oklch(0.985 0 0); /* --color-zinc-50 */
--sidebar-foreground: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
--sidebar-primary: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
--sidebar-primary-foreground: oklch(0.985 0 0); /* --color-zinc-50 */
--sidebar-accent: oklch(0.967 0.001 286.375); /* --color-zinc-100 */
--sidebar-accent-foreground: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
--sidebar-border: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
--sidebar-ring: oklch(0.871 0.006 286.286); /* --color-zinc-300 */
}
.dark {
--background: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
--foreground: oklch(0.985 0 0); /* --color-zinc-50 */
--card: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
--card-foreground: oklch(0.985 0 0); /* --color-zinc-50 */
--popover: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
--popover-foreground: oklch(0.985 0 0); /* --color-zinc-50 */
--primary: oklch(0.985 0 0); /* --color-zinc-50 */
--primary-foreground: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
--secondary: oklch(0.274 0.006 286.033); /* --color-zinc-800 */
--secondary-foreground: oklch(0.985 0 0); /* --color-zinc-50 */
--muted: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
--muted-foreground: oklch(0.65 0.01 286); /* 🔥 near --color-zinc-400 */
--accent: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
--accent-foreground: oklch(0.985 0 0); /* --color-zinc-50 */
--destructive: oklch(0.396 0.141 25.723); /* --color-red-900 */
--destructive-foreground: oklch(0.637 0.237 25.331); /* --color-red-500 */
--border: oklch(0.274 0.006 286.033); /* --color-zinc-800 */
--input: oklch(0.274 0.006 286.033); /* --color-zinc-800 */
--ring: oklch(0.442 0.017 285.786); /* --color-zinc-600 */
--chart-1: oklch(0.488 0.243 264.376); /* --color-blue-700 */
--chart-2: oklch(0.696 0.17 162.48); /* --color-emerald-500 */
--chart-3: oklch(0.769 0.188 70.08); /* --color-amber-500 */
--chart-4: oklch(0.627 0.265 303.9); /* --color-purple-500 */
--chart-5: oklch(0.645 0.246 16.439); /* --color-rose-500 */
--sidebar: oklch(0.205 0 0); /* --color-neutral-900 */
--sidebar-foreground: oklch(0.985 0 0); /* --color-zinc-50 */
--sidebar-primary: oklch(0.488 0.243 264.376); /* --color-blue-700 */
--sidebar-primary-foreground: oklch(0.985 0 0); /* --color-zinc-50 */
--sidebar-accent: oklch(0.269 0 0); /* --color-neutral-800 */
--sidebar-accent-foreground: oklch(0.985 0 0); /* --color-zinc-50 */
--sidebar-border: oklch(0.274 0.006 286.033); /* --color-zinc-800 */
--sidebar-ring: oklch(0.442 0.017 285.786); /* --color-zinc-600 */
}
@layer base {
* {
@apply border-border outline-ring/50;
}
body {
@apply bg-background text-foreground;
}
}
/* originui css below */
@theme inline {
--font-heading: var(--font-heading);
--font-mono:
ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
"Courier New", monospace;
}
@layer base {
/* Custom scrollbar styling. Thanks @pranathiperii. */
pre::-webkit-scrollbar {
width: 5px;
}
pre::-webkit-scrollbar-track {
background: transparent;
}
pre::-webkit-scrollbar-thumb {
background: var(--border);
border-radius: 5px;
}
pre {
scrollbar-width: thin;
scrollbar-color: var(--border) transparent;
}
}
provenance.json실행 안내·자료
{
"id": "21st-c4b5d354110f",
"sourceRevision": "60b6b444e6dfb670fab47bfb0da9dd9da1f8150b",
"demoIdentity": {
"file": "author-example.tsx",
"export": "default",
"source": "author-official-example"
},
"fidelity": {
"preserved": "정확히 식별한 작성자의 MIT 구현과 공식 예제; 원래 CDN demo의 license 표기는 별도 유지",
"original_demo_license": "mit",
"dependency_revision": "60b6b444e6dfb670fab47bfb0da9dd9da1f8150b",
"observed_differences": [
"원래 21st의 설치용 Alert(layout/icon/action/isNotification) 래퍼는 공개 source가 없어 사용하지 않는다. 정확히 대응하는 Origin author의 개별 컴포넌트 파일을 실행 entry로 쓴다.",
"직접 DOM 원본은 wrapper의 row/complex 속성 대신 inline icon 또는 flex 행과 border/padding/shadow/max-width를 명시한다. 같은 변형의 현재 공개 원본이며 원래21st 비공개 래퍼 바이트 동일성을 주장하지 않는다.",
"Notification의 닫기/수행 버튼은 원본에 실제 onClick 처리기가 없다. 실제 동작했다고 주장하지 않으며 임의 업무 동작을 추가하지 않는다."
],
"mapping": [
"Notification registry → apps/origin/registry/default/components/comp-289.tsx; 원래 demo와 문구·아이콘·버튼/목록 구성을 함께 확인"
]
},
"acquisitionLimitations": [
"CDN 데모는 SHA256으로, 작성자 원본과 의존 파일은 Git 커밋 및 blob SHA로 고정했다.",
"현재 작성자 revision의 의존 파일이 과거 21st 내부 구현과 바이트 단위로 같다는 주장은 하지 않는다.",
"다운로드한 코드를 실행하지 않았으며 브라우저·상호작용 검증은 별도 단계다."
],
"files": [
{
"file": "author-example.tsx",
"kind": "implementation",
"sha256": "967f448808d5aa1796c823587a52fb59acccc2e9a7e391e2ac8a1091b68fee6c",
"sourceRevision": "60b6b444e6dfb670fab47bfb0da9dd9da1f8150b",
"license": "MIT"
},
{
"file": "LICENSE",
"kind": "license",
"sha256": "4fe705509418993f1ad677f91108c2df676228d7b0a758b42ebe79e8b5ad5a4b",
"sourceRevision": "60b6b444e6dfb670fab47bfb0da9dd9da1f8150b",
"license": "MIT"
},
{
"file": "upstream/apps/origin/config/components.ts",
"kind": "upstream-implementation",
"sha256": "f6818c506ed905f11c3dac09ffa389d02cc444c9de5012655e671c87ee4e8edd",
"sourceRevision": "60b6b444e6dfb670fab47bfb0da9dd9da1f8150b",
"license": "MIT"
},
{
"file": "author/apps/origin/registry/default/ui/button.tsx",
"kind": "implementation-dependency",
"sha256": "00c5b5d0afad82b368cfa34ae4abdaf1e0851dfa49adeb836d9a69747ef4bc49",
"sourceRevision": "60b6b444e6dfb670fab47bfb0da9dd9da1f8150b",
"license": "MIT"
},
{
"file": "author/apps/origin/registry/default/lib/utils.ts",
"kind": "implementation-dependency",
"sha256": "4acbc7165a8d54738ff62b51414e772c08fe78434e524e6d8770180d3ba2925f",
"sourceRevision": "60b6b444e6dfb670fab47bfb0da9dd9da1f8150b",
"license": "MIT"
},
{
"file": "author/apps/origin/app/globals.css",
"kind": "theme-source",
"sha256": "32516eeb848422448834d25bbcdce735323f03f00914d7a9377f2e2e2f2f71a9",
"sourceRevision": "60b6b444e6dfb670fab47bfb0da9dd9da1f8150b",
"license": "MIT"
},
{
"file": "author/apps/origin/package.json",
"kind": "dependency-manifest",
"sha256": "3972a2277166802b5a333210c761c9889e5dc2683c0f3d85b91a174e94ed313d",
"sourceRevision": "60b6b444e6dfb670fab47bfb0da9dd9da1f8150b",
"license": "MIT"
}
],
"importMap": {
"@/registry/default/ui/button": "author/apps/origin/registry/default/ui/button.tsx",
"@/registry/default/lib/utils": "author/apps/origin/registry/default/lib/utils.ts"
},
"declaredDependencies": {
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"lucide-react": "^0.539.0",
"radix-ui": "1.4.4-rc.1762291353631",
"react": "^19.2.6",
"tailwind-merge": "^3.4.0"
},
"runtimeDependencies": {
"react-origin": "19.2.6",
"lucide-origin": "0.539.0",
"clsx": "2.1.1",
"class-variance-authority": "0.7.1",
"react-dom-origin": "19.2.6",
"@radix-ui/react-compose-refs": "1.1.2",
"@radix-ui/react-slot": [
"1.2.3",
"1.2.4"
],
"@radix-ui/react-primitive": [
"2.1.3",
"2.1.4"
],
"@radix-ui/react-visually-hidden": [
"1.2.3",
"1.2.4"
],
"@radix-ui/react-accessible-icon": "1.1.8",
"@radix-ui/react-context": [
"1.1.2",
"1.1.3"
],
"@radix-ui/react-collection": "1.1.9-rc.1762291353631",
"@radix-ui/primitive": "1.1.3",
"@radix-ui/react-use-layout-effect": "1.1.1",
"@radix-ui/react-use-effect-event": "0.0.2",
"@radix-ui/react-use-controllable-state": "1.2.2",
"@radix-ui/react-presence": "1.1.5",
"@radix-ui/react-id": "1.1.1",
"@radix-ui/react-collapsible": "1.1.12",
"@radix-ui/react-direction": "1.1.2-rc.1762291353631",
"@radix-ui/react-accordion": "1.2.13-rc.1762291353631",
"@radix-ui/react-use-callback-ref": "1.1.1",
"@radix-ui/react-use-escape-keydown": "1.1.1",
"@radix-ui/react-dismissable-layer": "1.1.11",
"@radix-ui/react-focus-scope": [
"1.1.7",
"1.1.8"
],
"@radix-ui/react-portal": [
"1.1.10",
"1.1.9"
],
"@radix-ui/react-focus-guards": "1.1.3",
"tslib": "2.8.1",
"react-remove-scroll-bar": "2.3.8",
"use-callback-ref": "1.3.3",
"detect-node-es": "1.1.0",
"use-sidecar": "1.1.3",
"react-remove-scroll": "2.7.2",
"get-nonce": "1.0.1",
"react-style-singleton": "2.2.3",
"aria-hidden": "1.2.6",
"@radix-ui/react-dialog": "1.1.15",
"@radix-ui/react-alert-dialog": "1.1.15",
"@radix-ui/react-aspect-ratio": "1.1.8",
"use-sync-external-store": "1.7.0",
"@radix-ui/react-use-is-hydrated": "0.1.0",
"@radix-ui/react-avatar": "1.1.11",
"@radix-ui/react-use-previous": "1.1.1",
"@radix-ui/react-use-size": "1.1.1",
"@radix-ui/react-checkbox": "1.3.3",
"@floating-ui/utils": "0.2.12",
"@floating-ui/core": "1.8.0",
"@floating-ui/dom": "1.8.0",
"@floating-ui/react-dom": "2.1.9",
"@radix-ui/react-arrow": "1.1.7",
"@radix-ui/react-popper": "1.2.8",
"@radix-ui/react-roving-focus": "1.1.12-rc.1762291353631",
"@radix-ui/react-menu": "2.1.17-rc.1762291353631",
"@radix-ui/react-context-menu": "2.2.17-rc.1762291353631",
"@radix-ui/react-dropdown-menu": "2.1.17-rc.1762291353631",
"@radix-ui/react-label": [
"2.1.7",
"2.1.8"
],
"@radix-ui/react-form": "0.1.8",
"@radix-ui/react-hover-card": "1.1.15",
"@radix-ui/react-menubar": "1.1.17-rc.1762291353631",
"@radix-ui/react-navigation-menu": "1.2.15-rc.1762291353631",
"@radix-ui/number": "1.1.1",
"@radix-ui/react-one-time-password-field": "0.1.9-rc.1762291353631",
"@radix-ui/react-password-toggle-field": "0.1.3",
"@radix-ui/react-popover": "1.1.15",
"@radix-ui/react-progress": "1.1.8",
"@radix-ui/react-radio-group": "1.3.9-rc.1762291353631",
"@radix-ui/react-scroll-area": "1.2.11-rc.1762291353631",
"@radix-ui/react-select": "2.2.7-rc.1762291353631",
"@radix-ui/react-separator": "1.1.8",
"@radix-ui/react-slider": "1.3.7-rc.1762291353631",
"@radix-ui/react-switch": "1.2.6",
"@radix-ui/react-tabs": "1.1.14-rc.1762291353631",
"@radix-ui/react-toast": "1.2.16-rc.1762291353631",
"@radix-ui/react-toggle": "1.1.10",
"@radix-ui/react-toggle-group": "1.1.12-rc.1762291353631",
"@radix-ui/react-toolbar": "1.1.12-rc.1762291353631",
"@radix-ui/react-tooltip": "1.2.8",
"radix-ui": "1.4.4-rc.1762291353631",
"tailwind-merge-origin": "3.4.0",
"scheduler": "0.27.0",
"tailwindcss": "4.1.13"
},
"packageAliases": {
"react": "react-origin",
"react-dom": "react-dom-origin",
"lucide-react": "lucide-origin",
"tailwind-merge": "tailwind-merge-origin"
},
"assets": [],
"assetAdaptations": [],
"adaptations": [
"The unchanged official Origin example apps/origin/registry/default/components/comp-289.tsx is the entry, pinned to cosscom/coss revision 60b6b444e6dfb670fab47bfb0da9dd9da1f8150b under the apps/origin MIT notice.",
"The historical 21st Alert(layout/icon/action/isNotification) wrapper is not reused. The matching official variant uses explicit DOM; historical wrapper byte identity is not claimed.",
"The original Origin theme is supplied by the host. The source implementation and its available Button/cn dependencies remain unchanged.",
"The original warning title, explanatory paragraph, Learn more button, and Close notification control are retained. No navigation or dismiss handler is added."
],
"runtime_verified": false
}
README.md실행 안내·자료
# 작업 요청 알림 · Origin UI
The acquired original files are unchanged. Source revision: 60b6b444e6dfb670fab47bfb0da9dd9da1f8150b. Each exact file hash and any demo content revision is recorded in provenance.json. Keep all included license notices.
- The unchanged official Origin example apps/origin/registry/default/components/comp-289.tsx is the entry, pinned to cosscom/coss revision 60b6b444e6dfb670fab47bfb0da9dd9da1f8150b under the apps/origin MIT notice.
- The historical 21st Alert(layout/icon/action/isNotification) wrapper is not reused. The matching official variant uses explicit DOM; historical wrapper byte identity is not claimed.
- The original Origin theme is supplied by the host. The source implementation and its available Button/cn dependencies remain unchanged.
- The original warning title, explanatory paragraph, Learn more button, and Close notification control are retained. No navigation or dismiss handler is added.
- Host spacing and fallback tokens come from runtime/author-styles.css. runtime/applied-theme.css contains the selected original author theme and overrides fallback tokens.
Open the standalone HTML to run with all JavaScript and CSS bundled locally. ?theme=light and ?theme=dark select the host theme. The parent gallery must use an opaque allow-scripts sandbox. No external requests are required.
For source reuse, start with Usage.tsx and the unchanged baseline demonstration. Resolve @/ imports to their included matching author files and install the exact package versions in provenance.json. The host mount and styles are supplied for reference.
Build success and the ready message do not prove runtime or accessibility behavior. Browser validation is recorded separately.
BEHIND THE EXAMPLE
이 장면을 만드는 원리
조치를 요청하지만 구체적인 작업은 없는 예문
행동을 요청하는 문구는 대상과 다음 행동을 설명해야 합니다.
- 이 예제에서는
- comp-289은 Something requires your action!과 조치가 필요하다는 일반 설명을 보여 줍니다. Learn more는 size=sm Button이지만 목적지나 처리기가 없습니다. 경고 아이콘과 제목·설명·버튼의 위계를 보여 주는 예제이며 실제 해결할 상황은 입력받지 않습니다.
코드와 함께 확인하기
코드에서 찾기
Something requires your action!author-example.tsx조치 대상을 특정하지 않는 고정 제목입니다.
<Button size="sm">Learn more</Button>author-example.tsx상세 동작이나 이동 주소가 없는 버튼입니다.
직접 해보기
제목과 설명만 읽고 필요한 조치와 Learn more의 결과를 설명해 봅니다.
살펴볼 변화원본에 없는 대상·목적지는 없는 것으로 기록합니다. 실제 상세 화면이 열리도록 구현됐다고 보고하지 않습니다.
제목·설명·닫기가 있는 일반 문서 카드
시각적 위계와 실제 요소·입력·알림 의미를 따로 확인합니다.
- 이 예제에서는
- 제목과 설명은 p이며 경고 아이콘과 본문 묶음을 flex로 나눕니다. Learn more 아래 동작 상태나 role=alert는 없고 Close notification도 제거 콜백 없이 렌더링합니다. max-w-[400px] 카드이며 고정 위치는 주석의 제안에만 있습니다.
코드와 함께 확인하기
코드에서 찾기
<p className="font-medium text-sm">author-example.tsx시각적으로 강조한 제목도 일반 문단입니다.
aria-label="Close notification"author-example.tsx이름이 있는 닫기 버튼에 제거 동작은 전달하지 않습니다.
직접 해보기
작은 부모에서 설명 전체를 읽고 키보드로 Learn more와 닫기를 활성화합니다.
살펴볼 변화문구의 읽기 순서와 두 버튼의 초점을 확인하되 상세 이동·자동 알림·닫힘은 각각 별도로 기록합니다. 현재 소스에 없는 기능을 통과로 간주하지 않습니다.
