Web components clip-flag
This package provides a web component to display a clip flag.
``bash`
npm install @outbook/webcomponents-clip-flag
`javascript
import { html } from 'lit';
import { ClipFlag } from '@outbook/webcomponents-clip-flag';
function render() {
return html
${ClipFlag({
code: 'es'
})}
;`
}
You can also use the custom element directly in your HTML. Remember to import the component's JavaScript for the custom element to be defined.
`javascript`
import '@outbook/webcomponents-clip-flag';
`html`
This is the underlying web component. It can be used directly in HTML or in any framework.
| Attribute | Property | Type | Default | Description |
|----------------|----------------|-----------|-------------|-------------------------------------|
| code | code | String | '' | The country code for flag. |extraClasses
| | extraClasses | String | undefined` | Classes to add to the host element. |
This component uses Shadow DOM, and its styles are self-contained. The component's styles are automatically applied and encapsulated, so there is no need to import any additional stylesheets.
This component is licensed under the Apache-2.0 License.
Flags are provided by country-flag-icons under MIT license.