Components
Renders its children as button content and works with both href and onClick. Supports solid, outline, ghost and faded variants, neutral/primary/critical/positive colors, four sizes with fullWidth, loading and disabled states, start/end icons, icon-only mode, rounded shape, raised elevation and a Button.Group compound component.
npx @21st-dev/cli add reshaped/reshaped-buttonLoading preview...
import { Reshaped, View } from "reshaped/bundle";
import Button from "@/components/ui/reshaped-button";
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={{ margin: "0 auto", padding: 24, display: "flex", justifyContent: "center" }}>
<View gap={3} direction="row">
<Button rounded onClick={() => {}}>
Edit profile
</Button>
<Button
rounded
icon={ActivityIcon}
variant="outline"
color="primary"
attributes={{ "aria-label": "1-click order" }}
onClick={() => {}}
/>
<Button
rounded
icon={ActivityIcon}
variant="outline"
attributes={{ "aria-label": "1-click order" }}
onClick={() => {}}
/>
<Button
rounded
icon={ActivityIcon}
variant="ghost"
attributes={{ "aria-label": "1-click order" }}
onClick={() => {}}
/>
</View>
</div>
</Reshaped>
);
}
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...