image-cropper/image-cropper-root.svelte

ark · packages/svelte/src/lib/components/image-cropper/image-cropper-root.svelte · svelte · MIT
ui

Provides the core state and logic for an image cropping interface, allowing developers to build custom-styled cropper UI components.

<!--
  Source: https://github.com/chakra-ui/ark | License: MIT | Copyright 2024 Chakra Systems Inc
  Provided via justclaw.it.com; keep this notice with the code.
-->
<script module lang="ts">
  import type { Snippet } from 'svelte'
  import type { Assign, HTMLProps, PolymorphicProps, RefAttribute } from '$lib/types'
  import type { UseImageCropperProps } from './use-image-cropper.svelte.ts'

  export interface ImageCropperRootBaseProps extends UseImageCropperProps, PolymorphicProps<'div'>, RefAttribute {}
  export interface ImageCropperRootProps extends Assign<HTMLProps<'div'>, ImageCropperRootBaseProps> {
    children?: Snippet
  }
</script>

<script lang="ts">
  import { mergeProps } from '@zag-js/svelte'
  import { createSplitProps } from '../../utils/create-split-props.ts'
  import { 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key