Components
Prominent message related to the entire page or a specific area. Renders a title, an optional icon and a children slot; supports an actions slot, four status colors (critical, warning, positive, primary), inline layout direction and bleed.
npx @21st-dev/cli add reshaped/reshaped-alertLoading preview...
import { Link, Reshaped } from "reshaped/bundle";
import Alert from "@/components/ui/reshaped-alert";
const ActivityIcon = () => (
<svg
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
>
<polyline points="22 12 18 12 15 21 9 3 6 12 2 12" />
</svg>
);
export default function Demo() {
return (
<Reshaped theme="slate">
<div style={{ maxWidth: 640, width: "100%", margin: "0 auto", padding: 24 }}>
<Alert
title="Update your theme"
icon={ActivityIcon}
actionsSlot={[
<Link variant="plain" key="generate" onClick={() => {}}>
Generate
</Link>,
<Link variant="plain" key="skip" onClick={() => {}}>
Skip for now
</Link>,
]}
>
Don't forget to generate the new theme definition after updating to our
latest release.
</Alert>
</div>
</Reshaped>
);
}
Loading preview...
Loading preview...
Loading preview...
Loading preview...