coss.com Svelte

Frame

A framed container for grouping related information.

Loading p-frame-1 preview…

Installation

pnpm dlx shadcn-svelte@latest add https://coss-sv.vercel.app/r/frame.json

Usage

<script lang="ts">
  import * as Frame from "$lib/components/ui/frame/index.js";
</script>

<Frame.Root>
  <Frame.Header>
    <Frame.Title>Title</Frame.Title>
    <Frame.Description>Description</Frame.Description>
  </Frame.Header>
  <Frame.Panel>Content</Frame.Panel>
  <Frame.Footer>Footer</Frame.Footer>
</Frame.Root>

API Reference

Frame.Root

The main container component for grouping related information.

PropTypeDefault
classstring

Frame.Panel

A panel container for frame content.

PropTypeDefault
classstring
<Frame.Panel>Content</Frame.Panel>

Frame.Header

Header section for the frame.

PropTypeDefault
classstring
<Frame.Header>
  <Frame.Title>Title</Frame.Title>
  <Frame.Description>Description</Frame.Description>
</Frame.Header>

Frame.Title

Title text for the frame header.

PropTypeDefault
classstring
<Frame.Title>Title</Frame.Title>

Frame.Description

Description text for the frame header.

PropTypeDefault
classstring
<Frame.Description>Description</Frame.Description>

Footer section for the frame.

PropTypeDefault
classstring
<Frame.Footer>Footer</Frame.Footer>

Examples

Separated Panels

By default, multiple panels are separated with spacing between them.

Loading p-frame-3 preview…