PHP code example of akostdev / moonshine-clock
1. Go to this page and download the library: Download akostdev/moonshine-clock library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
akostdev / moonshine-clock example snippets
use AKostDev\MoonShine\Components\AnalogClock;
// Basic usage with default parameters
AnalogClock::make()
// Custom size clock
AnalogClock::make(sizePx: 300)
// Full customization example
AnalogClock::make(
sizePx: 250,
smoothSecondHand: true,
borderColor: '#336699',
backgroundColor: '#f5f5f5',
borderThickness: 3,
centerDotColor: '#ff6600',
showDigits: true,
digitFont: 'Helvetica, sans-serif',
digitColor: '#333333',
hourHandColor: '#000000',
minuteHandColor: '#444444',
secondHandColor: '#ff0000'
)
AnalogClock::make()
AnalogClock::make(
sizePx: 300,
hourHandColor: '#007bff',
minuteHandColor: '#6c757d',
secondHandColor: '#dc3545',
borderColor: '#28a745'
)
AnalogClock::make(
showDigits: false,
backgroundColor: '#f8f9fa',
borderThickness: 1
)
AnalogClock::make(
secondHandColor: '#ff0000',
secondHandColorDark: '#ff9999',
backgroundColorDark: '#222222'
)