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';
Пропсы
| Prop | Type | Default | |
|---|---|---|---|
value | GradientValue | The composition: a base colour and radial layers, the first one on top. | |
defaultValue | GradientValue | DEFAULT_GRADIENT | Initial composition when uncontrolled. Default: three colour points on a dark base. |
onValueChange | (value: GradientValue) => void | Called with the whole new composition after each change (a drag reports once, when it ends). | |
maxPoints | number | 8 | Most layers. Default 8. |
historyLimit | number | 50 | Most undoable actions. Default 50. |
showControls | boolean | true | Panel with the layer list and exact fields. Default true. |
showExport | boolean | true | The CSS code and its copy button. Default true. |
onExport | (css: string) => void | Called with the CSS when it is copied. | |
aspectRatio | number | string | '16 / 9' | Proportions of the canvas. Default 16 / 9. |
colorPickerLabels | Partial<ColorPickerPopoverLabels> | Texts of the colour pickers inside the editor. | |
labels | Partial<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 · Весь раздел «Интерактивные блоки»