Skip to content
On this page

KCollapse

An abstract component, use it to wrap the component so that the component can only run on the client.

Install

bash
pnpm add @ikun-ui/client-only
pnpm add @ikun-ui/client-only
bash
yarn add @ikun-ui/client-only
yarn add @ikun-ui/client-only
bash
npm install @ikun-ui/client-only
npm install @ikun-ui/client-only

Basic usage

TIP

ClientOnly only applies to ·svelte kit`

html
<script>
	import { KClientOnly } from '@ikun-ui/client-only';
	import { KTooltip } from '@ikun-ui/tooltip';
</script>
<KClientOnly>
	<KTooltip content="KTooltip content">
		<p>KTooltip trigger dom</p>
	</KTooltip>
</KClientOnly>
<script>
	import { KClientOnly } from '@ikun-ui/client-only';
	import { KTooltip } from '@ikun-ui/tooltip';
</script>
<KClientOnly>
	<KTooltip content="KTooltip content">
		<p>KTooltip trigger dom</p>
	</KTooltip>
</KClientOnly>

ClientOnly Slots

NameDescription
defaultComponents that only run on the client side

MIT Licensed