Skip to content
loseta

Components / Surfaces

Card

Displays a card with header, content and footer.

Status stableWorks with button, field, input, label

Create project

Deploy your new project in one click.

Docs
<div class="card" style="max-width: 24rem">
  <header data-separator="bottom">
    <h3 data-slot="title">Create project</h3>
    <p data-slot="description">Deploy your new project in one click.</p>
    <a class="card-action" href="#">Docs</a>
  </header>
  <section>
    <div class="field">
      <label class="label" for="card-name">Name</label>
      <input class="input" id="card-name" placeholder="My project">
    </div>
  </section>
  <footer style="display: flex; justify-content: flex-end; gap: 0.5rem">
    <button class="btn" data-variant="outline">Cancel</button>
    <button class="btn">Create</button>
  </footer>
</div>

Installation

pnpm dlx loseta add card
npx loseta add card

Accessibility and behavior

  • Use data-slot="title", "description" and "action" for parts. data-separator="bottom" adds a header divider.

Files

components/card.cssbase
styles/nova/card.cssstyle

Install contract

The CLI writes the base file under components/, the visual file for the selected style under styles/<name>/, and any primitive dependency underprimitives/. The generated index.css imports them in the right layer order.

← Back to components

loseta is MIT licensed. Built with native CSS, no runtime. Inspired byshadcn/ui.