Skip to content
Chat & AI

Web Preview

Sandboxed iframe preview with URL chrome and a console.

Import

tsx
import { WebPreview } from "@cronus-ui/ui";
bash
npx cronus-ui add web-preview

Examples

.cronus

No audit fixture declares this family in .cronus yet.

React onlyParity: Not portedParity scoreboard

API Reference

Generated from the component's exported types.

WebPreviewLabels

Skip WebPreviewLabels props table
PropTypeDefaultDescription
urlPlaceholder*
string——
preview*
string——
console*
string——
consoleEmpty*
string——

WebPreviewProps

Extends HTMLAttributes<HTMLDivElement>

Skip WebPreviewProps props table
PropTypeDefaultDescription
ref
Ref<HTMLDivElement>—Ref forwarded to the underlying DOM node.
defaultUrl
string""—
onUrlChange
(url: string) => void——
labels
Partial<WebPreviewLabels>—Override default English strings.
className
string—Additional class names merged onto the root.
children
ReactNode—Contents of the component.
id
string—DOM id of the root element.

WebPreviewNavigationProps

Extends HTMLAttributes<HTMLDivElement>

Skip WebPreviewNavigationProps props table
PropTypeDefaultDescription
ref
Ref<HTMLDivElement>—Ref forwarded to the underlying DOM node.
className
string—Additional class names merged onto the root.
children
ReactNode—Contents of the component.
id
string—DOM id of the root element.

WebPreviewNavigationButtonProps

Extends ButtonProps

Skip WebPreviewNavigationButtonProps props table
PropTypeDefaultDescription
tooltip
string——
variant
string—Visual variant.
size
string—Control size.
asChild
boolean—Render as the child element via Slot.
disabled
boolean—Disables pointer and keyboard interaction.
type
string—Native type of the underlying element.
children
ReactNode—Contents of the component.
className
string—Additional class names merged onto the root.

WebPreviewUrlProps

Extends InputProps

Skip WebPreviewUrlProps props table
PropTypeDefaultDescription
value
string—Controlled value.
defaultValue
string—Uncontrolled initial value.
onChange
(event: ChangeEvent<HTMLInputElement>) => void—Called when the value changes.
placeholder
string—Placeholder shown when the value is empty.
disabled
boolean—Disables pointer and keyboard interaction.
name
string—Submitted name when used in a form.
required
boolean—Marks the control as required.
className
string—Additional class names merged onto the root.

WebPreviewBodyProps

Extends ComponentProps<"iframe">

Skip WebPreviewBodyProps props table
PropTypeDefaultDescription
ref
Ref<HTMLIFrameElement>—Ref forwarded to the underlying DOM node.
loading
ReactNode——

WebPreviewConsoleProps

Extends HTMLAttributes<HTMLDivElement>

Skip WebPreviewConsoleProps props table
PropTypeDefaultDescription
ref
Ref<HTMLDivElement>—Ref forwarded to the underlying DOM node.
logs
WebPreviewConsoleLog[][]—
className
string—Additional class names merged onto the root.
children
ReactNode—Contents of the component.
id
string—DOM id of the root element.