@outbook/webcomponents-clip-flag
v1.0.4
Published
Web components clip-flag
Readme
@outbook/webcomponents-clip-flag
This package provides a web component to display a clip flag.
Installation
npm install @outbook/webcomponents-clip-flagUsage
As a Lit Element
import {html} from 'lit';
import {ClipFlag} from '@outbook/webcomponents-clip-flag';
function render() {
return html`
${ClipFlag({
code: 'es'
})}
`;
}Direct HTML Usage
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.
import '@outbook/webcomponents-clip-flag';<outbook-clip-flag code="es"></outbook-clip-flag>Component: outbook-clip-flag
This is the underlying web component. It can be used directly in HTML or in any framework.
Properties
| Attribute | Property | Type | Default | Description |
|----------------|----------------|-----------|-------------|-------------------------------------|
| code | code | String | '' | The country code for flag. |
| extraClasses | extraClasses | String | undefined | Classes to add to the host element. |
Styling
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.
License
This component is licensed under the Apache-2.0 License.
Flags are provided by country-flag-icons under MIT license.
