Nectar Documentation
DemoBuy Now
  • Introduction
  • Getting Started
    • Requirements
    • Installation
    • Directory Structure
    • Dependencies & Plugins
  • Basics
    • Configuration
    • Routes
    • Layout
    • Navigation
    • Initialization
    • Theming
    • Internationalization
    • Store Management
  • UI & UX
    • Components
      • Accordion
      • Action Sheet
      • Audio
      • Autocomplete
      • Badge
      • Breadcrumb
      • Button
      • Card
      • Chart
      • Checkbox
      • Chip
      • Color Picker
      • Content Block
      • Data Table
      • Date-Time Picker
      • Dialog
      • Dropcap
      • Elevation
      • Embed
      • Empty State
      • Expandable Card
      • Flip Card
      • Floating Action Button
      • Form Input
      • Form Validator
      • Gauge
      • Grid
      • Icon
      • Image
      • Image Compare
      • Image Hotspot
      • Infinite Scroll
      • Keypad
      • Line Divider
      • List Index
      • List View
      • Marquee
      • Menu
      • Menu List
      • Navbar
      • Note
      • Notification
      • Pagination
      • Photo Browser
      • Picker
      • Popover
      • Popup
      • Preloader
      • Progress Bar
      • Pull-to-Refresh
      • Quote
      • Radio
      • Range Slider
      • Rating
      • Ribbon
      • Searchbar
      • Sheet Modal
      • Show More/Less
      • Side Panel
      • Signature Pad
      • Skeleton
      • Smart Select
      • Sortable List
      • Stepper
      • Subnavbar
      • Swipeout
      • Swiper Slider
      • Syntax Highlighter
      • Tab
      • Text Editor
      • Timeline
      • Timer
      • Toast
      • Toggle
      • Toolbar
      • Tooltip
      • Tour Guide
      • Tree View
      • Video
      • Virtual List
    • Screens
      • Splash Screen
  • Advanced
    • Web APIs
      • App Badging API
      • App Shortcuts API
      • Battery Status API
      • Clipboard API
      • Contact Picker API
      • Device Memory API
      • Device Orientation API
      • File API
      • Fullscreen API
      • Geolocation API
      • Get Installed Related Apps API
      • HTML Media Capture API
      • Local Storage API
      • Network Information API
      • Notifications API
      • Online & Offline Status API
      • Page Visibility API
      • Permissions API
      • Picture-In-Picture API
      • Quota Estimation API
      • Screen Orientation API
      • Screen Wake Lock API
      • Server-Sent Events API
      • Session Storage API
      • Vibration API
      • Web Share API
    • Cordova Plugins
      • Battery Status
      • Build Info
      • Camera
      • Contacts Info
      • Device
      • Dialogs
      • Fingerprint Authentication
      • Geolocation
      • In-App Browser
      • Media Capture
      • Network Information
      • Social Sharing
      • Splash Screen
      • SQLite
      • Status Bar
      • Vibration
    • Integrations
      • AlaSQL
      • Disqus
      • Embedly
      • Facebook Comments
      • Google AdMob
      • Google Maps
      • Google Sheets
      • Gravatar
      • Lottie
      • Mailchimp
      • QR Code
      • RSS
      • Telegram Comments
      • WordPress
      • YouTube
  • Publishing
    • Progressive Web App
    • Cordova App
  • Help
    • Changelog
    • Support
    • Customization
  • Tutorials
    • How to Create and Animate an SVG Image Using JavaScript
Powered by GitBook
On this page
  1. UI & UX
  2. Screens

Splash Screen

Animating Splash Screen

  1. Install InkScape (SVG Editing Tool). You can download from https://inkscape.org

  2. Open Inkscape, a blank document is opened.

  3. Select Text tool from the left toolbar. Now write the text, set its font, size and color. The font used in Nectar logo is Georgia.

  4. Now, select the text object. To make the text animatable using JS, we will need to convert the selected text into path.

  5. So, to convert text into path, apply Path > Path to Object or press Shift + Ctrl + C.

  6. Ungroup it, Object > Ungroup or press Shift + Ctrl + G.

  7. Select all the ungrouped (individual) letters and apply Ctrl + J (Dynamic Offset).

  8. Save the SVG file.

  9. Now we will need to optimize and minimize the SVG file. So, go to https://jakearchibald.github.io/svgomg, upload the SVG.

  10. Set the following parameters:

Keep these UNCHECKED: Show original, Merge paths, Move attrs to parent group, Prefer viewBox to width/height, Remove viewBox Keep all other parameters CHECKED

  1. Then, download the optimized SVG file.

  2. Now open the optimized SVG file in a text editor, copy its content.

  3. Open /www/partials/screens/splash.html file, search for elements (There are two, one for light mode and other for dark mode). Replace these with the SVG you have copied.

  4. Add class="logo" to the element.

  5. Inside you will see a number of elements. These elements have fill="COLOR" attribute. Add stroke="COLOR" to these elements. COLOR can be in hex, rgb format. You can set their color according to your brand colors.

Please note that the element must have stroke property. Otherwise, the animation will not work.

  1. Now we will need to set the animationDuration. Change let animationDuration = 2000; according to your needs.

That's all you need to create animated SVG.

PreviousScreensNextWeb APIs

Last updated 1 year ago