Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class InitSilk

An annotation which identifies a function as one which will be called when the page opens, before DOM nodes are composed. The function should take an InitSilkContext as its only parameter.

Link copied to clipboard
class InitSilkContext(val config: MutableSilkConfig, val stylesheet: SilkStylesheet, val theme: MutableSilkTheme)

Various classes passed to the user in a method annotated by @InitSilk which they can use to for initializing Silk values.

Link copied to clipboard
Link copied to clipboard
interface SilkConfig

Configuration values which are frozen at initialization time and accessed globally within Silk after that point.

Link copied to clipboard

Access to useful methods that can append CSS styles and keyframes to the global stylesheet provided by Silk.

Properties

Functions

Link copied to clipboard
fun initSilk(additionalInit: (InitSilkContext) -> Unit = {})
Link copied to clipboard
Link copied to clipboard
fun CssStyleRegistrar.registerStyleBase(cssSelector: String, init: () -> Modifier)

Convenience method when you only care about registering the base method, which can help avoid a few extra lines.