Marigold
Getting StartedFoundationsComponentsPatternsRecipesReleases
Discover new Tutorials!

Components

Overview

Application

MarigoldProvider
updated
RouterProvider
updated

Layout

Aside
Aspect
Breakout
Center
Columns
Container
Grid
Inline
Inset
Scrollable
Split
Stack
updated
Tiles

Form

Autocomplete
Button
updated
Calendar
Checkbox
ComboBox
DateField
DatePicker
Form
Multiselect
new
NumberField
Radio
SearchField
Select
Slider
Switch
TextArea
TextField
TimeField
new

Collection

SelectList
updated
Table
updated
Tag

Navigation

Accordion
Breadcrumbs
beta
Pagination
Tabs

Overlay

ContextualHelp
new
Dialog
Menu
Toast
beta
Tooltip
updated

Content

Badge
Body
Card
Divider
updated
Footer
Header
Headline
updated
Icon
updated
Image
Link
updated
List
updated
SectionMessage
SVG
updated
Text
updated
VisuallyHidden
updated
XLoader

Formatters

DateFormat
NumericFormat

Hooks and Utils

cn
cva
extendTheme
useAsyncListData
useListData
useResponsiveValue
useTheme

useTheme

Hook that applies a theme

The useTheme is a hook that gets you the current theme and all of its attributes and properties.

The useTheme hook returns the current theme, if there isn't a theme it uses the defaultTheme

const theme = useTheme();

Import

To import the hook you just have to use this code below.

import { useTheme } from '@marigold/system';

Examples

Get all the Theme Properties

Here is an example which shows you the chosen theme from the theme switcher on the top of the page. With the useTheme hook you can get the particular values for the available properties.

Preview
Code
    name
  • 0
  • 1
  • 2
    components
  • Accordion
  • Badge
  • Body
  • Breadcrumbs
  • Button
  • Calendar
  • Card
  • Checkbox
  • CloseButton
  • ComboBox
  • ContextualHelp
  • DateField
  • DatePicker
  • Dialog
  • Divider
  • Drawer
  • Field
  • Footer
  • Header
  • Headline
  • HelpText
  • IconButton
  • Image
  • Input
  • Label
  • Link
  • List
  • ListBox
  • Menu
  • Modal
  • MultiSelect
  • NumberField
  • Pagination
  • Popover
  • ProgressCycle
  • Radio
  • SectionMessage
  • Select
  • Slider
  • Switch
  • Table
  • Tabs
  • Tag
  • Text
  • TextArea
  • Toast
  • Tooltip
  • Underlay
  • XLoader
Last update: April 30, 2024
Build with 🥵, 🧡 and
v14.1.1