Well
A recessed, inset container used to group and de-emphasize content.
When to use
- De-emphasize a block of content relative to the surface around it.
- Frame an empty state, a code sample, a supplementary note, or a read-only summary.
- Compose
Emptyinside aWellwhen a zero-data state needs an inset panel. - Prefer
Cardwhen the content is primary and needs a raised box, a header, or a footer. - Prefer
CodeBlockwhen the content is code and needs highlighting and a copy button.
Polymorphism
Well accepts an asChild prop. When true, it renders its single child
instead of its default <div>, forwarding all class names, data-*
attributes, and the ref onto that child. Reach for this when the recessed
container should also be a more semantic element, such as a labelled
<section>.
Appearance
A Well renders like a Card.Root, but with an inset shadow and the base background. It therefore looks sunken into the page.
API Reference
Well
A recessed, inset container. Renders a <div> by default and spreads all standard <div> props onto the rendered element.
All props from div, plus: