ValyroUI English version

Aspect Ratio Picker

Соотношение сторон и точный размер. Pro · Изображения и генерация › Промпт и параметры

Установка

npx valyro-cli@latest login
npx valyro-cli@latest add aspect-ratio-picker
npm install valyro-ui-pro

import 'valyro-ui-pro/styles.css';
import { AspectRatioPicker } from 'valyro-ui-pro';

Пропсы

PropTypeDefault
valueImageSizeControlled value; use with onValueChange.
defaultValueImageSizeInitial value when uncontrolled.
onValueChange(size: ImageSize) => voidCalled with the new value when it changes.
ratiosreadonly AspectRatio[]DEFAULT_ASPECT_RATIOSRatio tiles. Default 1:1, 4:3, 3:2, 16:9, 21:9, 3:4, 2:3, 9:16.
baseSizenumber1024A tile maps to about baseSize² pixels: 1024 for SDXL / Flux, 512 for SD 1.5. Default 1024.
multiplenumberSizes snap to this multiple (8 for latent space, 64 for most models).
defaultMultiplenumber64Initial multiple when uncontrolled.
onMultipleChange(multiple: number) => voidCalled with the new multiple when it changes.
multiplesreadonly number[][8, 64]Choices for the snap toggle; one value hides it. Default [8, 64].
minnumber256Smallest width or height, px; tiles and typed sizes are clamped to it.
maxnumber2048Largest width or height, px; tiles and typed sizes are clamped to it.
custombooleantrueWidth × height fields with ratio lock and swap. Default true.
size'sm' | 'md''md'Ratio tile size and spacing.
fieldSize'sm' | 'md'sizeHeight of the width × height fields: sm is 32 px, to match other small controls in a sidebar. Defaults to size.
disabledbooleanfalseDisables the tiles, size fields, lock, swap and snap toggle.
localestringBCP 47 locale for numbers and dates; defaults to the ThemeProvider's, then the browser's.
labelsPartial<AspectRatioPickerLabels>Overrides for the built-in English text; keys left out keep their defaults.

Похожие компоненты

  • Prompt Editor — Промпт и негатив: веса, LoRA, автодополнение, токены
  • Generation Settings — Модель, сэмплер, шаги, CFG, размер, пресеты
  • Seed Input — Сид: случайный, фиксированный, инкремент
  • LoRA Stack — Стек LoRA: силы, переключатели, порядок, триггеры
  • Style Presets — Карточки стилей с превью и весами
  • Reference Image Input — Референс для img2img и ControlNet
  • Generation Progress — Шаги, ETA, живое латентное превью, очередь
  • Image Result Grid — Галерея результатов, действия и лайтбокс
  • Image Compare — Сравнение до/после: шторка, рядом, наложение
  • Inpaint Canvas — Маска для инпейнтинга и расширение холста
  • Generation History — История генераций по дням с фильтрами
  • Image Adjustments — Цветокоррекция: загрузка, вписывание и семь ползунков с фильтром

Назад: Generation Settings · Далее: Seed Input · Весь раздел «Изображения и генерация»