v3.5: NumberField, new input sizes and more

Perfect starting point for building design systems

Save months of design and development work for your team with the full design system setup and source code

main
Prettier
export { default } from "./Popover";
export type { Props as PopoverProps, Instance as PopoverInstance } from "./Popover.types";
import { classNames } from "utilities/helpers";
import Flyout, { useFlyoutContext, type FlyoutProps } from "components/_private/Flyout";
import Dismissible, { type DismissibleProps } from "components/Dismissible";
import type * as T from "./Popover.types";
import s from "./Popover.module.css";
import getPaddingStyles from "styles/padding";

const Popover = (props: T.Props) => {
	const {
		width,
		variant = "elevated",
		triggerType = "click",
		position = "bottom",
		...flyoutProps
	} = props;
	const padding = props.padding ?? (variant === "headless" ? 0 : 4);
	const trapFocusMode =
		props.trapFocusMode || (triggerType === "hover" ? "content-menu" : undefined);
	const paddingStyles = getPaddingStyles(padding);
	const contentClassName = classNames(
		s.content,
		!!width && s["content--has-width"],
		variant && s[`content--variant-${variant}`]
	);

	return (
		<Flyout
			{...(flyoutProps as FlyoutProps)}
			position={position}
			trapFocusMode={trapFocusMode}
			triggerType={triggerType}
			width={width}
			contentClassName={contentClassName}
			contentAttributes={{ style: { ...paddingStyles?.variables } }}
		/>
	);
};

const PopoverDismissible = (props: DismissibleProps) => {
	const { handleClose } = useFlyoutContext();

	return <Dismissible {...props} onClose={handleClose} />;
};

Popover.Dismissible = PopoverDismissible;
Popover.Trigger = Flyout.Trigger;
Popover.Content = Flyout.Content;

export default Popover;
.content {
	max-width: 360px;
}

.content--variant-elevated {
	border-radius: var(--rs-radius-medium);
	background: var(--rs-color-background-elevation-overlay);
	color: var(--rs-color-foreground-neutral);
	border: 1px solid var(--rs-color-border-neutral-faded);
	box-shadow: var(--rs-shadow-overlay);
	overflow: hidden;
	min-width: 220px;
}

.content.content--has-width {
	max-width: none;
	min-width: 0;
}

@media (--rs-viewport-s) {
	.content {
		max-width: none;
	}
}
import type React from "react";
import type { FlyoutProps, FlyoutInstance } from "components/_private/Flyout";

export type Instance = FlyoutInstance;

export type Props = Pick<
	FlyoutProps,
	| "id"
	| "position"
	| "forcePosition"
	| "fallbackPositions"
	| "onOpen"
	| "onClose"
	| "width"
	| "trapFocusMode"
	| "active"
	| "defaultActive"
	| "contentGap"
	| "contentShift"
	| "instanceRef"
	| "triggerType"
	| "disableHideAnimation"
	| "disableContentHover"
	| "disableCloseOnOutsideClick"
	| "containerRef"
	| "initialFocusRef"
	| "originCoordinates"
> & {
	children?: React.ReactNode;
	padding?: number;
	variant?: "elevated" | "headless";
};
We were in the middle of transitioning from a mix of different software stacks to a more streamlined setup, so finding a tool that could keep our frontend looking sharp and performing well was high on the list. Reshaped quickly stood out for its atomic component approach and has been a great fit. What truly made us commit to Reshaped was the team behind it: they actively support the product, genuinely care about user feedback, and keep the door open for new ideas. It's rare to find that kind of dedication, and it made the choice an easy one.
Read the case study
Our engineers and designers compared multiple options and settled on Reshaped because it has the best Figma library (a 100% match with its React counterpart), a wide range of well-designed components, doesn't use CSS-in-JS or other heavy dependencies, works perfectly with server-side rendering, and is easy to integrate with frameworks like Next.js and Vite. We’ve never regretted the decision to use Reshaped. The library dramatically boosted our development speed, enabling us to release our MVP faster than planned.
Read the case study
Reshaped source code provides everything you would expect from a design system setup and it will save you months of work.
You own the code completely and can modify the components based on your product needs. Add new functionality or delete cerain properties, it's up to you.
All components are perfectly synced with the Reshaped Figma library, with simultaneous releases for both libraries.
Each component has a storybook file with its properties, common edge cases to test and can be used for storing your documentation.
All components come with an extensive unit and screenshot testing coverage so you can be sure your changes are working as expected or add new test cases.
You get our repository exactly as it is used for development, with the full GitHub actions and linting setup.
All components are WCAG and WAI-ARIA compliant. Everything from color contrast to screen reader navigation is optimized, making your product more accessible for everyone.
Don't worry about the future costs. Pay once and use the source code for your whole team with a life-time license.
Need custom Reshaped features for your product, workshops with the team or general design system consulting? Let's talk 👋
Reshaped's superpower is its theming architecture because it has a fine balance of flexibility and constraints. It is easy for the consumers to tweak the theme based on their brand and product and yet it is logical enough to understand from the outside and provides automatic dark mode support.
Kamlesh Chandnani
Principal Frontend Engineer, Razorpay
Reshaped provided us with the tools to build both our product and website remarkably quickly. As a small team with short deadlines, Reshaped allowed us to focus on delivering the experience instead of grinding away on components. The documentation is in a class of its own and enabled our team to ship at lightning speed. I'd recommend Reshaped to any team looking to move fast with a high-quality frontend.
Mike Carbone
Founder, CEO of Hermae
Teams and individual engineers start using Reshaped for its flexibility and focus on core components. They stay for the exceptional developer experience and outstanding support.
Built with Reshaped in Amsterdam ❤️