zebflow 0.11.14

Reactive web automation platform — pipelines, templates, and real-time collaboration in a single binary.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/**
 * AspectRatio — shadcn/ui's aspect-ratio box, on Zebflow's engine.
 *
 * No Radix: a plain `<div>` sets the CSS `aspect-ratio` property inline
 * (a computed value from the `ratio` prop, not a class) and lets content
 * fill it — the same effect Radix's primitive achieves.
 */

export function AspectRatio({ ratio = 1, style, children, ...rest }) {
  return (
    <div data-slot="aspect-ratio" style={{ position: "relative", width: "100%", aspectRatio: String(ratio), ...style }} {...rest}>
      {children}
    </div>
  );
}

export default AspectRatio;