SafeImage playground
An image with an accessible fallback that retries when its source changes.
Preview
Props editor
State matrix
| Variant | Default |
|---|---|
| Sample |
Published example
API reference'use client'
import { SafeImage } from '@ancrel/ui'
import '@ancrel/tokens/css'
import '@ancrel/ui/styles.css'
export default function App() {
return (
<SafeImage src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 48'%3E%3Cpath d='M0 48L32 8l16 22 10-12 22 30z'/%3E%3C/svg%3E"
alt="Mountain silhouette" width={80} height={48} />
)
}