Valyro English version

Gradient Mixer

Цветовые точки на холсте и экспорт многослойного CSS-градиента. Бесплатно, MIT · Интерактивные блоки › Мини-редакторы и расчёты

Установка

npx valyro-cli@latest add gradient-mixer
npx shadcn@latest add https://valyro.xyz/r/gradient-mixer.json
npm install valyro-ui

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

Пропсы

PropTypeDefault
valueGradientValueThe composition: a base colour and radial layers, the first one on top.
defaultValueGradientValueDEFAULT_GRADIENTInitial composition when uncontrolled. Default: three colour points on a dark base.
onValueChange(value: GradientValue) => voidCalled with the whole new composition after each change (a drag reports once, when it ends).
maxPointsnumber8Most layers. Default 8.
historyLimitnumber50Most undoable actions. Default 50.
showControlsbooleantruePanel with the layer list and exact fields. Default true.
showExportbooleantrueThe CSS code and its copy button. Default true.
onExport(css: string) => voidCalled with the CSS when it is copied.
aspectRationumber | string'16 / 9'Proportions of the canvas. Default 16 / 9.
colorPickerLabelsPartial<ColorPickerPopoverLabels>Texts of the colour pickers inside the editor.
labelsPartial<GradientMixerLabels>Overrides for the built-in English text; keys left out keep their defaults.

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

  • Pixel Painter — Рисование на пиксельной сетке и экспорт PNG
  • Crafting Recipe — Карточка рецепта: сборки, расход ингредиентов и нехватка
  • Feature Hotspots — Точки на изображении: нажатие открывает пояснение к детали
  • Exploded Layers — Подготовленные слои изображения раздвигаются с подписями
  • Prediction Card — Сначала предположение читателя, затем ответ и разбор
  • Detail Dial — Выбор глубины объяснения: кратко, подробно, полный разбор
  • Version Scrubber — Просмотр подготовленных версий одним ползунком
  • Page Minimap — Мини-карта длинной страницы с видимой областью
  • Peel Sticker — Наклейка отклеивается за угол и открывает содержимое
  • Scratch Reveal — Стираемое покрытие над текстом или картинкой
  • Tear-off Ticket — Билет с корешком, который отрывается по перфорации
  • Split-Flap Board — Механическое табло: перелистываются только изменившиеся символы

Назад: Priority Budget · Далее: Pixel Painter · Весь раздел «Интерактивные блоки»