
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
@libs-ui/components-buttons-select-color
Advanced tools
select-color là một component nút kết hợp bộ chọn màu (Color Picker) cho Angular. Cho phép người dùng chọn màu sắc từ popover, hỗ trợ cấu hình tùy chỉnh, áp dụng ngay hoặc chờ xác nhận, và tùy chỉnh hiển thị nút.
customOptions cho Color PickerapplyNow: tự động emit khi chọn màu nếu trueexternalContent: sử dụng nội dung bên ngoài làm triggerdirection và zIndex của popoveroutColorChange và outColorChangeMultipleType khi màu thay đổiĐể cài đặt component select-color, sử dụng npm hoặc yarn:
npm install @libs-ui/components-buttons-select-color
hoặc
yarn add @libs-ui/components-buttons-select-color
import { Component } from '@angular/core';
import { LibsUiComponentsButtonsSelectColorComponent } from '@libs-ui/components-buttons-select-color';
@Component({
selector: 'app-example',
standalone: true,
imports: [LibsUiComponentsButtonsSelectColorComponent],
template: `
<libs_ui-components-buttons-select_color
[button]="{ label: 'Chọn màu', type: 'button-primary' }"
[customOptions]="{ /* cấu hình picker */ }"
[applyNow]="false"
(outColorChange)="onColorChange($event)"></libs_ui-components-buttons-select_color>
`,
})
export class ExampleComponent {
onColorChange(color: string) {
console.log('Màu đã chọn:', color);
}
}
<!-- example.component.html -->
<libs_ui-components-buttons-select_color
[button]="{ label: 'Chọn màu', classIconLeft: 'text-red-500', type: 'button-outline' }"
[direction]="'top'"
[externalContent]="false"
[zIndex]="1500"
(outColorChangeMultipleType)="onMultiColorChange($event)"></libs_ui-components-buttons-select_color>
// example.component.ts
import { Component } from '@angular/core';
import { LibsUiComponentsButtonsSelectColorComponent } from '@libs-ui/components-buttons-select-color';
@Component({
selector: 'app-example',
standalone: true,
imports: [LibsUiComponentsButtonsSelectColorComponent],
templateUrl: './example.component.html',
})
export class ExampleComponent {}
| Tên | Kiểu dữ liệu | Mặc định | Mô tả |
|---|---|---|---|
| button | IButton | - | Cấu hình trigger button (label, icon, class, popover, ...). |
| customOptions | IPickerCustomOptions | - | Tùy chọn cấu hình cho Color Picker. |
| applyNow | boolean | false | Nếu true, emit outColorChange ngay khi chọn màu. |
| externalContent | boolean | false | Sử dụng nội dung bên ngoài làm trigger. |
| direction | TYPE_POPOVER_DIRECTION | 'bottom' | Hướng hiển thị của popover. |
| zIndex | number | 1200 | Z-index của popover. |
| Tên | Kiểu dữ liệu | Mô tả |
|---|---|---|
| outColorChange | string | Sự kiện emit màu khi chọn (dạng hex). |
| outColorChangeMultipleType | IOutputColorChangeMultipleType | Sự kiện emit nhiều định dạng màu khác nhau. |
export interface IPickerCustomOptions {
slBarSize?: number[];
hueBarSize?: number[];
alphaBarSize?: number[];
showHsl?: boolean;
showRgb?: boolean;
showHex?: boolean;
showAlpha?: boolean;
color?: string | number[];
format?: 'rgb' | 'rgba' | 'hsl' | 'hsla' | 'hex' | 'color';
}
Mô tả: Tùy chọn cấu hình cho Color Picker.
export interface IOutputColorChangeMultipleType {
rgba: string;
rgb: string;
hex: string;
hsl: string;
hsla: string;
}
Mô tả: Đối tượng chứa nhiều định dạng giá trị màu khi chọn.
FAQs
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.