Skip to content

Production-ready animations, transitions, backgrounds, and scenes for Remotion

feat: rewrite docs structure

dev_wandrye75f44467f50
diff --git a/content/docs/ui/components/accordion.mdx b/content/docs/ui/components/accordion.mdx
index 2eaaaa03..02bf1e35 100644
--- a/content/docs/ui/components/accordion.mdx
+++ b/content/docs/ui/components/accordion.mdx
@@ -15,6 +15,10 @@ A state atom whose appearance (closed, opened) is a pure function of the `state`
Installing `accordion` automatically installs the shared `remocn-ui` core (`lib/remocn-ui/`) via `registryDependencies`. You do not need to install it separately.
</Note>
+## Example
+
+<LiveExample name="accordion-example" />
+
## States
`AccordionState` is:
@@ -79,12 +83,6 @@ The `duration` field on each step overrides the file's `DEFAULT_DURATION` for th
`style` takes precedence over `state` when both are provided.
-## Full lifecycle
-
-A complete closed → opened → closed run using the smooth transition path. Copy the code to drop it into your own composition.
-
-<LiveExample name="accordion-example" />
-
## Props
<PropsTable
diff --git a/content/docs/ui/components/alert-dialog.mdx b/content/docs/ui/components/alert-dialog.mdx
index c1f420e8..84246bce 100644
--- a/content/docs/ui/components/alert-dialog.mdx
+++ b/content/docs/ui/components/alert-dialog.mdx
@@ -15,6 +15,10 @@ A state atom whose appearance (closed, opened) is a pure function of the `state`
Installing `alert-dialog` automatically installs the shared `remocn-ui` core (`lib/remocn-ui/`) and the `button` primitive via `registryDependencies` (`["remocn-ui", "button"]`). You do not need to install them separately — the dialog pairs with the Button as its trigger in the canonical lifecycle example.
</Note>
+## Example
+
+<LiveExample name="alert-dialog-example" />
+
## States
`AlertDialogState` is:
@@ -79,12 +83,6 @@ The `duration` field on each step overrides the file's `DEFAULT_DURATION` (= `12
`style` takes precedence over `state` when both are provided.
-## Full lifecycle
-
-The live example composes **Button as the trigger**: a destructive Button animates through `hover` → `press` states (the "click"), and the dialog opens right after the press lands, then closes near the end. Copy the code to drop it into your own composition.
-
-<LiveExample name="alert-dialog-example" />
-
## Props
<PropsTable
diff --git a/content/docs/ui/components/button.mdx b/content/docs/ui/components/button.mdx
index cd6e1cf1..d598d9e1 100644
--- a/content/docs/ui/components/button.mdx
+++ b/content/docs/ui/components/button.mdx
@@ -15,6 +15,10 @@ A state atom whose appearance (idle, hover, press, loading, success) is a pure f
Installing `button` automatically installs `spinner` and the shared `remocn-ui` core (`lib/remocn-ui/`) via `registryDependencies`. You do not need to install either separately.
</Note>
+## Example
+
+<LiveExample name="button-example" />
+
## States
`ButtonState` is:
@@ -86,11 +90,6 @@ The `duration` field on each step overrides the file's `DEFAULT_DURATION` for th
`style` takes precedence over `state` when both are provided.
-## Full lifecycle
-
-A complete idle → hover → press → loading → success run using the smooth transition path. Copy the code to drop it into your own composition.
-
-<LiveExample name="button-example" />
## Props
diff --git a/content/docs/ui/components/checkbox.mdx b/content/docs/ui/components/checkbox.mdx
index 7fee937e..c0cdeefe 100644
--- a/content/docs/ui/components/checkbox.mdx
+++ b/content/docs/ui/components/checkbox.mdx
@@ -15,6 +15,10 @@ A state atom whose appearance (checked, unchecked) is a pure function of the `st
Installing `checkbox` automatically installs the shared `remocn-ui` core (`lib/remocn-ui/`) via `registryDependencies`. You do not need to install it separately.
</Note>
+## Example
+
+<LiveExample name="checkbox-example" />
+
## States
`CheckboxState` is:
@@ -79,11 +83,6 @@ The `duration` field on each step overrides the file's `DEFAULT_DURATION` for th
`style` takes precedence over `state` when both are provided.
-## Full lifecycle
-
-A complete unchecked → checked → unchecked run using the smooth transition path. Copy the code to drop it into your own composition.
-
-<LiveExample name="checkbox-example" />
## Props
diff --git a/content/docs/ui/components/dialog.mdx b/content/docs/ui/components/dialog.mdx
index 7113e92d..4e7a0aed 100644
--- a/content/docs/ui/components/dialog.mdx
+++ b/content/docs/ui/components/dialog.mdx
@@ -15,6 +15,10 @@ A state atom whose appearance (closed, opened) is a pure function of the `state`
Installing `dialog` automatically installs the shared `remocn-ui` core (`lib/remocn-ui/`) via `registryDependencies` (`["remocn-ui"]`). You do not need to install it separately. If you want to pair Dialog with the Button as its trigger in the canonical lifecycle example, install `button` separately.
</Note>
+## Example
+
+<LiveExample name="dialog-example" />
+
## States
`DialogState` is:
@@ -79,12 +83,6 @@ The `duration` field on each step overrides the file's `DEFAULT_DURATION` (= `12
`style` takes precedence over `state` when both are provided.
-## Full lifecycle
-
-The live example composes **Button as the trigger**: a primary Button animates through `hover` → `press` states (the "click"), and the dialog opens right after the press lands, then closes near the end. Copy the code to drop it into your own composition.
-
-<LiveExample name="dialog-example" />
-
## Props
<PropsTable
diff --git a/content/docs/ui/components/drawer.mdx b/content/docs/ui/components/drawer.mdx
index 98989ddf..f714de33 100644
--- a/content/docs/ui/components/drawer.mdx
+++ b/content/docs/ui/components/drawer.mdx
@@ -15,6 +15,10 @@ A state atom whose appearance (closed, opened) is a pure function of the `state`
Installing `drawer` automatically installs the shared `remocn-ui` core (`lib/remocn-ui/`) via `registryDependencies` (`["remocn-ui"]`). You do not need to install it separately. If you want to pair Drawer with the Button as its trigger in the canonical lifecycle example, install `button` separately.
</Note>
+## Example
+
+<LiveExample name="drawer-example" />
+
## States
`DrawerState` is:
@@ -79,12 +83,6 @@ The `duration` field on each step overrides the file's `DEFAULT_DURATION` (= `12
`style` takes precedence over `state` when both are provided.
-## Full lifecycle
-
-The live example composes **Button as the trigger**: a primary Button animates through `hover` → `press` states (the "click"), and the drawer slides up right after the press lands, then closes near the end. Copy the code to drop it into your own composition.
-
-<LiveExample name="drawer-example" />
-
## Props
<PropsTable
diff --git a/content/docs/ui/components/dropdown-menu.mdx b/content/docs/ui/components/dropdown-menu.mdx
index 0987c4f5..673692e4 100644
--- a/content/docs/ui/components/dropdown-menu.mdx
+++ b/content/docs/ui/components/dropdown-menu.mdx
@@ -15,6 +15,10 @@ A state atom representing a complete dropdown menu: a trigger button and a panel
Installing `dropdown-menu` automatically installs the shared `remocn-ui` core (`lib/remocn-ui/`), the `button` primitive, and the `dropdown-menu-item` atom via `registryDependencies` (`["remocn-ui", "button", "dropdown-menu-item"]`). You do not need to install them separately. The trigger reuses the Button `outline` variant, and the panel renders a column of DropdownMenuItem rows.
</Note>
+## Example
+
+<LiveExample name="dropdown-menu-example" />
+
## States
`DropdownMenuState` is:
@@ -106,12 +110,6 @@ Preview a single DropdownMenuItem:
When you install `dropdown-menu`, the `dropdown-menu-item` atom is automatically pulled in via `registryDependencies` — no separate install needed. The `DropdownMenu` container derives each row's state from the `highlightedIndex` and `pressedIndex` props, or you can override a row's visual with `itemStyles`.
-## Full lifecycle
-
-The live example composes **Button as the trigger**: a Button animates through `hover` → `press` states (the "click"), the dropdown panel opens right after the press lands, and rows animate through hover → press as the user picks an action. Copy the code to drop it into your own composition.
-
-<LiveExample name="dropdown-menu-example" />
-
## Props
<PropsTable
diff --git a/content/docs/ui/components/input.mdx b/content/docs/ui/components/input.mdx
index 6904cc1b..92aa3f70 100644
--- a/content/docs/ui/components/input.mdx
+++ b/content/docs/ui/components/input.mdx
@@ -15,6 +15,10 @@ A state atom whose appearance (idle, hover, active, typing, invalid) is a pure f
Installing `input` automatically installs the shared `remocn-ui` core (`lib/remocn-ui/`) via `registryDependencies`. You do not need to install it separately.
</Note>
+## Example
+
+<LiveExample name="input-example" />
+
## States
`InputState` is:
@@ -86,12 +90,6 @@ The `duration` field on each step overrides the file's `DEFAULT_DURATION` for th
`style` takes precedence over `state` when both are provided.
-## Full lifecycle
-
-A complete idle → hover → active → typing → invalid run using the smooth transition path. Copy the code to drop it into your own composition.
-
-<LiveExample name="input-example" />
-
## Props
<PropsTable
diff --git a/content/docs/ui/components/radio.mdx b/content/docs/ui/components/radio.mdx
index d5bec3f7..081b30f3 100644
--- a/content/docs/ui/components/radio.mdx
+++ b/content/docs/ui/components/radio.mdx
@@ -15,6 +15,10 @@ A state atom whose appearance (checked, unchecked) is a pure function of the `st
Installing `radio` automatically installs the shared `remocn-ui` core (`lib/remocn-ui/`) via `registryDependencies`. You do not need to install it separately.
</Note>
+## Example
+
+<LiveExample name="radio-example" />
+
## States
`RadioState` is:
@@ -79,12 +83,6 @@ The `duration` field on each step overrides the file's `DEFAULT_DURATION` for th
`style` takes precedence over `state` when both are provided.
-## Full lifecycle
-
-A complete unchecked → checked → unchecked run using the smooth transition path. Copy the code to drop it into your own composition.
-
-<LiveExample name="radio-example" />
-
## Props
<PropsTable
diff --git a/content/docs/ui/components/select.mdx b/content/docs/ui/components/select.mdx
index 44a60fd9..a723b7b6 100644
--- a/content/docs/ui/components/select.mdx
+++ b/content/docs/ui/components/select.mdx
@@ -15,6 +15,10 @@ A state atom representing a complete select dropdown: a trigger button and a pan
Installing `select` automatically installs the shared `remocn-ui` core (`lib/remocn-ui/`), the `button` primitive, and the `select-item` atom via `registryDependencies` (`["remocn-ui", "button", "select-item"]`). You do not need to install them separately. The trigger reuses the Button `outline` variant, and the panel renders a column of SelectItem rows.
</Note>
+## Example
+
+<LiveExample name="select-example" />
+
## States
`SelectState` is:
@@ -108,12 +112,6 @@ Preview a single SelectItem:
When you install `select`, the `select-item` atom is automatically pulled in via `registryDependencies` — no separate install needed. The `Select` container derives each row's state from the `selectedIndex`, `highlightedIndex`, and `pressedIndex` props, or you can override a row's visual with `itemStyles`.
-## Full lifecycle
-
-The live example composes **Button as the trigger**: a Button animates through `hover` → `press` states (the "click"), the select panel opens right after the press lands, and rows animate through hover → press → selected as the user picks an option. Copy the code to drop it into your own composition.
-
-<LiveExample name="select-example" />
-
## Props
<PropsTable
diff --git a/content/docs/ui/components/sheet.mdx b/content/docs/ui/components/sheet.mdx
index 69288cd1..b9108337 100644
--- a/content/docs/ui/components/sheet.mdx
+++ b/content/docs/ui/components/sheet.mdx
@@ -15,6 +15,10 @@ A state atom whose appearance (closed, opened) is a pure function of the `state`
Installing `sheet` automatically installs the shared `remocn-ui` core (`lib/remocn-ui/`) via `registryDependencies` (`["remocn-ui"]`). You do not need to install it separately. If you want to pair Sheet with the Button as its trigger in the canonical lifecycle example, install `button` separately.
</Note>
+## Example
+
+<LiveExample name="sheet-example" />
+
## States
`SheetState` is:
@@ -79,12 +83,6 @@ The `duration` field on each step overrides the file's `DEFAULT_DURATION` (= `12
`style` takes precedence over `state` when both are provided.
-## Full lifecycle
-
-The live example composes **Button as the trigger**: a primary Button animates through `hover` → `press` states (the "click"), and the sheet slides in right after the press lands, then closes near the end. Copy the code to drop it into your own composition.
-
-<LiveExample name="sheet-example" />
-
## Props
<PropsTable
diff --git a/content/docs/ui/components/switch.mdx b/content/docs/ui/components/switch.mdx
index 67a335ad..00b17085 100644
--- a/content/docs/ui/components/switch.mdx
+++ b/content/docs/ui/components/switch.mdx
@@ -15,6 +15,10 @@ A state atom whose appearance (checked, unchecked) is a pure function of the `st
Installing `switch` automatically installs the shared `remocn-ui` core (`lib/remocn-ui/`) via `registryDependencies`. You do not need to install it separately.
</Note>
+## Example
+
+<LiveExample name="switch-example" />
+
## States
`SwitchState` is:
@@ -79,12 +83,6 @@ The `duration` field on each step overrides the file's `DEFAULT_DURATION` for th
`style` takes precedence over `state` when both are provided.
-## Full lifecycle
-
-A complete unchecked → checked → unchecked run using the smooth transition path. Copy the code to drop it into your own composition.
-
-<LiveExample name="switch-example" />
-
## Props
<PropsTable
diff --git a/content/docs/ui/components/tabs.mdx b/content/docs/ui/components/tabs.mdx
index df0e10ba..359eff71 100644
--- a/content/docs/ui/components/tabs.mdx
+++ b/content/docs/ui/components/tabs.mdx
@@ -15,6 +15,10 @@ A state atom whose appearance (which tab is active) is a pure function of the `s
Installing `tabs` automatically installs the shared `remocn-ui` core (`lib/remocn-ui/`) via `registryDependencies`. You do not need to install it separately.
</Note>
+## Example
+
+<LiveExample name="tabs-example" />
+
## States
`TabsState` is:
@@ -79,12 +83,6 @@ The `duration` field on each step overrides the file's `DEFAULT_DURATION` for th
`style` takes precedence over `state` when both are provided.
-## Full lifecycle
-
-A complete Account → Password → Settings run using the smooth transition path. Copy the code to drop it into your own composition.
-
-<LiveExample name="tabs-example" />
-
## Props
<PropsTable
diff --git a/registry/remocn-ui/accordion/index.tsx b/registry/remocn-ui/accordion/index.tsx
index 1d6c1570..04157244 100644
--- a/registry/remocn-ui/accordion/index.tsx
+++ b/registry/remocn-ui/accordion/index.tsx
@@ -174,7 +174,7 @@ export function Accordion({
border: ctx.bordered
? `1px solid ${ctx.border}`
: "1px solid transparent",
- borderRadius: theme.radius + 6,
+ borderRadius: theme.radius,
overflow: "hidden",
}}
>
diff --git a/registry/remocn-ui/core/theme.ts b/registry/remocn-ui/core/theme.ts
index 4114286c..6de4bca2 100644
--- a/registry/remocn-ui/core/theme.ts
+++ b/registry/remocn-ui/core/theme.ts
@@ -32,6 +32,7 @@ export interface RemocnTheme {
radius: number;
}
+
/** Stock shadcn "neutral" light theme (oklch tokens). */
export const defaultLightTheme: RemocnTheme = {
background: "oklch(1 0 0)",
@@ -54,7 +55,7 @@ export const defaultLightTheme: RemocnTheme = {
input: "oklch(0.922 0 0)",
ring: "oklch(0.708 0 0)",
radius: 10,
-};
+}
/** Stock shadcn "neutral" dark theme (oklch tokens). */
export const defaultDarkTheme: RemocnTheme = {
diff --git a/registry/remocn-ui/dropdown-menu-item/index.tsx b/registry/remocn-ui/dropdown-menu-item/index.tsx
index 221cc405..9008e123 100644
--- a/registry/remocn-ui/dropdown-menu-item/index.tsx
+++ b/registry/remocn-ui/dropdown-menu-item/index.tsx
@@ -101,7 +101,7 @@ export function DropdownMenuItemRow({
alignItems: "center",
width,
padding: "8px 12px",
- borderRadius: theme.radius - 2,
+ borderRadius: theme.radius,
background: v.background,
color: v.labelColor,
transform: `scale(${v.scale})`,
diff --git a/registry/remocn-ui/select-item/index.tsx b/registry/remocn-ui/select-item/index.tsx
index 1555ae32..5d129f34 100644
--- a/registry/remocn-ui/select-item/index.tsx
+++ b/registry/remocn-ui/select-item/index.tsx
@@ -219,7 +219,7 @@ export function SelectItem({
ctx={ctx}
label={label}
width={width}
- radius={theme.radius - 2}
+ radius={theme.radius}
check={ctx.check}
/>
</div>
diff --git a/registry/remocn-ui/select/index.tsx b/registry/remocn-ui/select/index.tsx
index 5ba8e368..16c31951 100644
--- a/registry/remocn-ui/select/index.tsx
+++ b/registry/remocn-ui/select/index.tsx
@@ -163,8 +163,8 @@ export function Select({
// The trigger reuses the Button `outline` visual. Defaults to the resting
// `idle` look; the caller can pass a tweened `triggerStyle` (from
// `useButtonTransition`) so the trigger shows the hover/press "click".
- const trigger: ButtonStyle = triggerStyle ?? buttonStyle("idle", ctx.triggerCtx);
- const itemRadius = theme.radius - 2;
+ const trigger: ButtonStyle =
+ triggerStyle ?? buttonStyle("idle", ctx.triggerCtx);
return (
<div
@@ -259,7 +259,7 @@ export function Select({
ctx={ctx.itemCtx}
label={item}
width={WIDTH - 8}
- radius={itemRadius}
+ radius={theme.radius}
check={ctx.itemCtx.check}
/>
);