Android and iOS icon guidelines system to preview your icon designs
<!-- Add this in your page -->
<script src="ls-icon-guidelines.min.js"></script>
// Get the element where the previews should be render
const androidGuidelinesElement = document.querySelector('#my-android-wrapper')
const iosGuidelinesElement = document.querySelector('#my-ios-wrapper')
// Render the previews
const android = LsIconGuidelines.init({ element: androidGuidelinesElement, platform: 'android' })
const ios = LsIconGuidelines.init({ element: iosGuidelinesElement, platform: 'ios' })
// Set preview as visible
android.show()
ios.show()
// Set preview as hidden
android.hide()
ios.hide()
// Toggle preview visibility
android.toggleVisible()
ios.toggleVisible()
// Toggle preview guidelines visibility
android.toggleGuidelines()
ios.toggleGuidelines()
// Toggle preview shadow visibility
android.toggleShadow()
ios.toggleShadow()
// Toggle preview safe area visibility
android.toggleSafeArea()
ios.toggleSafeArea()
// Toggle preview label visibility
android.togglePlatformLabel()
ios.togglePlatformLabel()
// Set guidelines color
android.setGuidelinesColor('#ffffff')
ios.setGuidelinesColor('#ffffff')
// Set background color
android.setBackgroundColor('#ffffff')
ios.setBackgroundColor('#ffffff')
// Set font color
android.setFontColor('#ffffff')
ios.setFontColor('#ffffff')
// Set icon URL
android.setIconURL('your-icon-url')
ios.setIconURL('your-icon-url')
// Remove icon URL
android.unsetIconURL()
ios.unsetIconURL()
- Clone the project
- Open a new branch
- Execute
yarn install
- Make your changes
- Execute
yarn build
- Test your changes
- Submit a PR