
Kiri Dome Task Lamp
Spun aluminum dome lamp with a weighted travertine plinth and stepless 2700K touch dimmer.
Locks media, maps, and artwork frames to design-token aspect ratios with rounded clipping.
123456789import { AspectRatio } from "#components/ui/ui-sdk/aspect-ratio.tsx";
export function Example() { return ( <AspectRatio ratio="wide" rounded="lg"> <img src="/cover.jpg" alt="Studio preview" /> </AspectRatio> );}Token-backed square (1:1), landscape (4:3), and portrait (3:4) frames.
1npx stylexblocks add aspect-ratio12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061import * as stylex from "@stylexjs/stylex";import { createComponent } from "#lib/ui-sdk/create-component.tsx";import { defineRecipe } from "#lib/recipe-props.ts";import { aspectRatios } from "@stylexblocks/ui/tokens/aspect-ratios.stylex.ts";import { radii } from "@stylexblocks/ui/tokens/radii.stylex.ts";
const aspectRatioStyles = stylex.create({ base: { position: "relative", width: "100%", overflow: "hidden", display: "flex", alignItems: "center", justifyContent: "center", },});
const aspectRatioValues = stylex.create({ square: { aspectRatio: aspectRatios.square }, landscape: { aspectRatio: aspectRatios.landscape }, portrait: { aspectRatio: aspectRatios.portrait }, wide: { aspectRatio: aspectRatios.wide }, ultrawide: { aspectRatio: aspectRatios.ultrawide }, golden: { aspectRatio: aspectRatios.golden }, "1/1": { aspectRatio: aspectRatios.square }, "4/3": { aspectRatio: aspectRatios.landscape }, "3/4": { aspectRatio: aspectRatios.portrait }, "16/9": { aspectRatio: aspectRatios.wide }, "21/9": { aspectRatio: "21 / 9" }, "3/2": { aspectRatio: "3 / 2" }, "4/5": { aspectRatio: "4 / 5" },});
const aspectRatioRadii = stylex.create({ none: { borderRadius: 0 }, sm: { borderRadius: radii.sm }, md: { borderRadius: radii.md }, lg: { borderRadius: radii.lg }, full: { borderRadius: radii.full },});
const aspectRatioRecipe = defineRecipe({ styles: aspectRatioStyles, axes: { ratio: aspectRatioValues, rounded: aspectRatioRadii, }, defaultVariants: { ratio: "wide", rounded: "md", },});
/** * AspectRatio — locks media, maps, and artwork frames to a design-token * aspect ratio (`square`, `landscape`, `portrait`, `wide`, `ultrawide`, * `golden`, `3/2`, `4/5`). Composition via `render`. */export const AspectRatio = createComponent("div", aspectRatioRecipe, "AspectRatio");export type AspectRatioProps = React.ComponentProps<typeof AspectRatio>;
Installable blocks built with Aspect Ratio — real use cases, delivered as source you own.
Searchable, categorized pattern and starter-kit library with category toggles, saved bookmarks, a sort menu, grouped responsive card sections, and an interactive detail preview dialog.
Centered marketing hero pairing an eyebrow badge, balanced display headline, supporting copy, dual call-to-action buttons, and a wide 16:9 architectural showcase frame.
Centered editorial gallery pairing category filter tabs, a responsive 3:2 architectural photography grid, and a keyboard-navigable lightbox dialog with camera metadata.
Interactive course overview page featuring breadcrumb navigation, tabbed Syllabus, Outcomes, Instructor, and Reviews views, a checkable 4-module curriculum accordion synced to live progress bars, and a sticky enrollment rail with a photographic course cover, self-paced vs. cohort planning, and toast feedback.
Centered marketing hero pairing an eyebrow badge, balanced display headline, editorial copy, dual call-to-action buttons, and a responsive three-column 4:5 architectural and ceramics gallery.
Two-column storefront product detail layout pairing a multi-angle interactive photo gallery with a sticky buy box, live anodized finish swatches, color-temperature edition controls, quantity stepper, collapsible specifications accordion, and filterable customer reviews.
Editorial storefront product gallery pairing a two-column collection header, segmented category filter, live bag counter with toast feedback, selectable finish swatches, edition badges, and a responsive 1:1 studio product grid.
Editorial architectural monograph pairing a sticky left-hand project narrative, metadata list, metrics, and actions beside a vertical scrolling plate stack with a keyboard-navigable lightbox dialog.