You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then you can modify the CSS classes in `resources/css/vendor/flowforge/flowforge.css`.
202
+
203
+
To customize column colors, you can use one of the following methods:
204
+
205
+
### Method 1: Using DefaultKanbanAdapter
206
+
207
+
```php
208
+
use Relaticle\Flowforge\Adapters\DefaultKanbanAdapter;
209
+
210
+
// With custom colors
211
+
$adapter = new DefaultKanbanAdapter(
212
+
Task::class,
213
+
'status',
214
+
[
215
+
'todo' => 'To Do',
216
+
'in_progress' => 'In Progress',
217
+
'in_review' => 'In Review',
218
+
'done' => 'Done',
219
+
],
220
+
'title',
221
+
'description',
222
+
[], // card attributes
223
+
[
224
+
'todo' => 'blue',
225
+
'in_progress' => 'yellow',
226
+
'in_review' => 'purple',
227
+
'done' => 'green',
228
+
]
229
+
);
230
+
```
231
+
232
+
### Method 2: Custom Adapter Implementation
233
+
234
+
If you're creating a custom adapter, implement the `getStatusColors()` method:
235
+
236
+
```php
237
+
public function getStatusColors(): ?array
238
+
{
239
+
return [
240
+
'todo' => 'indigo',
241
+
'in_progress' => 'amber',
242
+
'in_review' => 'violet',
243
+
'done' => 'emerald',
244
+
];
245
+
}
246
+
```
247
+
248
+
### Method 3: Model-based Configuration
249
+
250
+
Define a `kanbanStatusColors` method in your model:
251
+
252
+
```php
253
+
/**
254
+
* Get the status colors for the Kanban board.
255
+
*
256
+
* @return array<string,string>
257
+
*/
258
+
public function kanbanStatusColors(): array
259
+
{
260
+
return [
261
+
'todo' => 'blue',
262
+
'in_progress' => 'yellow',
263
+
'in_review' => 'purple',
264
+
'done' => 'green',
265
+
];
266
+
}
267
+
```
268
+
269
+
### Method 4: Filament Resource Page
270
+
271
+
Set the colors directly in your Filament page:
272
+
273
+
```php
274
+
public function mount(): void
275
+
{
276
+
parent::mount();
277
+
278
+
$this->statusField('status')
279
+
->statusValues(Task::getStatusOptions())
280
+
->statusColors([
281
+
'todo' => 'blue',
282
+
'in_progress' => 'yellow',
283
+
'in_review' => 'purple',
284
+
'done' => 'green',
285
+
])
286
+
->titleAttribute('title')
287
+
->descriptionAttribute('description');
288
+
}
289
+
```
290
+
291
+
If a status doesn't have a color defined, it will use the default styling.
292
+
293
+
### Customizing Column Status Badges
294
+
295
+
Flowforge allows you to customize the colors of the count badges in your Kanban board columns. These are the small rounded indicators that show the number of cards in each column. You can choose from a predefined set of Tailwind colors:
296
+
297
+
- default
298
+
- slate
299
+
- gray
300
+
- zinc
301
+
- neutral
302
+
- stone
303
+
- red
304
+
- orange
305
+
- amber
306
+
- yellow
307
+
- lime
308
+
- green
309
+
- emerald
310
+
- teal
311
+
- cyan
312
+
- sky
313
+
- blue
314
+
- indigo
315
+
- violet
316
+
- purple
317
+
- fuchsia
318
+
- pink
319
+
- rose
320
+
321
+
The badge colors are defined in the CSS file and can be easily customized by publishing the assets:
0 commit comments