The IdentityPlaceholder background fills both the parent's width and height. The shape maintains its aspect ratio and is centered to fit the parent's shorter axis, so it is not clipped even in non-square containers.
Place it inside a Box with specified width and height.
import { Box } from "@seed-design/lynx-react";import { IdentityPlaceholder } from "@/components/ui/identity-placeholder";export function ProfileFallback() { return ( <Box width="160px" height="160px"> <IdentityPlaceholder /> </Box> );}
The default identity is "person" and displays a person shape. Passing identity="business" displays a business/store shape.
You can pass accessibility props for the internal native <image> with imageProps. The default accessibility label is "Identity placeholder" and can be overridden to match the context.
<IdentityPlaceholder imageProps={{ "accessibility-label": "Profile image not loaded" }} />
Recipe's gray-500 background and static-white-alpha-800 glyph
Same gray-500 background. Glyph preserves the static-white-alpha-800 value from React Recipe (#ffffffde) fixed in WebP
Accessibility
aria-label
Native accessibility-label in imageProps
SVG / asChild prop
SVG prop and DOM Slot combination possible
Not supported. Use native <view> props on Root and native <image> props on Image
Since Lynx native image does not render SVG, both shapes are provided as internal WebP. The image is bundled via package asset import and makes no external URL requests. The glyph color preserves the original React Recipe's fixed alpha in the raster, so tint-color or dynamic tint hooks are not added.