Getting Started
Customization
Theme Object
Kubed theme is an object containing a series of theme configurations, which include properties for colors, layout, fonts, and more.
1interface KubedTheme {2/** Theme name */3type: string;4/** Configure the font and default font size */5font: KubedThemeFont;6/** You can define spacing, control sizes, border radius, and other layout-related properties */7layout: KubedThemeLayout;8/** The color palette, where you can customize the theme colors */9palette: KubedThemePalette;10/** Set the responsive breakpoints */11breakpoints: KubedThemeBreakpoints;12/** Configure shadows, opacities, and line styles */13expressiveness: KubedThemeExpressiveness;14}
Usage
1import { KubedConfigProvider, Button, themeUtils } from "@kubed/components"2function App() {3const customDarkTheme = themeUtils.createFromDark({4type: "customDark",5palette: {6colors: {7green: ["#E9EDFC", "#E9EDFC", "#E9EDFC", "#E9EDFC", "#E9EDFC"],8},9},10layout: {11inputSizes: {12sm: "24px",13},14},15expressiveness: {16buttonShadow: () => "10px 10px 10px hotpink",17},18})19return (20<KubedConfigProvider themes={[customDarkTheme]} themeType={"customDark"}>21<Button color="primary" shadow>22button23</Button>24</KubedConfigProvider>25)26}
Theme properties
palette
The color palette for Kubed is an object containing a series of color configurations, including properties for the theme's colors, backgrounds, text colors, and more.
You can configure the theme's colors through the palette
property.
In KubedDesign, the primary color is green. You can change the primary color by setting the palette.colors.green
property,
using RGB, RGBA, or hex values. Alternatively, you can directly set the primary property
layout
The layout in Kubed is an object containing a series of properties for spacing, control sizes, border radius, and other layout-related settings
expressiveness
The expressiveness in Kubed is an object containing properties for button shadows, opacities, line styles, and other expressive design elements