21st.dev 원본
Avatar Group · Myna UI
섹션 · MIT
갤러리 안에서는 화면을 벗어나거나 움직임을 멈추면 예제도 닫힙니다. 다시 재생할 때는 처음부터 시작해요.
저장한 HTML에서는 갤러리의 재생 설정이 적용되지 않아요.
SOURCE FILES
원본 코드 읽기
수집한 원본 소스와 실행 안내를 함께 제공합니다. 실행 HTML에는 미리보기를 위한 실행 환경이 들어 있습니다.
baseline-example.tsx
import { Avatar, AvatarImage } from "@/components/ui/avatar";
function Basic() {
return (
<div className="flex -space-x-3 *:ring *:ring-background">
<Avatar>
<AvatarImage src="https://cdn.21st.dev/assets/localized/7fa55179b43294add3e70c73debc1c3f61294ca434a6335e79a24ad29d1c114d.webp" />
</Avatar>
<Avatar>
<AvatarImage src="https://cdn.21st.dev/assets/localized/5a3b59db75f926925800311b50b6e091f955d5a357d67cbd34c52dca43b9c0c7.webp" />
</Avatar>
<Avatar>
<AvatarImage src="https://cdn.21st.dev/assets/localized/2ec4769bc69ba81b258a9e8ae32be57e8b7c9e6da68a709533b168f43324f620.webp" />
</Avatar>
</div>
);
}
export { Basic };
export default Basic;
함께 쓰는 파일 14개 보기
registry/avatar.json
{
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
"name": "avatar",
"type": "registry:ui",
"author": "shadcn (https://ui.shadcn.com)",
"dependencies": [
"@radix-ui/react-avatar"
],
"files": [
{
"path": "ui/avatar.tsx",
"content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as AvatarPrimitive from \"@radix-ui/react-avatar\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Avatar = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Root\n ref={ref}\n className={cn(\n \"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full\",\n className\n )}\n {...props}\n />\n))\nAvatar.displayName = AvatarPrimitive.Root.displayName\n\nconst AvatarImage = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Image>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Image\n ref={ref}\n className={cn(\"aspect-square h-full w-full\", className)}\n {...props}\n />\n))\nAvatarImage.displayName = AvatarPrimitive.Image.displayName\n\nconst AvatarFallback = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Fallback>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Fallback\n ref={ref}\n className={cn(\n \"flex h-full w-full items-center justify-center rounded-full bg-muted\",\n className\n )}\n {...props}\n />\n))\nAvatarFallback.displayName = AvatarPrimitive.Fallback.displayName\n\nexport { Avatar, AvatarImage, AvatarFallback }\n",
"type": "registry:ui",
"target": ""
}
]
}registry/ui/avatar.tsx
"use client"
import * as React from "react"
import * as AvatarPrimitive from "@radix-ui/react-avatar"
import { cn } from "@/lib/utils"
const Avatar = React.forwardRef<
React.ElementRef<typeof AvatarPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>
>(({ className, ...props }, ref) => (
<AvatarPrimitive.Root
ref={ref}
className={cn(
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
className
)}
{...props}
/>
))
Avatar.displayName = AvatarPrimitive.Root.displayName
const AvatarImage = React.forwardRef<
React.ElementRef<typeof AvatarPrimitive.Image>,
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>
>(({ className, ...props }, ref) => (
<AvatarPrimitive.Image
ref={ref}
className={cn("aspect-square h-full w-full", className)}
{...props}
/>
))
AvatarImage.displayName = AvatarPrimitive.Image.displayName
const AvatarFallback = React.forwardRef<
React.ElementRef<typeof AvatarPrimitive.Fallback>,
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>
>(({ className, ...props }, ref) => (
<AvatarPrimitive.Fallback
ref={ref}
className={cn(
"flex h-full w-full items-center justify-center rounded-full bg-muted",
className
)}
{...props}
/>
))
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName
export { Avatar, AvatarImage, AvatarFallback }
registry/utils.json
{
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
"name": "utils",
"type": "registry:lib",
"author": "shadcn (https://ui.shadcn.com)",
"dependencies": [
"clsx",
"tailwind-merge"
],
"files": [
{
"path": "lib/utils.ts",
"content": "import { clsx, type ClassValue } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n",
"type": "registry:lib",
"target": ""
}
]
}registry/lib/utils.ts
import { clsx, type ClassValue } from "clsx"
import { twMerge } from "tailwind-merge"
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}
assets/7fa55179b43294add3e70c73debc1c3f61294ca434a6335e79a24ad29d1c114d.webp
큰 소스 파일과 이미지·모델 등의 자료는 파일을 저장해 확인할 수 있어요.
assets/5a3b59db75f926925800311b50b6e091f955d5a357d67cbd34c52dca43b9c0c7.webp
큰 소스 파일과 이미지·모델 등의 자료는 파일을 저장해 확인할 수 있어요.
assets/2ec4769bc69ba81b258a9e8ae32be57e8b7c9e6da68a709533b168f43324f620.webp
큰 소스 파일과 이미지·모델 등의 자료는 파일을 저장해 확인할 수 있어요.
Usage.tsx실행 안내·자료
// Local host for the unchanged exact baseline demonstration.
import OriginalDemo from "./baseline-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;
}
}
THIRD-PARTY-LICENSES.txt실행 안내·자료
react 19.2.3 — LICENSE
MIT License
Copyright (c) Meta Platforms, Inc. and affiliates.
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.
========================================================================
@radix-ui/primitive 1.1.7 — LICENSE
MIT License
Copyright (c) 2022 WorkOS
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.
========================================================================
@radix-ui/react-context 1.2.2 — LICENSE
MIT License
Copyright (c) 2022 WorkOS
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.
========================================================================
@radix-ui/react-use-callback-ref 1.1.4 — LICENSE
MIT License
Copyright (c) 2022 WorkOS
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.
========================================================================
@radix-ui/react-use-layout-effect 1.1.4 — LICENSE
MIT License
Copyright (c) 2022 WorkOS
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.
========================================================================
react-dom 19.2.3 — LICENSE
MIT License
Copyright (c) Meta Platforms, Inc. and affiliates.
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.
========================================================================
@radix-ui/react-compose-refs 1.1.5 — LICENSE
MIT License
Copyright (c) 2022 WorkOS
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.
========================================================================
@radix-ui/react-slot 1.3.3 — LICENSE
MIT License
Copyright (c) 2022 WorkOS
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.
========================================================================
@radix-ui/react-primitive 2.1.10 — LICENSE
MIT License
Copyright (c) 2022 WorkOS
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.
========================================================================
@radix-ui/react-avatar 1.2.6 — LICENSE
MIT License
Copyright (c) 2022 WorkOS
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.
========================================================================
clsx 2.1.1 — license
MIT License
Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
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.
========================================================================
tailwind-merge 3.3.1 — LICENSE.md
MIT License
Copyright (c) 2021 Dany Castillo
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.
========================================================================
scheduler 0.27.0 — LICENSE
MIT License
Copyright (c) Meta Platforms, Inc. and affiliates.
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.
========================================================================
tailwindcss 4.1.13 — LICENSE
MIT License
Copyright (c) Tailwind Labs, Inc.
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.
========================================================================
tailwindcss-animate 1.0.7 — LICENSE
MIT License
Copyright (c) 2020 Jamie Kyle
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.
runtime/asset-adapter.json실행 안내·자료
{
"operation": "replace exact declared asset URL with its acquired bytes as a data URL only while bundling; original source files unchanged",
"assets": [
{
"source_url": "https://cdn.21st.dev/assets/localized/7fa55179b43294add3e70c73debc1c3f61294ca434a6335e79a24ad29d1c114d.webp",
"response": "artifacts/full-import/21st-author-sources/responses/asset-d966b5e061130f7b7195.json.gz",
"http_status": 200,
"sha256": "7fa55179b43294add3e70c73debc1c3f61294ca434a6335e79a24ad29d1c114d",
"content_type": "image/webp",
"license_basis": "공개 데모 레코드의 MIT 선언; 이미지별 별도 라이선스 문구는 제공되지 않음",
"file": "assets/7fa55179b43294add3e70c73debc1c3f61294ca434a6335e79a24ad29d1c114d.webp"
},
{
"source_url": "https://cdn.21st.dev/assets/localized/5a3b59db75f926925800311b50b6e091f955d5a357d67cbd34c52dca43b9c0c7.webp",
"response": "artifacts/full-import/21st-author-sources/responses/asset-1aa7bc4ae9ec9f3e9a0d.json.gz",
"http_status": 200,
"sha256": "5a3b59db75f926925800311b50b6e091f955d5a357d67cbd34c52dca43b9c0c7",
"content_type": "image/webp",
"license_basis": "공개 데모 레코드의 MIT 선언; 이미지별 별도 라이선스 문구는 제공되지 않음",
"file": "assets/5a3b59db75f926925800311b50b6e091f955d5a357d67cbd34c52dca43b9c0c7.webp"
},
{
"source_url": "https://cdn.21st.dev/assets/localized/2ec4769bc69ba81b258a9e8ae32be57e8b7c9e6da68a709533b168f43324f620.webp",
"response": "artifacts/full-import/21st-author-sources/responses/asset-2b71585ab457fcbc9f0b.json.gz",
"http_status": 200,
"sha256": "2ec4769bc69ba81b258a9e8ae32be57e8b7c9e6da68a709533b168f43324f620",
"content_type": "image/webp",
"license_basis": "공개 데모 레코드의 MIT 선언; 이미지별 별도 라이선스 문구는 제공되지 않음",
"file": "assets/2ec4769bc69ba81b258a9e8ae32be57e8b7c9e6da68a709533b168f43324f620.webp"
}
]
}
provenance.json실행 안내·자료
{
"id": "21st-8e16493459e3",
"sourceRevision": "98a1fe67b439324ddc857f47fbdce056600a4329",
"demoIdentity": {
"file": "baseline-example.tsx",
"export": "default",
"source": "exact-public-demo"
},
"fidelity": {
"preserved": "원래 공개 카드의 demo ID 및 이미지로 연결한 CDN 바이트 전체",
"dependency_source": "공식 shadcn new-york 공개 registry의 내용 SHA256 고정본",
"observed_differences": [
"작성자 현재 registry의 default export, @/ui 별칭, 아이콘과 데모 wrapper 변화가 있어 원래 공개 CDN 전체 바이트를 사용한다.",
"표준 primitive는 현재 공식 new-york registry의 SHA256 고정본이다. API 및 실제 렌더링 검증은 빌더 단계에서 구분한다."
]
},
"acquisitionLimitations": [
"작성자 문서의 현재 예제와 원래 21st 변형의 차이는 보존한다. 현재 예제로 원래 데모를 대체하지 않는다.",
"UI primitive는 공식 registry의 현재 공개 new-york 버전이며 과거 21st 내부 바이트와 동일하다는 주장은 하지 않는다.",
"게시자가 공개 카드에 선언한 MIT와 각 의존 소스의 MIT를 근거로 보존한다. 다운로드한 코드의 실행·브라우저 검증은 수행하지 않았다."
],
"files": [
{
"file": "baseline-example.tsx",
"kind": "implementation",
"sha256": "73cf0c5d7c5e6bac72b35cd16101cb62ed4c06678b22d596a7ae3729e33d7a1f",
"sourceRevision": "sha256:73cf0c5d7c5e6bac72b35cd16101cb62ed4c06678b22d596a7ae3729e33d7a1f",
"license": "MIT"
},
{
"file": "LICENSE.shadcn",
"kind": "license",
"sha256": "1564074e13439397221ffd522e2e504d56561994a23d371aa5e3ad43e4f5423f",
"sourceRevision": "98a1fe67b439324ddc857f47fbdce056600a4329",
"license": "MIT"
},
{
"file": "registry/avatar.json",
"kind": "dependency-manifest",
"sha256": "4fdcb3d39aa70de77b59e195130c3a074e785f4886514be6df50618c57420f30",
"sourceRevision": "sha256:4fdcb3d39aa70de77b59e195130c3a074e785f4886514be6df50618c57420f30",
"license": "MIT"
},
{
"file": "registry/ui/avatar.tsx",
"kind": "implementation-dependency",
"sha256": "e78b35ed76c67d8ff50603fbe0dfa4fe600097bd860d89e65beea3e16683dad8",
"sourceRevision": "sha256:4fdcb3d39aa70de77b59e195130c3a074e785f4886514be6df50618c57420f30",
"license": "MIT"
},
{
"file": "registry/utils.json",
"kind": "dependency-manifest",
"sha256": "5ee7ca619ff89f9229c0c756cfef2b6c78356d81ce72944cb122beb3816e51e5",
"sourceRevision": "sha256:5ee7ca619ff89f9229c0c756cfef2b6c78356d81ce72944cb122beb3816e51e5",
"license": "MIT"
},
{
"file": "registry/lib/utils.ts",
"kind": "implementation-dependency",
"sha256": "7c8c3dfc0cdd370d44932828eb067ef771c8fe7996693221d5d4b90af6d54f2d",
"sourceRevision": "sha256:5ee7ca619ff89f9229c0c756cfef2b6c78356d81ce72944cb122beb3816e51e5",
"license": "MIT"
},
{
"file": "assets/7fa55179b43294add3e70c73debc1c3f61294ca434a6335e79a24ad29d1c114d.webp",
"kind": "declared-demo-asset",
"sha256": "7fa55179b43294add3e70c73debc1c3f61294ca434a6335e79a24ad29d1c114d",
"sourceRevision": "sha256:7fa55179b43294add3e70c73debc1c3f61294ca434a6335e79a24ad29d1c114d",
"license": "publisher-declaration-only; asset-specific-license-unspecified"
},
{
"file": "assets/5a3b59db75f926925800311b50b6e091f955d5a357d67cbd34c52dca43b9c0c7.webp",
"kind": "declared-demo-asset",
"sha256": "5a3b59db75f926925800311b50b6e091f955d5a357d67cbd34c52dca43b9c0c7",
"sourceRevision": "sha256:5a3b59db75f926925800311b50b6e091f955d5a357d67cbd34c52dca43b9c0c7",
"license": "publisher-declaration-only; asset-specific-license-unspecified"
},
{
"file": "assets/2ec4769bc69ba81b258a9e8ae32be57e8b7c9e6da68a709533b168f43324f620.webp",
"kind": "declared-demo-asset",
"sha256": "2ec4769bc69ba81b258a9e8ae32be57e8b7c9e6da68a709533b168f43324f620",
"sourceRevision": "sha256:2ec4769bc69ba81b258a9e8ae32be57e8b7c9e6da68a709533b168f43324f620",
"license": "publisher-declaration-only; asset-specific-license-unspecified"
}
],
"importMap": {
"@/components/ui/avatar": "registry/ui/avatar.tsx",
"@/lib/utils": "registry/lib/utils.ts"
},
"declaredDependencies": {
"@radix-ui/react-avatar": null,
"react": null,
"clsx": null,
"tailwind-merge": null
},
"runtimeDependencies": {
"react": "19.2.3",
"@radix-ui/primitive": "1.1.7",
"@radix-ui/react-context": "1.2.2",
"@radix-ui/react-use-callback-ref": "1.1.4",
"@radix-ui/react-use-layout-effect": "1.1.4",
"react-dom": "19.2.3",
"@radix-ui/react-compose-refs": "1.1.5",
"@radix-ui/react-slot": "1.3.3",
"@radix-ui/react-primitive": "2.1.10",
"@radix-ui/react-avatar": "1.2.6",
"clsx": "2.1.1",
"tailwind-merge": "3.3.1",
"scheduler": "0.27.0",
"tailwindcss": "4.1.13",
"tailwindcss-animate": "1.0.7"
},
"assets": [
{
"source_url": "https://cdn.21st.dev/assets/localized/7fa55179b43294add3e70c73debc1c3f61294ca434a6335e79a24ad29d1c114d.webp",
"response": "artifacts/full-import/21st-author-sources/responses/asset-d966b5e061130f7b7195.json.gz",
"http_status": 200,
"sha256": "7fa55179b43294add3e70c73debc1c3f61294ca434a6335e79a24ad29d1c114d",
"content_type": "image/webp",
"license_basis": "공개 데모 레코드의 MIT 선언; 이미지별 별도 라이선스 문구는 제공되지 않음",
"file": "assets/7fa55179b43294add3e70c73debc1c3f61294ca434a6335e79a24ad29d1c114d.webp"
},
{
"source_url": "https://cdn.21st.dev/assets/localized/5a3b59db75f926925800311b50b6e091f955d5a357d67cbd34c52dca43b9c0c7.webp",
"response": "artifacts/full-import/21st-author-sources/responses/asset-1aa7bc4ae9ec9f3e9a0d.json.gz",
"http_status": 200,
"sha256": "5a3b59db75f926925800311b50b6e091f955d5a357d67cbd34c52dca43b9c0c7",
"content_type": "image/webp",
"license_basis": "공개 데모 레코드의 MIT 선언; 이미지별 별도 라이선스 문구는 제공되지 않음",
"file": "assets/5a3b59db75f926925800311b50b6e091f955d5a357d67cbd34c52dca43b9c0c7.webp"
},
{
"source_url": "https://cdn.21st.dev/assets/localized/2ec4769bc69ba81b258a9e8ae32be57e8b7c9e6da68a709533b168f43324f620.webp",
"response": "artifacts/full-import/21st-author-sources/responses/asset-2b71585ab457fcbc9f0b.json.gz",
"http_status": 200,
"sha256": "2ec4769bc69ba81b258a9e8ae32be57e8b7c9e6da68a709533b168f43324f620",
"content_type": "image/webp",
"license_basis": "공개 데모 레코드의 MIT 선언; 이미지별 별도 라이선스 문구는 제공되지 않음",
"file": "assets/2ec4769bc69ba81b258a9e8ae32be57e8b7c9e6da68a709533b168f43324f620.webp"
}
],
"assetAdaptations": [],
"adaptations": [
"The exact public baseline demo is retained. Its UI dependencies are the content-pinned official shadcn new-york registry sources, not a claim of historical 21st dependency byte identity.",
"The original three image URLs, overlap classes, DOM order, and default export are retained; image localization belongs to the host asset adapter."
],
"runtime_verified": false
}
README.md실행 안내·자료
# Avatar Group · Myna UI
The acquired original files are unchanged. Source revision: 98a1fe67b439324ddc857f47fbdce056600a4329. Each exact file hash and any demo content revision is recorded in provenance.json. Keep all included license notices.
- The exact public baseline demo is retained. Its UI dependencies are the content-pinned official shadcn new-york registry sources, not a claim of historical 21st dependency byte identity.
- The original three image URLs, overlap classes, DOM order, and default export are retained; image localization belongs to the host asset adapter.
- Host spacing and fallback tokens come from runtime/author-styles.css. These tokens are local integration support, not original design-system defaults.
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
이 장면을 만드는 원리
세 이미지의 겹침과 입력 범위
겹쳐 보이는 요소의 크기와 역할을 실제 콘텐츠 조건에서 검토합니다.
- 이 예제에서는
- Basic은 flex 행의 세 Avatar를 -space-x-3으로 겹칩니다. 원본에는 인원수 계산·추가 인원 배지·hover 확장·선택 상태가 없습니다. ring은 이미지 경계 표현이고 클릭 대상을 의미하지 않습니다.
코드와 함께 확인하기
코드에서 찾기
flex -space-x-3 *:ring *:ring-backgroundbaseline-example.tsx겹침과 경계를 지정하는 전체 배치입니다.
<AvatarPrimitive.Rootavatar.tsx아바타의 표시 컨테이너이며 별도 버튼을 만들지 않습니다.
직접 해보기
좁은 부모와 rtl에서 이미지 겹침을 확인하고 Tab으로 이동합니다.
살펴볼 변화세 이미지가 표시 요소임을 확인합니다. 겹침 배치만으로 프로필 선택이나 사람 목록 탐색이 가능하다고 주장하지 않습니다.
사진의 이름은 소스에 없다
사용자 이미지는 무엇을 의미하는지와 실패 시 무엇이 남는지 명시합니다.
- 이 예제에서는
- 세 AvatarImage에 대체 텍스트가 없고 AvatarFallback도 렌더링하지 않습니다. primitive는 전달된 props를 Image로 넘기지만 이름을 만들어 주지 않습니다. 따라서 원본에서 누가 누구인지 알 수 있는 계약은 제공되지 않습니다.
코드와 함께 확인하기
코드에서 찾기
import { Avatar, AvatarImage }baseline-example.tsxFallback을 사용하지 않는 원본 구성입니다.
<AvatarPrimitive.Imageavatar.tsx이미지 props를 전달하며 고정 alt를 추가하지 않습니다.
직접 해보기
이미지 성공·실패 조건에서 접근성 트리와 남는 콘텐츠를 비교합니다.
살펴볼 변화원본의 이름·대체 콘텐츠 부재를 기록하고 로컬 에셋을 연결한 것만으로 보완되었다고 판단하지 않습니다.
