app-ui / headings / page-headings
With Avatar And Actions
08-with-avatar-and-actions.jsx
export default function Example() {
return (
<div className="md:flex md:items-center md:justify-between md:space-x-5">
<div className="flex items-start space-x-5">
<div className="shrink-0">
<div className="relative">
<img
alt=""
src="https://images.unsplash.com/photo-1463453091185-61582044d556?ixlib=rb-=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=8&w=1024&h=1024&q=80"
className="size-16 rounded-full dark:outline dark:-outline-offset-1 dark:outline-white/10"
/>
<span aria-hidden="true" className="absolute inset-0 rounded-full shadow-inner" />
</div>
</div>
{/*
Use vertical padding to simulate center alignment when both lines of text are one line,
but preserve the same layout if the text wraps without making the image jump around.
*/}
<div className="pt-1.5">
<h1 className="text-2xl font-bold text-gray-900 dark:text-white">Ricardo Cooper</h1>
<p className="text-sm font-medium text-gray-500 dark:text-gray-400">
Applied for{' '}
<a href="#" className="text-gray-900 dark:text-white">
Front End Developer
</a>{' '}
on <time dateTime="2020-08-25">August 25, 2020</time>
</p>
</div>
</div>
<div className="mt-6 flex flex-col-reverse justify-stretch space-y-4 space-y-reverse sm:flex-row-reverse sm:justify-end sm:space-y-0 sm:space-x-3 sm:space-x-reverse md:mt-0 md:flex-row md:space-x-3">
<button
type="button"
className="inline-flex items-center justify-center rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-xs inset-ring inset-ring-gray-300 hover:bg-gray-50 dark:bg-white/10 dark:text-white dark:shadow-none dark:inset-ring-white/5 dark:hover:bg-white/20"
>
Disqualify
</button>
<button
type="button"
className="inline-flex items-center justify-center rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-xs hover:bg-indigo-500 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 dark:bg-indigo-500 dark:shadow-none dark:hover:bg-indigo-400 dark:focus-visible:outline-indigo-500"
>
Advance to offer
</button>
</div>
</div>
)
}