`. |
+| `Entity.Media` | `cl-entity-media` | 38px square leading column that centers its child. |
+| `Entity.Content` | `cl-entity-content` | Vertical stack that fills the row beside the media. |
+| `Entity.Label` | `cl-entity-label` | The entity's name. Its text truncates; elements beside it stay whole. |
+| `Entity.Description` | `cl-entity-description` | Secondary text beneath the label. Truncates to a single line. |
+
+Every part accepts a `render` prop for element polymorphism and forwards a ref.
+
+## Styling
+
+Each part carries its `.cl-entity-*` class and reflects no `data-*` attributes. Colors, type and spacing resolve from the Mosaic tokens (`--cl-color-foreground`, `--cl-color-foreground-secondary`, `--cl-text-sm-*`, `--cl-text-xs-*`, `--cl-spacing`).
+
+```css
+/* Enlarge the media column */
+.cl-entity-media {
+ width: 3rem;
+}
+```
diff --git a/packages/swingset/src/stories/entity.stories.tsx b/packages/swingset/src/stories/entity.stories.tsx
new file mode 100644
index 00000000000..9feb5dfa2d6
--- /dev/null
+++ b/packages/swingset/src/stories/entity.stories.tsx
@@ -0,0 +1,87 @@
+import { Avatar } from '@clerk/mosaic/components/avatar';
+import { Badge } from '@clerk/mosaic/components/badge';
+import { Entity } from '@clerk/mosaic/components/entity';
+
+import type { StoryMeta } from '@/lib/types';
+
+// Exposes this file's own source (via the `?raw` webpack rule) so each `
` example
+// renders a code footer with its function's source. See `StoryModule.__source`.
+export { default as __source } from './entity.stories?raw';
+
+export const meta: StoryMeta = {
+ group: 'Components',
+ status: 'stable',
+ title: 'Entity',
+ source: 'packages/mosaic/src/components/entity/entity.tsx',
+};
+
+export function Default() {
+ return (
+
+
+
+
+
+
+
+ Cameron Walker
+ cameron@clerk.com
+
+
+ );
+}
+
+export function WithBadge() {
+ return (
+
+
+
+
+
+
+
+
+ Cameron Walker
+ Default
+
+ cameron@clerk.com
+
+
+ );
+}
+
+export function LabelOnly() {
+ return (
+
+
+
+
+
+
+
+ cameron@clerk.com
+
+
+ );
+}
+
+export function Truncation() {
+ return (
+
+
+
+
+
+
+
+
+
+ Cameron Alexander Walker-Montgomery
+ Default
+
+ cameron.alexander.walker@clerk.com
+
+
+
+ );
+}