Paper Component
This class combines the configuration and rendering of a PaperComponent.
A PaperComponent is simply an elevated card-like box with a solid background and corner radii / paddings that vary depending on the specified size of the component.
There are different types of paper:
normal(Types.NORMAL): Paper sheet appears card-like with a box-shadow.outline(Types.OUTLINE): Paper sheet does not appear elevated but with an outline instead.ghost(Types.GHOST): Paper sheet neither appears elevated nor outlined.
The content is specified via the content property. In addition to the atual content an optional styling parameter can be specified as well.
Usage example:
paper {
size { normal }
type { normal }
content {
span { +"This is paper." }
}
}
paper {
content({
// Custom styled content
}) {
span { +"This is paper." }
}
}Constructors
PaperComponent
Link copied to clipboard
fun PaperComponent()
Content copied to clipboard
Types
PaperContent
Link copied to clipboard
data class PaperContent(styling: Style<BoxParams>, value: RenderContext.() -> Unit)
Content copied to clipboard
Sizes
Link copied to clipboard
SizesContext
Link copied to clipboard
object SizesContext
Content copied to clipboard
Types
Link copied to clipboard
TypesContext
Link copied to clipboard
object TypesContext
Content copied to clipboard
Functions
Properties
size
Link copied to clipboard
val size: ComponentProperty<PaperComponent.SizesContext.() -> PaperComponent.Sizes>
Content copied to clipboard
type
Link copied to clipboard
val type: ComponentProperty<PaperComponent.TypesContext.() -> PaperComponent.Types>
Content copied to clipboard