Having trouble getting help?
Contact Support
Contact Support
Render palette alone in Angular Color picker component
27 Apr 20241 minute to read
To render the Palette
alone in ColorPicker, specify the mode
property as Palette
, and set the modeSwitcher
property to false
.
In the following sample, the showButtons
property is disabled to hide the control buttons and it renders only the Palette
area.
import { NgModule } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'
import { FormsModule } from '@angular/forms'
import { ColorPickerModule } from '@syncfusion/ej2-angular-inputs'
import { enableRipple } from '@syncfusion/ej2-base'
import { Component } from '@angular/core';
@Component({
imports: [
FormsModule, ColorPickerModule
],
standalone: true,
selector: 'app-root',
template: `<div class="e-section-control">
<h4>Select Color</h4>
<!-- To render Picker. -->
<ejs-input ejs-colorpicker type="color" id="element" mode="Palette" [modeSwitcher]="false" [showButtons]="false" /></div>`
})
export class AppComponent { }
import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import 'zone.js';
bootstrapApplication(AppComponent).catch((err) => console.error(err));
To render
Picker
alone specify themode
property as ‘Picker’.