![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.
@divetool/coral
Advanced tools
The Coral's web components are built using StencilJS. Read more about it in the StencilJS website.
Read the full docs at https://divetool.github.io/coral
You can start using Coral's web components via 2 methods.
Install the @divetool/coral
package
npm install @divetool/coral
Define Coral components to be used as web-components in your HTML
import { defineCustomElements, applyPolyfills } from '@divetool/coral/loader';
// Define all Coral custom elements
defineCustomElements();
// Or if you need pollyfills to work with custom elements:
applyPolyfills().then(() => {
defineCustomElements();
});
You can also define a single component:
import { defineCustomElement as defineCrlButton } from '@divetool/coral/dist/components/crl-button';
// Define CrlButton component
defineCrlButton();
In your HTML:
<html>
<body>
<crl-button>Click me</crl-button>
</body>
</html>
You can load Coral web components in a website/application by adding the following script tag:
<script
type="module"
src="https://unpkg.com/@divetool/coral/dist/coral/coral.esm.js"
defer
></script>
<script
type="module"
src="https://cdn.jsdelivr.net/npm/@divetool/coral/dist/coral/coral.esm.js"
defer
></script>
Your HTML will look similar to this
<html>
<head>
<script
type="module"
src="https://unpkg.com/@divetool/coral/dist/coral/coral.esm.js"
defer
></script>
</head>
<body>
<crl-button>Click me</crl-button>
</body>
</html>
Alternatively, if you wanted to take advantage of ES Modules, you could include the components using an import statement:
<html>
<head>
<script type="module">
import { defineCustomElements } from 'https://unpkg.com/@divetool/coral/loader/index.js';
defineCustomElements();
</script>
</head>
<body>
<crl-button>Click me</crl-button>
</body>
</html>
This project is licensed under the MIT License.
See LICENSE for more information.
FAQs
Web components for the Coral Design System 🪸
The npm package @divetool/coral receives a total of 5 weekly downloads. As such, @divetool/coral popularity was classified as not popular.
We found that @divetool/coral demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.