Askr documentation
Generated API snapshot

@askrjs/themes/aspect-ratio

Exports from the declarations published in @askrjs/themes. Signatures reflect the published artifact.

Exports

This entrypoint publishes 3 exports. Use the anchored symbol rows for direct links. Type-only exports are labeled separately from runtime values.

AspectRatiotype

AspectRatio: { (props: AspectRatioProps): JSX.Element; (props: AspectRatioAsChildProps): JSX.Element; }

Constrains its content to a fixed width/height ratio (defaults to 1) using a computed aspect-ratio style, rendering as a <div> or, with asChild, merging its layout into the single child element.

AspectRatioAsChildPropstype

AspectRatioAsChildProps: AspectRatioOwnProps & {
  asChild: true;
  children: JSXElement;
  ref?: Ref<unknown>;
}

Props for {@link AspectRatio } rendered with asChild, merging layout onto a single child element.

asChild
asChild: true;
children
children: JSXElement;
ratio
ratio?: string | number | undefined;
ref
ref?: Ref<unknown>;
style
style?: unknown;

AspectRatioPropstype

AspectRatioProps: Omit<JSX.IntrinsicElements["div"], "children" | "ref"> & AspectRatioOwnProps & {
  asChild?: false;
  ref?: Ref<HTMLDivElement>;
}

Props for {@link AspectRatio } rendered as its default <div> element.

asChild
asChild?: false | undefined;
children
children?: unknown;
ratio
ratio?: string | number | undefined;
ref
ref?: Ref<HTMLDivElement>;
style
style?: unknown;