feat: add full-screen loading screen

This commit is contained in:
rajun 2026-10-27 16:28:54 +05:30
parent 30a991cc66
commit 027e830314

View File

@ -0,0 +1,17 @@
import { Text } from '~/components/ui/text';
import { LOADER_ILLUSTRATION } from '~/data/brand';
// Full-screen loading state: the AR illustration, an indeterminate bar and a label. Still with reduced motion.
export function LoadingScreen({ label = 'Loading…' }: { label?: string }) {
return (
<div role='status' className='fixed inset-0 flex flex-col items-center justify-center gap-7 bg-background px-6'>
<img {...LOADER_ILLUSTRATION} alt='' className='h-auto w-full max-w-[400px] animate-float motion-reduce:animate-none' />
<div className='flex w-40 flex-col items-center gap-3'>
<span aria-hidden='true' className='relative h-0.5 w-full overflow-hidden rounded-full bg-border-divider'>
<span className='absolute inset-y-0 left-0 w-1/3 animate-loading-bar rounded-full bg-primary motion-reduce:animate-none' />
</span>
<Text variant='eyebrow'>{label}</Text>
</div>
</div>
);
}