### Install Puppertino via NPM Source: https://github.com/codedgar/puppertino/blob/master/README.md Install Puppertino using NPM. The recommended method is directly from the GitHub repository. ```bash # Via NPM (recommended) npm install @codedgar/puppertino@github:codedgar/Puppertino # Or install from a specific branch npm install @codedgar/puppertino@github:codedgar/Puppertino#master # Via SSH npm install git+ssh://git@github.com/codedgar/Puppertino.git # Via HTTPS npm install https://github.com/codedgar/Puppertino.git ``` -------------------------------- ### CDN Installation for Puppertino CSS Source: https://context7.com/codedgar/puppertino/llms.txt Include the full CSS framework or individual components via CDN links in your HTML. ```html ``` -------------------------------- ### Import Full Puppertino Framework in JavaScript/CSS Source: https://github.com/codedgar/puppertino/blob/master/README.md Import the entire Puppertino framework in your JavaScript or CSS files after installation. ```javascript // In JavaScript/TypeScript import '@codedgar/puppertino' // In CSS @import '@codedgar/puppertino'; ``` -------------------------------- ### Color Palette Examples HTML Source: https://context7.com/codedgar/puppertino/llms.txt Demonstrates applying background and text colors using Puppertino's predefined color classes and shades. ```html
Strawberry (base)
Strawberry 500
Lime
Blueberry
Grape

Red text

Green text

Blue text

Apple Red
Apple Blue
Apple Green
Apple Orange
Apple Purple
``` -------------------------------- ### Puppertino Icon Button Examples Source: https://context7.com/codedgar/puppertino/llms.txt Examples of icon-only buttons, including a default, a colored variant, and one with no border, suitable for actions or navigation. ```html ? 🐶 ``` -------------------------------- ### Puppertino Push Button Examples Source: https://context7.com/codedgar/puppertino/llms.txt Demonstrates various styles for push buttons, including default, destructive, disabled, primary, rounded, and outline variants. ```html Primary Rounded Outline Outline Dashed ``` -------------------------------- ### Event Listener for Theme Toggle Source: https://github.com/codedgar/puppertino/blob/master/docs/examples/dark_mode.html An example of attaching an event listener to a button to trigger the theme toggle functionality. ```javascript hljs.initHighlightingOnLoad(); document.querySelector('#the_button').addEventListener('click',function(e){ e.preventDefault(); puppertinoThemeMan.toggle(); }); ``` -------------------------------- ### Action Variations with Icons Source: https://github.com/codedgar/puppertino/blob/master/docs/examples/actions.html This example demonstrates action variations including destructive actions and icons. It shows how to use different classes for styling destructive actions and icons, both inline and with text. Ensure consistent use of variants within a single action. ```html

What do you want to do?

Select an option below...

Close this tab Close this tab New private tab New tab
Cancel
``` -------------------------------- ### Puppertino Icon Button Examples Source: https://github.com/codedgar/puppertino/blob/master/docs/examples/buttons.html Demonstrates the creation of icon buttons, which are circular buttons containing icons. Supports letters, font icons, or SVGs. Always include an `aria-label` for accessibility. Custom colors and border removal are supported. ```html ? Custom Color ``` -------------------------------- ### Puppertino Scope Button Styles Source: https://github.com/codedgar/puppertino/blob/master/docs/examples/buttons.html Provides examples of scope buttons, designed for navigation routes. Includes styles for default/active, inactive, and action buttons. These complement standard buttons in route-based contexts. ```html [Default/Active](#) [Unactive](#) [Disabled](#) [Action](#) [Action](#) ``` -------------------------------- ### Dark Mode Toggle Button Event Listener HTML and JavaScript Source: https://context7.com/codedgar/puppertino/llms.txt Provides an example of a button that triggers the dark mode toggle functionality when clicked. ```html ``` -------------------------------- ### Puppertino Button Size Variants Source: https://context7.com/codedgar/puppertino/llms.txt Examples of buttons with different size classes: small (p-btn-sm), medium (p-btn-md), large (p-btn-lg), and block (p-btn-block) for full width. ```html Small size Medium size Large size Block size (full width) ``` -------------------------------- ### Initialize PuppertinoThemeMan Source: https://github.com/codedgar/puppertino/blob/master/docs/examples/dark_mode.html Call this function to set up theme management, optionally enabling auto-detection of system theme and customizing the dark theme class. ```javascript puppertinoThemeMan.init({ autoDetect: true, // Automatically detect system theme darkThemeClass: 'p-dark-mode' // Your custom dark theme class (optional) }); ``` -------------------------------- ### Initialize and Toggle Dark Mode with Puppertino Source: https://github.com/codedgar/puppertino/blob/master/docs/index.html This JavaScript snippet demonstrates how to initialize the Puppertino Dark Mode Manager, detect user preferences, and toggle themes. Ensure the Puppertino library is loaded before executing this code. ```javascript document.querySelector('.toggles_dark_mode input').addEventListener('change',function(){ puppertinoThemeMan.toggle(); }); puppertinoThemeMan.init({autoDetect: true}); const isDarkActive = puppertinoThemeMan.isDarkThemeActive(); console.log(isDarkActive); if(isDarkActive){ document.querySelector('.toggles_dark_mode input').checked = true } ``` -------------------------------- ### Modal Structure and Usage Source: https://github.com/codedgar/puppertino/blob/master/docs/examples/modals.html Learn how to set up the basic HTML structure for modals, including the background container, the modal itself, and trigger elements. This section covers general usage and the use of attributes like `data-p-open-modal` and `data-p-cancel`. ```APIDOC ## General Usage To use modals, you need two principal components: a trigger for the modal and the modal itself. For the button to work, you need to add the attribute `data-p-open-modal` followed by the ID of the actual modal. The actual modal can have from 1 to 3 buttons, and if you add the attribute `data-p-close-on-outside="true"` the modal will close if you click outside of it. Also, modals appear a little bit at the bottom in lower resolutions, just to make them easier to tap in mobile devices. ### Triggering a Modal ```html Default ``` ### Multiple Buttons in a Modal Modals support having several buttons on them without breaking, but due to composition, you should not add more than 3 buttons. To add more buttons, the only thing you need is to add another `` element inside the Modal button container (`