skip section navigation

Contact

Contact links to a social profile with its icon. the icon wrapper supplies the link’s accessible name, and the destination opens in a new tab.

usage

GithubContactIcon.svelte is the small wrapper used by this example. keep the icon decorative; the wrapper names the link.

GithubContact.svelte
<script>
	import { Contact } from '@ciabi/loafkit-ui';
	import GithubContactIcon from './GithubContactIcon.svelte';
</script>

<Contact Icon={GithubContactIcon} href="https://github.com/ciabi/loafkit" />
GithubContactIcon.svelte
<script>
	import GithubIcon from '@iconify-svelte/hugeicons/github';
	let { style = '' } = $props();
</script>

<span role="img" aria-label="GitHub" {style}>
	<GithubIcon aria-hidden="true" width="20" height="20" />
</span>

API reference

Contact

Component
Icon

the icon component rendered inside the link.

href

destination opened in a new tab.

class
Default: ''

extra classes on the component root.

style

inline styles on the component root.