Skip to content

Adding prop to modify the interior color of checkbox #1506

@ediazm

Description

@ediazm

Summary

The color inside the checkbox is sometimes difficult to distinguish if it is disabled or not, depending on the background color that users are using (https://flowbite-svelte.com/docs/components/table#Checkbox).

Having a prop boxColor: white | grey | orange

Would simplify not having to override it.

Basic example

We already have:
props: HTMLInputAttributes & {
color?: FormColorType;
custom?: boolean;
inline?: boolean;
group?: string[];
choices?: CheckboxItem[];
value?: string | number;
checked?: boolean;
spacing?: string;
groupLabelClass?: string;
groupInputClass?: string;
class?: string;
required?: boolean;
};

adding boxColor: string

to be able to modify the interior of the checkbox when it is not checked

Motivation

Currently the unchecked colors of the checkbox are difficult to distinguish if the the user background is similar to the default value. This would also improve the a11y quatlity of the checkbox

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions