![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@fluentui/react-swatch-picker
Advanced tools
React Swatch Picker components for Fluent UI React
The SwatchPicker is used in graphic and text editors. It allows user to choose a needed color, image or pattern. The SwatchPicker can be integrated within a popover or used as a standalone feature.
To import React SwatchPicker components:
import { SwatchPicker, ColorSwatch, SwatchPickerOnSelectEventHandler } from '@fluentui/react-components';
Simple example of SwatchPicker Usage:
import { SwatchPicker, ColorSwatch, SwatchPickerOnSelectEventHandler } from '@fluentui/react-components';
export const App = () => {
const [selectedValue, setSelectedValue] = React.useState('00B053');
const [selectedColor, setSelectedColor] = React.useState('#00B053');
const handleSelect: SwatchPickerOnSelectEventHandler = (_, data) => {
setSelectedValue(data.selectedValue);
setSelectedColor(data.selectedColor);
};
return (
<>
<SwatchPicker aria-label="SwatchPicker default" selectedValue={selectedValue} onSelectionChange={handleSelect}>
<ColorSwatch color="#FF1921" value="FF1921" aria-label="red" />
<ColorSwatch color="#FFC12E" value="FFC12E" aria-label="orange" />
<ColorSwatch color="#FEFF37" value="FEFF37" aria-label="yellow" />
<ColorSwatch disabled color="#90D057" value="90D057" aria-label="light green" />
<ColorSwatch color="#00B053" value="00B053" aria-label="green" />
<ColorSwatch color="#00AFED" value="00AFED" aria-label="light blue" />
<ColorSwatch color="#006EBD" value="006EBD" aria-label="blue" />
<ColorSwatch color="#011F5E" value="011F5E" aria-label="dark blue" />
<ColorSwatch color="#712F9E" value="712F9E" aria-label="purple" />
</SwatchPicker>
<div
style={{
backgroundColor: selectedColor,
}}
/>
</>
);
};
See the Spec.md file for background information on the design/engineering decisions of the component.
For information about the components, please refer to the API documentation.
FAQs
New fluentui react package
The npm package @fluentui/react-swatch-picker receives a total of 48,822 weekly downloads. As such, @fluentui/react-swatch-picker popularity was classified as popular.
We found that @fluentui/react-swatch-picker demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 12 open source maintainers collaborating on the project.
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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.